Up - API Reference - Home
Requires JWT.
Manually set some or all orderings on a single record.
You should really use /records/move instead, so all records within the parent get updated to consistent values.
However, when you restore a set of previously saved records where all ordering information is correct, /records/orderings/set offers a quick shortcut - but you could potentially mess up the ordering, so you have to know what you're doing.
You can update any number of (existing) orderings, from one to all.
POST /api/p/<project gid>/records/orderings/set
Authorization: Bearer <JWT>
{
"record": "f2e64fe0-9ffa-4d9a-8750-d561d6542453",
"orderings": {
"87b53a4e-359d-45c7-81cb-5e1c3ef444ec": 3,
"f6c547a3-23ec-4e70-92bc-1826ae53570a": 17
}
}
record gid for the record we are updating.
orderings a dict with ordering keys and the order index relative to siblings.
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 orderings 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