Skip to main content

Get database fields

Description

Retrieves database fields information. The types of fields and allowed values are described in this article.

Request URL

Method: POST

https://example.com/api/v1.1/databases/fields_get/

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
idint1YesDatabase ID
formatint"json"NoResponse data format
By default – json

Request example

{
"id": 1,
"token": "abcdefghijklmnqrstuvwxyz"
}

Response example

{
"data": [
{
"category": "system",
"title": "Id",
"name": "_id",
"required": true,
"submanager": false,
"type": "unicode",
"enum_values": null
},
{
"category": "default",
"title": "FirstName",
"name": "_fname",
"required": false,
"submanager": false,
"type": "unicode",
"enum_values": null
},
{
"category": "custom",
"title": "Custom_String",
"name": "Custom_String",
"required": false,
"submanager": false,
"type": "unicode",
"enum_values": null
},
{
"category": "custom",
"title": "Custom_Int",
"name": "Custom_Int",
"required": false,
"submanager": false,
"type": "int",
"enum_values": null
},
{
"category": "custom",
"title": "Custom_Bool",
"name": "Custom_Bool",
"required": false,
"submanager": false,
"type": "bool",
"enum_values": null
},
{
"category": "custom",
"title": "Custom_Date",
"name": "Custom_Date",
"required": false,
"submanager": false,
"type": "date",
"enum_values": null
},
{
"category": "custom",
"title": "Custom_Tags",
"name": "Custom_Tags",
"required": false,
"submanager": false,
"type": "tags",
"enum_values": null
},
{
"category": "custom",
"title": "Custom_Enum",
"name": "Custom_Enum",
"required": false,
"submanager": false,
"type": "enum",
"enum_values": [
{
"name": "GMail",
"value": 2
},
{
"name": "HotMail",
"value": 3
},
{
"name": "Yahoo!",
"value": 1
}
]
}
],
"error": 0,
"error_text": "Successful operation"
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text
categorystringField category
titlestringField title
namestringField name
requiredboolRequired flag
submanagerboolSubscription manager access
typestringField type
enum_values
Enum list values