Sensors API

create new entry

POST /api/rest/admin/sensors

Parameters

Name Description
data[type] Resource type (sensors)
data[attributes][name] Name
data[attributes][mode-id] Mode id
data[attributes][target-ip] Target ip
data[attributes][source-ip] Source ip
data[attributes][source-interface] Source interface
data[attributes][target-mac] Target mac
data[attributes][use-routing] Use routing

Request

Headers

Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIxNiwiYXVkIjpbImFkbWluIl0sImV4cCI6MTc2NzM1ODU3MX0.SmBzZzM1UoxJ9oOE7WVOQyeE6aWZbQ2E_lAW_Pdjce0
Host: example.org
Cookie: 

Route

POST /api/rest/admin/sensors

Body

{"data":{"type":"sensors","attributes":{"name":"name","mode-id":1,"target-ip":"192.168.0.2","source-ip":"192.168.0.1"}}}

Response

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/vnd.api+json
location: http://example.org/api/rest/admin/sensors/4
vary: Accept
etag: W/"83fcdd6342592c450c3c660dc4275ad2"
cache-control: max-age=0, private, must-revalidate
x-request-id: 7b610cc3-ae71-4430-a8e9-7d4d3b2e6c3c
x-runtime: 0.011225
content-length: 254

Status

201 Created

Body

{
  "data": {
    "id": "4",
    "type": "sensors",
    "links": {
      "self": "http://example.org/api/rest/admin/sensors/4"
    },
    "attributes": {
      "name": "name",
      "mode-id": 1,
      "source-interface": null,
      "target-mac": null,
      "use-routing": false,
      "target-ip": "192.168.0.2",
      "source-ip": "192.168.0.1"
    }
  }
}