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.eyJleHAiOjE3MzE1Nzg3NjQsInN1YiI6MjMxfQ.pCqJn7Z94NYJDcvuax4ivdRV_MPRs_lg97VUn3knjgE
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: 4632255b-3c81-4835-928c-06b0cfb820dd
X-Runtime: 0.018718
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"
    }
  }
}