Using JSON

For example, to get form for adding VHost item make a request using POST method for /rest/adhoc/vhost-man@domain.com using Content-Type: application/json and sending the following content (request requires authentication using Basic HTTP Authentication) :

{
  "command": {
    "node" : "comp-repo-item-add"
  }
}

Below is an example result for request presented above:

{
  "command": {
    "jid": "vhost-man@domain.com",
    "node": "comp-repo-item-add",
    "fields": [
      {
        "var": "Domain name",
        "value": null
      },
      {
        "var": "Enabled",
        "type": "boolean",
        "value": "true"
      },
      {
        "var": "Anonymous enabled",
        "type": "boolean",
        "value": "true"
      },
      {
        "var": "In-band registration",
        "type": "boolean",
        "value": "true"
      },
      {
        "var": "TLS",
        "type": "fixed",
        "value": "This installation forces VHost to require TLS. If you need to use unencrypted connections set 'vhost-tls-required' property to 'false' in the installation configuration file"
      },
      {
        "var": "Max users",
        "value": "0"
      }
      …
    ],
    "instructions": "❗NOTE: Options without value set will use configuration defined in 'DEFAULT' VHost❗"
  }
}