Unicat API Reference

Up - API Reference - Home


/api/p/<project gid>/definitions/layouts/components/delete

Requires JWT

Delete a component from a definition's layout.

You cannot delete the root component.

Note: you cannot modify an extended definition (use the records/definition api).

Request

POST /api/p/<project gid>/definitions/layouts/components/delete
Authorization: Bearer <JWT>

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

definition gid of the definition to update the layout for
component gid of the component that is deleted

Success response

Authorization: <JWT>

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

result

definition the definition with the changed layout - this is a working copy.
layout the layout is (now) a working copy.

data

definitions Definition info with name, classes, fields, and layout, also includes the original definition if it changed to a working copy.
layouts Layout info with hierarchy, also includes the original layout if it changed to a working copy.

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