Skip to main content

CreateField

Create field

Description

Create a field by specifying data_type

The data_type in the table below can be specified.

※The items that can be set differ depending on the data_type (type) of the field to be created.

data_typeItem typeUnique keyUse for titleUse for search criteriaAvailability of search indexTarget for full-text searchDisplay in listNot displayed when action is executedNot displayed in API results
textText
textareamulti-line text
selectOptions
radioRadio
checkboxCheckbox
autonumAuto numbering
numberNumerical value
calcCalculation formula
datetimeDate and time
fileAttachment
usersUser
dslookupDatabase reference
labelLabel
separatorSeparator

Method

POST

Request URL Format

/api/v0/applications/:app-id/datastores/:datastore-id/fields

URL Params

app-id          : Application ID (ID entered from the Hexabase screen)
datastore-id : Data store ID (ID entered from the Hexabase screen)

Request URL Sample

POST https://api.xxx.com/api/v0/applications/624bea3a879f4e8d8b5dcc6f/datastores/639912c0b1ea5632b8bc0545/fields

Payload

Detailed settings for each data_type are available at UpdateField

{
"dataType": "text",
"name": "フィールド名", // (Required)Screen Item Name
"display_id": "Fld-MzZNUHau", // screen item ID
"search": true, // Set "Use as search condition"
"show_list": true, // Set "Show in list"
"as_title": false, // Set "Use as Title"
"full_text": false, // Set "Target for full-text search"
"unique": false, // Set "Unique Data"
"hideOnInput": false, // Set "Do not display when action is executed"
"hide_from_api": false, // Set "Do not display in API results"
"has_index": false, // Set "With or without search index"
"roles": [ // Set Permissions (Application Admin role is granted automatically)
"MEMBER", // Specify role ID
"624bea3a879f4e8d8b5dcc72"
]
}

Response Sample

{
"display_id": "Fld-MzZNUHau",
"field_id": "63c8dd1bc381e7e523178b97"
}