Up - API Reference - Home
Requires JWT
Modify a component in a definition's layout.
You can only change the layout if you have extended the definition.
POST /api/p/<project gid>/records/definition/layouts/components/modify
Authorization: Bearer <JWT>
{
"record": "<record gid>",
"component": "<component gid>",
"name": "optional component name",
"type": "field",
"options": {"field": "<field gid>", "style": "title"}
}
record
the record's gid
component
gid of the component that is modified
The following are all optional, but at least one must be provided.
name
the name of the component
type
the type of component
options
some types need extra options
See
layouts
for types and options for components
Languages are also optional, and only used for returned record data.
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>",
"layout": "<layout gid>"
},
"data": {
"records": {
"<record gid>": {
"gid": "<record gid>",
"definition": "<definition gid>",
…
}
},
"definitions": {
"<definition gid>": {
"gid": "<definition gid>",
…
}
},
"layouts": {
"<layout gid>": {
"gid": "<layout gid>",
…
}
},
}
}
record
the record.
definition
the record's definition is (now) a working copy.
layout
the layout is (now) a working copy.
records
Record info with hierarchy, definition, field values.
definitions
Definition info with name, classes, fields, and layout.
layouts
Layout info with hierarchy.
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