/
CREATE Table
CREATE Table
Request
HTTP ELEMENT | Value |
---|---|
URI | /rest/crud/1.0/table |
METHOD | POST |
Content-Type | application/json |
BODY | {
"key": "name-one", //required, must be unique
"name": "Name One", //required
"description": "description",
"hidden" : "true", //default: false
"inactiveFlag": "true", //default false
"fields": [{
"key": "field-one", //required, unique within the Table
"name": "Field One", //required
"type": "ForeignKey", //enum: Currency, Date, Number, Checkbox, Text, IpAddress, Password, TextArea, Hyperlink, List, Option, Percent, ForeignKey, Integer
//default: Text
"required: "false" //default: false
"relation": "name-one", //required if type = ForeignKey - the Table.key
"listValues": [ //ignored if type is not List
"Possible1",
"Possible2",
"Possible3"
]
}]
} |
Possible Response
Scenario | Response |
---|---|
there is no key in the request json body | {
"error": "REQUIRED",
"message": "jsonBody.key is required"
} |
there is no name in the request json body | {
"error": "REQUIRED",
"message": "jsonBody.name is required"
} |
First Field has no key | |
First Field has no name | |
If first field has the same key as the second field | |
If First Field has type = Type but there is not relation identified | |
If First Field is type = Type but table identified by the relation is does not exists. | |
If First Field Type is invalid | |
If table.key already exists | |
POSITIVE |
, multiple selections available,