Product SiteDocumentation Site

2.2. Domain creation

New sensors can be created by submitting a POST request to following URI:
      HTTP Verb: POST
      https://hostname/api/v1/sensors/domain
      STATUS: DEPRECATED
      HTTP Verb: POST
      https://hostname/api/v1/sensors/create_domain
A JSON payload should be submitted alongside this request. Allowed payload parameters are:
If request is successful HTTP 200 OK status code will be returned alongside a JSON response describing the newly created sensor and a 'status' value set to true meaning that the request was successful. Keep in mind that manage permissions for the parent sensor are required in order to create a new sensor. If these permissions are missing HTTP 401 Unauthorized status code will be returned. If an unexistant parent was specified in the request HTTP 404 Not Found status code will be returned.
On the following lines you may find an execution example:
      Request:
        HTTP Verb: POST
        URI: https://hostname/api/v1/sensors/domain?auth_token=xxxxxx
        Payload: { "domain_type":"2", "parent_uuid":"697893457705749905", "name":"new_domain" }

      Response:
      {
        "query": true,
        "sensor": {
          "id": 893,
          "name": "new_domain",
          "type": 1,
          "domain_type": 2,
          "uuid": "242113467595288081"
        }
      }
In this response "domain_type" is the domain type specified above and "type" is the sensor types. Available sensor types are: