L2 Construct: save
atlas entityDescription
SaveEntity saves data to a specific entity.
L2 Data
- Provider: atlas
- Module: action
- Action: save
Example Step
{
"name": "insert-your-step-name",
"type": "l2",
"l2_data": {
"provider": "atlas",
"module": "action",
"action": "save",
"metadata": {}
}
}
Input
Example
{
"entity_name": "example-entity",
"table": {
"columns": null,
"rows": null
},
"write_mode": "APPEND"
}
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pontus.bpa/pkgs/atlas/entity_actions/save-entity-input",
"$ref": "#/$defs/SaveEntityInput",
"$defs": {
"Column": {
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"string": {
"$ref": "#/$defs/ColumnTypeStringConfig"
},
"number": {
"$ref": "#/$defs/ColumnTypeNumberConfig"
},
"boolean": {
"$ref": "#/$defs/ColumnTypeBooleanConfig"
},
"date": {
"$ref": "#/$defs/ColumnTypeDateConfig"
},
"datetime": {
"$ref": "#/$defs/ColumnTypeDateTimeConfig"
}
},
"additionalProperties": false,
"type": "object",
"required": ["name"]
},
"ColumnTypeBooleanConfig": {
"properties": {},
"additionalProperties": false,
"type": "object"
},
"ColumnTypeDateConfig": {
"properties": {},
"additionalProperties": false,
"type": "object"
},
"ColumnTypeDateTimeConfig": {
"properties": {},
"additionalProperties": false,
"type": "object"
},
"ColumnTypeNumberConfig": {
"properties": {
"min": {
"type": "integer"
},
"max": {
"type": "integer"
},
"step": {
"type": "number"
},
"latin_numbering": {
"type": "boolean"
}
},
"additionalProperties": false,
"type": "object",
"required": ["latin_numbering"]
},
"ColumnTypeStringConfig": {
"properties": {
"is_json": {
"type": "boolean"
},
"is_url": {
"type": "boolean"
}
},
"additionalProperties": false,
"type": "object",
"required": ["is_json", "is_url"]
},
"DataTable": {
"properties": {
"columns": {
"items": {
"$ref": "#/$defs/Column"
},
"type": "array"
},
"rows": {
"items": {
"items": true,
"type": "array"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object",
"required": ["columns", "rows"]
},
"SaveEntityInput": {
"properties": {
"entity_name": {
"type": "string"
},
"table": {
"$ref": "#/$defs/DataTable"
},
"write_mode": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": ["entity_name", "table", "write_mode"]
}
}
}
Output
Example
{
"body": {
"ok": true,
"error": {
"is_error": false
}
}
}
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pontus.bpa/pkgs/atlas/entity_actions/save-entity-output",
"$ref": "#/$defs/SaveEntityOutput",
"$defs": {
"HandlerError": {
"properties": {
"is_error": {
"type": "boolean"
},
"errors": {
"items": {
"type": "string"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object",
"required": ["is_error"]
},
"SaveEntityOutput": {
"properties": {
"body": {
"$ref": "#/$defs/SaveEntityOutputBody"
}
},
"additionalProperties": false,
"type": "object",
"required": ["body"]
},
"SaveEntityOutputBody": {
"properties": {
"ok": {
"type": "boolean"
},
"error": {
"$ref": "#/$defs/HandlerError"
}
},
"additionalProperties": false,
"type": "object",
"required": ["ok"]
}
}
}