HTTP Device Update


Optional Fields


displayName
A friendly name for the Device
reportPeriodicity
How often the device should send a report (applicable when using the flowthings.io Agent)

Request


PUT https://api.flowthings.io/v0.1/<account_id>/device/<device_id>

NOTE: Some attributes, such as status and deviceSummary can only be updated using the Token associated with the device.

When using the flowthings.io Agent, whenever the reportPeriodicity is updated the agent will be updated immediately in order for the change to take affect.

Headers

NameDescription
Content-Typeapplication/json
X-Auth-TokenAuthentication Token

Example

PUT https://api.flowthings.io/v0.1/<account_id>/device/d5489f22ed4c66f8dfcbe2794

{
  "reportPeriodicity" : 120000
}

Response


HTTP Codes

CodeDescription
200Resource Updated
400Bad Request
401Unauthorized
503Service Unavailable

Example

{
  "head": {
    "status": 200,
    "ok": true,
    "messages": [
      "Your request has been processed successfully. A resource has been updated."
    ],
    "errors": []
  },
  "body": {
    "id": "d5489f22ed4c66f8dfcbe2794",
    "creationDate": 1409455732680,
    "displayName": "Thermostat",
    "path" : "/alice/devices/home/thermostat",
    "token" : "k548b20f2d4c63c0634ad3cc8",
    "status" : "OK",
    "reportPeriodicity" : 120000
  }
}