/t requests
  • 22 Feb 2023
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

/t requests

  • Dark
    Light
  • PDF

Article summary

As described above, the /t API method invokes a script or protocol in determinate mode - i.e. the response to the request will be a token with which the client can use to call back later to get progress or results (once the script/protocol completes).

Request

The JSON payload requires either a valid Tag.bio script or protocol_instance.

Example initial request

(protocol and script)
Same as for /q requests above.

Example follow-up request

{
  "token":"XXX" <--Where XXX is the token provided in the initial response to the /t request
}

Initial response

The response to the initial /t request will be a JSON object with progress status (e.g. % completed) and potentially a status or error message.

Initial response example

{
  "token": "pncqpimctceulhbfkbbgqapnfc",
  "total": 1,
  "count": 0,
  "message": "Initializing analysis.",
  "results_next": false
}

Penultimate response

After the FC has completed the query/analysis, the "results_next" attribute will be set to true. The next request will fetch the full response.

Ultimate response

The ultimate response to the /t request will be the same as for /q requests.
NOTE - After this request, the token will be invalid.

Content-Type

The FC will respond with the appropriate Content-Type header for the response payload.


Was this article helpful?