Sensors API

create new entry

POST /api/rest/admin/system/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

Version: HTTP/1.0
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MTAyNTQ3MzksInN1YiI6MjExfQ.mqlbdIdyLlNHQ9kt8k5niVXQFwXXv4nVlcXdz0J3kEg
Host: example.org
Cookie: 

Route

POST /api/rest/admin/system/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-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: application/vnd.api+json
Vary: Accept
ETag: W/"058e60cf181190f83f7aa2e89c9226ba"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: eddd8d82-e121-4057-ac7a-dff2d39e7129
X-Runtime: 0.015565
Content-Length: 261

Status

201 Created

Body

{
  "data": {
    "id": "4",
    "type": "sensors",
    "links": {
      "self": "http://example.org/api/rest/admin/system/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"
    }
  }
}