Unicat API Reference

Up - API Reference - Home


/api/p/<project gid>/channels/delete

Requires JWT.

Delete a channel

Request

You can either call this with a single channel key, or with a list of channels. If you specify both, only channel will be used.

Note: channel __all__ is not a "real" channel; it cannot be created, renamed, or moved; that includes trying to move other channels before __all__.

POST /api/p/<project gid>/channels/delete
Authorization: Bearer <JWT>

{
    "channel": "23d17876-e3cb-4acf-8eeb-a0154ca83a75"
}

or

POST /api/p/<project gid>/channels/delete
Authorization: Bearer <JWT>

{
    "channels": ["23d17876-e3cb-4acf-8eeb-a0154ca83a75", "4782d5f5-b62b-4ecb-bf71-5be637a15dc5"]
}

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "project": "<project gid>"
    },
    "data": {
        "cc.projects": {
            "<project gid>": {
                ,
                "options": {
                    "channels": {
                        "__all__": "[all records]",
                        "650ebd0f-eab5-41d7-87c1-1dc5334af872": "Website NL"
                    },
                    ,
                    "orderedchannels": [
                        "__all__",
                        "650ebd0f-eab5-41d7-87c1-1dc5334af872"
                    ],
                   
                },
                
            }
        }
    }
}

result

project the current project.

data

cc.projects Project updated with changed channels and orderedchannels.

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