Unicat API Reference

Up - API Reference - Home


/api/p/<project gid>/definitions/save_as_new

Requires JWT

Save all changes to the definition as a new, original definition.

We used a copy to keep track of the changes; we now make those changes official.

Afterwards, the definition is no longer a working copy.

The accompanying layout is saved too.

Note: you cannot save an unmodified definition.

Note: you cannot save an extended definition.

Request

POST /api/p/<project gid>/definitions/save_as_new
Authorization: Bearer <JWT>

{
    "definition": "<definition gid>"
}

definition the definition to save as new

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "definition": "<definition gid>"
    },
    "data": {
        "definitions": {
            "<definition gid>": {}
        }
    }
}

result

definition the newly saved definition.

data

definitions Definition info with name, classes, fields.

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 - can't work with this item