HTTP Flow Find


Request


GET https://api.flowthings.io/v0.1/<account_id>/flow?filter=<filter>&start=<start>&limit=<limit>&sort=<sort>&order=<order>

Params

  • start - For the starting index of the search, default is 0
  • limit - To limit the maximum number of results returned, default is 20
  • sort - For selecting a member field to sort the search results. Default is creationDate
  • order - For selecting the order of the sort, options are ‘asc’ (ascending) or ‘desc’ (descending). Default is desc
  • filter - For defining the parameters of the search, see the Flow Filter Language documentation for more details

Headers

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

Example

GET https://api.flowthings.io/v0.1/<account_id>/flow?filter=path=="/bob/homeappliances"&start=0&limit=10&sort=destination&order=asc

Response


HTTP Codes

CodeDescription
200Request Successful
400Bad Request
401Unauthorized
503Service Unavailable

Example

{
  "head": {
    "status": 200,
    "ok": true,
    "errors": [],
    "messages": [ "Your request has been processed successfully." ]
  },
  "body": [{
    "id": "f53b1d1600cf27b75148de0ac",
    "creationDate": 1404162400648,
    "capacity" : 1000,
    "lastEditDate": 1404313431577,
    "description": "Everything in bob's home sends data here",
    "path": "/bob/homeapplicances",
    "filter": ""
  }]
}

HTTP Flow Find Children

Request

GET https://api.flowthings.io/v0.1/<account_id>/flow/<flow_id>/children&start=<start>&limit=<limit>&sort=<sort>&order=<order>

Params

  • start - For the starting index of the search, default is 0
  • limit - To limit the maximum number of results returned, default is 20
  • sort - For selecting a member field to sort the search results. Default is creationDate
  • order - For selecting the order of the sort, options are ‘asc’ (ascending) or ‘desc’ (descending). Default is desc

Headers

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

Example

GET https://api.flowthings.io/v0.1/<account_id>/flow/f54adbc0f0cf2457aa240d3bb/children

Response


{
  "head" : {
    "status" : 200,
    "ok" : true,
    "messages" : [ {
      "start" : "0"
    }, {
      "limit" : "20"
    }, {
      "order" : "desc"
    } ],
    "errors" : [ ],
    "references" : { }
  },
  "body" : [ {
    "id" : "f54adbc0f0cf26c2b6fda4dc0",
    "capacity" : 1000,
    "creationDate" : 1420672015871,
    "creatorId" : "i54adbc0f0cf26c2b6fda4db5",
    "path" : "/bob/homeappliances/a"
  }, {
    "id" : "f54adbc100cf26c2b6fda4dc6",
    "capacity" : 1000,
    "creationDate" : 1420672016394,
    "creatorId" : "i54adbc0f0cf26c2b6fda4db5",
    "path" : "/bob/homeappliances/a/b"
  }, {
    "id" : "f54adbc100cf2457aa240d3c7",
    "capacity" : 1000,
    "creationDate" : 1420672016647,
    "creatorId" : "i54adbc0f0cf26c2b6fda4db5",
    "path" : "/bob/homeappliances/a/c"
  }, {
    "id" : "f54adbc100cf2457aa240d3c1",
    "capacity" : 1000,
    "creationDate" : 1420672016137,
    "creatorId" : "i54adbc0f0cf26c2b6fda4db5",
    "path" : "/bob/homeappliances/b"
  } ]
}