Skip to content

Ximdex CMS API: NodeGetContent

Javi Carretero edited this page Sep 6, 2013 · 1 revision

Another useful method on a node is to retrieve its content to modify or read it. For this task, the Ximdex API offers the getcontent method:

Description Retrieve the content of a node
URL /api/node/getcontent
Parameters ximtoken (required): session token obtained with the login action.
nodeid (required): the node ID we want to get the info.
clean (optional): the node ID which we want to get the content.
Response JSON object containing the content of the given node into the data field.
Example
POST Request #1 curl -X POST --data "ximtoken=XXABCDEFGHXX&nodeid=10923" http://example.org/ximdex/api/node/getcontent
GET Request #1 curl -X GET "http://example.org/ximdex/api/node/getcontent?ximtoken=XXABCDEFGHXX&nodeid=10923"
Response #1 {"error":0,"data":"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n<grammar xmlns=\"http:\/\/relaxng.org\/ns\/structure\/1.0\" xmlns:xim=\"http:\/\/ximdex.com\/schema\/1.0\">\r\n \t<start>\r\n \t\t<element name =\"docxap\"> . . . \t\t\t<xim:default_content>[note]<\/xim:default_content>\r\n \t\t<\/element>\r\n \t<\/define>\r\n<\/grammar>"}
POST Request #2 curl -X POST --data "ximtoken=XXABCDEFGHXX&nodeid=10923&clean=1" http://example.org/ximdex/api/node/getcontent
GET Request #2 curl -X GET "http://example.org/ximdex/api/node/getcontent?ximtoken=XXABCDEFGHXX&nodeid=10923&clean=1"
Response #2 {"error":0,"data":"<?xml version=\"1.0\" encoding=\"UTF-8\" ?> <grammar xmlns=\"http:\/\/relaxng.org\/ns\/structure\/1.0\" xmlns:xim=\"http:\/\/ximdex.com\/schema\/1.0\"> <start> <element name =\"docxap\"> . . . <element name=\"name\"> <text\/> <xim:default_content>[name]<\/xim:default_content> <\/element> <\/define> <define name=\"email.class\"> <element name=\"email\"> <text\/> <xim:default_content>[email]<\/xim:default_content> <\/element> <\/define> <define name=\"note.class\"> <element name=\"note\"><xim:default_content>[note]<\/xim:default_content> <\/element> <\/define> <\/grammar>"}

Topics

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