Integrations

Learn how to make use of integrations with third parties

Integrations

Learn how to make use of integrations with third parties

Using the Atleta API

Using the Atleta API
To use the Atleta GraphQL API, you need an access token. You can obtain this access token by linking an app to your project.

Linking an app
To link an app, go to the settings. Click on the name of your organization in the navigation bar, select Settings, and then go to the 'Users and access' tab. Here you will find an overview of all users and apps that have access to your project.

In the 'Apps' section, click on 'Add app'. Fill in a name for the link here. This name will be used to display in the list of linked apps, so you can find it later and potentially unlink it. Click on 'Add app' to save the app.

After this, the API token will be shown once. Save it in a secure location (treat this token as if it were a password). Once you click 'OK', we cannot retrieve your access token anymore.

Using the GraphQL API
Atleta offers a GraphQL API at the endpoint https://atleta.cc/api/graphql
Part of this GraphQL API is publicly accessible. To access data from your project, an access token is required. You can include this in the following HTTP header, replacing $token with your token:

Authorization: Bearer $token

Our GraphQL API supports 'introspection', which allows you to see what fields are available. We would like to direct you to general documentation on how GraphQL works.

The main entry point in our API is the 'project' property on the Query type. For this, a Project ID is needed, which you can find in the URL of the dashboard where you linked your app: the four characters after atleta.cc/b/ are those of your project.

query {
	project(id: "TEST") {
        organisation_name
	}
}


An example query that retrieves the name of project TEST looks as follows:

POST /api/graphql HTTP/1.1
Authorization: Bearer $token
Content-Type: application/json; charset=utf-8
Host: atleta.cc

{
	"query": "query { project(id:\\"TEST\\") { organisation_name } }",
	"variables": {}
}