FC API Methods
  • 13 Dec 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

FC API Methods

  • Dark
    Light
  • PDF

Article summary

/s

This method requires no parameters and will return metadata about each FC and its source data. It’s also useful as a health check to see if the FC is actually responding from that address.

It asks the question of the FC - “What information can you tell about yourself?”

For more details, see the /s requests section.


/p

This method will return metadata about protocols, and/or JSON objects which contain content from the “protocol_definition” of the protocol - i.e. the header of the protocol. This header contains information about how to configure and invoke the protocol.

It asks the question of the FC - “What protocols do you have, and how can I configure and run them?”

For more details, see the /p requests section.


/a

This method will return an asset from the server, typically an image.

For more details, see the /a requests section.


/q

This method will invoke a script (if allowed) or a protocol and wait for the response containing the query/analysis results. It’s useful in behind-the-scenes, asynchronous protocol calls - typically for “helper” and “callback” protocols. It requires a valid Tag.bio script or protocol invocation (aka “protocol_instance”) within the JSON payload of the request.

It commands the FC to “Run this script/protocol. I’ll wait for the results.”

For more details, see the /q requests section.


/t

This method will invoke a script (if allowed) or a protocol and the server will immediately send back a token associated with the request. The API will then respond to repeated /t requests containing the token and return progress and messages if the query/analysis is still running, or the results of the query/analysis if the process is complete. The initial request JSON payload is the same as for /q, and subsequent requests require a “token” attribute within the JSON payload of the request.

It commands the FC to “Run this script/protocol, and give me back a token with which I can get results later.”

For more details, see the /t requests section.


What's Next