Skip to content

Ximdex cms api: channels

Javi Carretero edited this page Sep 5, 2013 · 4 revisions

This action allows to retrieve information about the channels configured in Ximdex or to obtain the allowed channel for a specific node. Channels in Ximdex CMS represent the different output formats of your documents. The more common channels defined used to be html (for web browsers), rss (in plain xml format), print (for a printer preview), …

Description Get all the channels of Ximdex CMS
URL /api/channel
Parameters ximtoken (required): session token obtained with the login action.
channelid (optional): if present, the info of this specific channel will be returned.
Response Array of channels containing the following information about each one: IdChannel, the channel id, Name, the name of the channel and Description, the channel description.
Example
POST Request #1 curl -X POST --data "ximtoken=XXABCDEFGHXX" http://example.org/ximdex/api/channel
GET Request #1 curl -X GET "http://example.org/ximdex/api/channel?ximtoken=XXABCDEFGHXX"
Response #1 {"error":0,"data":[{"IdChannel":"10001","Name":"html","Description":"Html channel"},{"IdChannel":"10192","Name":"print","Description":"Print channel"}]}
POST Request #2 curl -X POST --data "channelid=10001&ximtoken=XXABCDEFGHXX" http://example.org/ximdex/api/channel
GET Request #2 curl -X GET "http://example.org/ximdex/api/channel?channelid=10001&ximtoken=XXABCDEFGHXX"
Response #2 {"error":0,"data":[{"IdChannel":"10001","Name":"html","Description":"Html channel"}]}

Let's see now how to know which channels are associated with a specific node:

Description Get the channel of an specific node of Ximdex CMS
URL /api/channel/node
Parameters ximtoken (required): session token obtained with the login action.
nodeid (required): the node ID we want to get its associated channels.
Response Array of channels containing the following information about each one: IdChannel, the channel id, Name, the name of the channel and Description, the channel description.
Example
POST Request #1 curl -X POST --data "nodeid=10065&ximtoken=XXABCDEFGHXX" http://example.org/ximdex/api/channel/node
GET Request #1 curl -X GET "http://example.org/ximdex/api/channel/node?nodeid=10065&ximtoken=XXABCDEFGHXX"
Response #1 {"error":0,"data":[{"IdChannel":"10001","Name":"html","Description":"Html channel"}]}

Topics

  • Home
  • How do I start?
  • Easy Recipes
Clone this wiki locally