Get started with the FYTT API

The FYTT API enables the secure flow of data from external sources. You can generate multiple unique tokens to facilitate integrations with any number of separate sources.

As FYTT receives data via the API, assessment formulas are calculated and conditional logic is evaluated, the same as if the data points had been updated manually. This means that you can create a seamless, automated bridge between data capture, data transfer, and training interventions.

API Calls

The FYTT API utilizes the GraphQL query language protocol.

Every API call should be a POST request to the app.fytt.io/api endpoint using the application/json content type with a single query parameter named query:

curl --request POST \
  --url https://app.fytt.io/api \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your auth token>' \
  --header 'Content-Type: application/json' \
  --data '{"query": "mutation { operationName(...) {...} }"}'

Every request must include a valid auth token in the Authorization header with the Bearer scheme declaration:

Authorization: Bearer <your-access-token>

Unauthorized requests will return a 401 Unauthorized response.

The query param should be a string that contains a GraphQL structured query. Queries can take on a number of different formats depending on how you decide to structure them. All queries to the FYTT API must either be structured as a Mutation or a Query.

Setup

These steps will enable you to start interacting with the API.

ℹ️

What you'll need

  1. Manager access to the FYTT institution you wish to access via the API

1. Generate an API token

In order to communicate with the API, you'll need a token that will be included in every request.

API tokens are associated with a FYTT institution and allow you to update and retrieve data for that institution. Follow the instructions in our knowledge base to create an API token.

2. Make your first request

With an API token in hand, you'll be able to start making requests. To start off, try fetching the name of of your institution:

curl --request POST \
  --url https://app.fytt.io/api \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your auth token>' \
  --header 'Content-Type: application/json' \
  --data '{"query": "query { institution { name } }"}'

This should return something like this:

{
  "data": {
    "institution": {
      "name": "FYTT"
    }
  }
}

You should now be ready to interact with the FYTT API!