HTTP Track Update


Optional Fields


filter
Filters are used to require that Drops processed by the Track have specific data elements and values. See Flow Filter Language for more information on using the Flow Filter Language.
js
A javascript function that takes a Drop matching the filter from the source Flow as its first argument and then returns a Drop to be written to the destination Flow. The API may be accessed from within the js in order to enhance Drops with data from other Flows by utilizing Flow.js.

Request


PUT https://api.flowthings.io/v0.1/<account_id>/track/<trackId>

Headers

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

Example

PUT https://api.flowthings.io/v0.1/<account_id>/track/t53b1d1600cf27b75148de02e

  {
    "filter" : "elems.rating > 50",
    "js" : "function(input){ return {'/my_account/destination': [input] }; }"
  }

Response


HTTP Codes

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

Example

  {
    "head": {
      "status": 200,
      "ok": true,
      "errors": [],
      "messages": [ "Your request has been processed successfully. A new resource has been created." ]
    },
    "body": {
      "id": "t53b1d1600cf27b75148de02e",
      "source" : "/bob/my_source",
      "destination" : "/bob/my_destination",
      "filter" : "elems.rating > 50",
      "js" : "function(input){ return {'/my_account/destination': [input] }; }"
    }
  }