Up - API Reference - Home
Requires JWT.
Re-order channels.
You must specify the channel
key you want to move. You can also specify the before_channel
, and the channel will be placed before that one. If you don't provide a before_channel
, the channel
will be moved to the end.
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/move
Authorization: Bearer <JWT>
{
"channel": "2b1ca5b8-57b7-4f48-8804-c99acc590b26",
"before_channel": "650ebd0f-eab5-41d7-87c1-1dc5334af872"
}
or
POST /api/p/<project gid>/channels/move
Authorization: Bearer <JWT>
{
"channel": "2b1ca5b8-57b7-4f48-8804-c99acc590b26"
}
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",
"4782d5f5-b62b-4ecb-bf71-5be637a15dc5": "Website EN",
"23d17876-e3cb-4acf-8eeb-a0154ca83a75": "Catalog NL",
"2b1ca5b8-57b7-4f48-8804-c99acc590b26": "Catalog EN",
"a9815885-96fd-466d-98fe-f3ae6353abc3": "Pricelist NL",
"ab20eeef-dcff-4679-aef9-c3332371b6dd": "Pricelist EN"
},
…,
"orderedchannels": [
"__all__",
"2b1ca5b8-57b7-4f48-8804-c99acc590b26", // here it is!
"650ebd0f-eab5-41d7-87c1-1dc5334af872",
"4782d5f5-b62b-4ecb-bf71-5be637a15dc5",
"23d17876-e3cb-4acf-8eeb-a0154ca83a75",
"a9815885-96fd-466d-98fe-f3ae6353abc3",
"ab20eeef-dcff-4679-aef9-c3332371b6dd"
],
…
},
…
}
}
}
}
project
the current project.
cc.projects
Project updated with orderedchannels.
400
Bad request - missing parameters or wrong type or value
401
Unauthorized - missing or expired JWT
403
Forbidden - not a member of this project