Unicat API Reference

Up - API Reference - Home


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

Requires JWT.

Get the root of the tree.

You can specify which languages you want in the results.

The records/root endpoint never takes channels into account.

Request

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

{
    "language": "en"
}

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": {
        "root": "96ec02b2-fb8d-4fb4-b952-fad0c4b88a74"
    },
    "data": {
        "records": {
            "96ec02b2-fb8d-4fb4-b952-fad0c4b88a74": {
                "gid": "96ec02b2-fb8d-4fb4-b952-fad0c4b88a74",
                "parent": null,
                ,
                "fields": {
                    "en": {}
                }
            },
            
        }
    }
}

result

root the requested root-record gid

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