Up - API Reference - Home
Requires JWT.
Duplicate a record without its subtree.
The duplicate is under the same parent, just after the original.
POST /api/p/<project gid>/records/duplicate
Authorization: Bearer <JWT>
{
"record": "f2e64fe0-9ffa-4d9a-8750-d561d6542453",
"ordering": "87b53a4e-359d-45c7-81cb-5e1c3ef444ec"
}
record
gid for the record we are copying.
ordering
the current ordering.
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": "7c136ddb-4dfa-4ec1-bad4-15067cbf80d9",
"parent": "9c5e1c75-6b81-44e1-a3fc-1b41ec9ba58b"
},
"data": {
"records": {
"7c136ddb-4dfa-4ec1-bad4-15067cbf80d9": {
…
},
"9c5e1c75-6b81-44e1-a3fc-1b41ec9ba58b": {
…
}
}
}
}
record
the newly created copy.
parent
the updated parent.
records
Record info with hierarchy, definition, field values. Unordered.
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 or parent record doesn't exist