Up - API Reference - Home
Requires JWT.
Add a field to the record's definition's fieldlist.
The field is placed at the end of the list, unless before_field is specified.
Afterwards, the record's definition is a working copy (if it wasn't already).
POST /api/p/<project gid>/records/definition/fieldlists/fields/add
Authorization: Bearer <JWT>
{
"record": "<record gid>",
"fieldlist": "<fieldlist key>",
"field": "<field gid>",
"before_field": "<field gid>"
}
record the record's gid
fieldlist the fieldlist to add the field to
field the field to add
before_field the field is placed before this field
language return data for this (project) language.
languages return data for these (project) languages.
If you request language and/or languages, you get the records' title and fields for the combined set. If you request neither, you'll get all available languages.
Authorization: <JWT>
{
"success": true,
"result": {
"record": "<record gid>",
"definition": "<definition gid>"
},
"data": {
"definitions": {
"<definition gid>": {
"gid": "<definition gid>",
…
}
},
"records": {
"<record gid>": {
"gid": "<record gid>",
"definition": "<definition gid>",
…
}
},
"layouts": {
"<layout gid>": {
"gid": "<layout gid>",
…
}
},
}
}
record the record.
definition the record's definition is (now) a working copy.
definitions Definition info with name, classes, fields.
records Record info with hierarchy, definition, field values.
layouts Layout info with hierarchy, for the returned definition.
400 Bad request - missing parameters or wrong type or value
401 Unauthorized - missing or expired JWT
403 Forbidden - not a member of this project
422 Unprocessable entity - can't work with this item