Get Fields
List all fields that exist under a specific database.
Request | |
---|---|
Method | GET |
Resource | https://account.prod.vcc-live.app/api/v1/databases/{databaseId}/fields |
Options | N/A |
Body | N/A |
Response | |
Body | Project array, encoded in JSON |
Note: To authenticate for this API, provide your API token as a ‘Bearer’ token in the header: header ‘Authorization: Bearer yourtoken‘,
Request
Resource parameters
Name | Type | Mandatory | Comment |
---|---|---|---|
databaseId | string | yes | ID of the database, format:uuid |
Response
Response object
Name | Type | Comment |
---|---|---|
id | string | |
name | string | Label of the field |
type | string | Possible values: text, number, boolean, date, datetime, select, multiselect |
required | boolean | Highlights if field is mandatory |
unique | boolean | Highlights if needs to be populated with unique values |
possibleValue | array | Describes possible values of the field as below |
Possible Value object
Name | Type | Comment |
---|---|---|
name | string | |
displayName | string | Label of the field |
Example
Request
URL: https://account.prod.vcc-live.app/api/v1/databases/[DBID]/fields
Response body
{
"response": [
{
"id": "hobbies",
"name": "Hobbies",
"possibleValues": [
{
"displayName": "Diving",
"name": "D"
},
{
"displayName": "Exercise",
"name": "E"
},
{
"displayName": "Adventure",
"name": "A"
},
{
"displayName": "Baking",
"name": "B"
},
{
"displayName": "Cooking",
"name": "C"
}
],
"required": false,
"type": "multiselect",
"unique": false
},
{
"id": "user_identity",
"name": "User identity",
"required": false,
"type": "text",
"unique": true
},
{
"id": "size",
"name": "Size",
"possibleValues": [
{
"displayName": "Large",
"name": "L"
},
{
"displayName": "Small",
"name": "S"
},
{
"displayName": "Medium",
"name": "M"
}
],
"required": true,
"type": "select",
"unique": false
},
{
"id": "age",
"name": "Age",
"required": true,
"type": "number",
"unique": false
},
{
"id": "height",
"name": "Height",
"required": false,
"type": "number",
"unique": false
}
],
"errors": []
}
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.