Sensors API

update values

PUT /api/rest/admin/sensors/:id

Parameters

Name Description
data[type] Resource type (sensors)
data[id] Sensor ID
data[attributes][name] Name

Request

Headers

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

Route

PUT /api/rest/admin/sensors/5

Body

{"data":{"type":"sensors","id":5,"attributes":{"name":"name"}}}

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
vary: Accept
etag: W/"a170b63d4a44eb10cef288196c4346d4"
cache-control: max-age=0, private, must-revalidate
x-request-id: 06067cec-bde4-4fb7-912a-53edcc5518a8
x-runtime: 0.012158
content-length: 254

Status

200 OK

Body

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