Create a node

HTTP URI: /rest/pubsub/

Available HTTP methods:


Method returns example content which contains all required and optional parameters that may be passed to newly created node.


Command requires fields node and pubsub#node_type to be filled with proper values for execution.

  • node - field should contain id of node to create
  • owner - field may contains jid which should be used as jid of owner of newly created node (will use jid of Tigase HTTP API Component if not passed)
  • pubsub#node_type - should contain type of node to create (two values are possible: leaf - node to which items will be published, collection - node which will contain other nodes)

Example content to create node of id example and of type leaf and with owner set to

Using XML

Request in XML. 

  <pubsub prefix="true">

Response in XML. 

  <Note type="fixed">
    <value>Operation successful</value>

Using JSON

Request in JSON. 

  "node" : "example",
  "owner" : "",
  "pubsub#node_type" : "leaf"

Response in JSON. 

  "Note": "Operation successful"