Unicat API Reference

Up - API Reference - Home


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

Requires JWT.

Unlink a linked record.

This means that the canonical for these records is set to themselves. Specifically, this is not an 'undo' for the link_record action. If anything, a link_record action followed by an unlink_record action effectively makes it a plain copy.

Request

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

{
    "record": "f5a05b94-b02b-43d5-a154-b9fc04c4a679",
}

record gid for the record we are unlinking.

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": "f5a05b94-b02b-43d5-a154-b9fc04c4a679"
    },
    "data": {
        "records": {
            "f5a05b94-b02b-43d5-a154-b9fc04c4a679": {
                "gid": "f5a05b94-b02b-43d5-a154-b9fc04c4a679",
                "canonical": "f5a05b94-b02b-43d5-a154-b9fc04c4a679",  // unlinked: links to self
                "is_link": false,
                
            }
        }
    }
}

result

record the unlinked record.

data

records Record info with hierarchy, definition, field values.

Error responses

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 - parent record doesn't exist