Unicat API Reference

Up - API Reference - Home


/api/p/<project gid>/records/undelete

Requires JWT.

Undeletes a deleted record and its subtree.

Note: AND its subtree!

A deleted record can be undeleted unless it was followed by a permanent_delete or its parent is deleted too - you should undelete the parent then.

If you undelete a record that has links to it, those links are undeleted too.

The undeleted record is returned.

Request

POST /api/p/<project gid>/records/undelete
Authorization: Bearer <JWT>

{
    "record": "f2e64fe0-9ffa-4d9a-8750-d561d6542453",
}

record undelete the record with this gid.

optional

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.

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "record": "f2e64fe0-9ffa-4d9a-8750-d561d6542453",
    },
    "data": {
        "records": {
            "f2e64fe0-9ffa-4d9a-8750-d561d6542453": {
                
            }
        }
    }
}

result

record the undeleted record.

data

records Record info with hierarchy, definition, field values.

Error responses

400 Bad request - missing argument
401 Unauthorized - missing or expired JWT
403 Forbidden - not a member of this project
422 Unprocessable entity - undeletion failed