HTTP Mqtt Connection Update

Request


PUT https://api.flowthings.io/v0.1/<account_id>/mqtt/<mqttTaskId>

Updating an Mqtt Task will cause any existing task to disconnect and reconnect with the new values.

Note: The destination field can not currently be updated. To write to a different destination post a new task.

Headers

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

Example

PUT https://api.flowthings.io/v0.1/<account_id>/mqtt/m5489f22ed4c66f8dfcbe2794

{
  "description": "some new description"
}

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": "m54ab5d230cf25a3da95ae309",
    "creationDate": 1420516643503,
    "creatorId": "i54ab092d0cf29d26771d0026",
    "description": "some new description",
    "destination": "/bob/aclxxnfktm",
    "displayName": "My Mqtt Task",
    "uri": "tcp://localhost:1883",
    "lastEditDate": 1420516648783,
    "password": "broker_password",
    "qos": 1,
    "reportFlowId": "f54ab5d230cf25a3da95ae30b",
    "reportFrequency": 300000,
    "reportPath": "/bob/:reports/m54ab5d230cf25a3da95ae309-report",
    "status": "ok",
    "topic": "npgjxxbnbc"
  }
}