Up - API Reference - Home
Requires JWT.
Toggle a record's channels.
Set multiple channels on (enabled) or off (not enabled) for the record.
Note: you cannot toggle the
[all records]
channel (__all__
) off.
POST /api/p/<project gid>/records/channels/set
Authorization: Bearer <JWT>
{
"record": "f2e64fe0-9ffa-4d9a-8750-d561d6542453",
"channels": [
"650ebd0f-eab5-41d7-87c1-1dc5334af872",
"4782d5f5-b62b-4ecb-bf71-5be637a15dc5",
"23d17876-e3cb-4acf-8eeb-a0154ca83a75"
],
"enabled": false
}
record
gid for the record we are updating.
channels
a list of keys for the channels that must be set
enabled
the value to set, true
for enabled, false
for not enabled
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": "f2e64fe0-9ffa-4d9a-8750-d561d6542453",
},
"data": {
"records": {
"f2e64fe0-9ffa-4d9a-8750-d561d6542453": {
…
}
}
}
}
record
the record with updated channel info.
records
Record info with hierarchy, definition, field values.
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 - record doesn't exist