Using our API requires prior knowledge about and how to work with one. This article explains how to get started and what's available.
The Aboard API is built using GraphQL, a query language for fetching data from our service. This allows you to specify what data you want to fetch, and only retrieve that data back.
If you're new to GraphQL, check out the Introduction to GraphQL for an overview of key concepts.
Creating an API key
To get started using the Aboard API, you first need to create an API key. You do this by going into Settings → Company settings → API Keys in the left sidebar.
You start by giving the API key a name, so you can know what it's used for later, and then click Create.
From here you can then view the API token by clicking on the eye icon, and copy it to use later in your API client.
Making your first request
After you've acquired your token, you can now start reading data from your Aboard account using the API key. All requests should be sent to the https://api.aboardhr.com/graphql
endpoint.
For details on sending GraphQL requests, see the Serving over HTTP guide.
Authorization
Along with the query, you also need to send over the API token you created earlier. This needs to be added as a bearer token in Authorization
header.
Authorization: Bearer <insert-api-token>
Example query
To verify that it's working you can send this example query.
query {
company {
name
departments {
id
name
}
}
}
In the response you'll get the data we requested under the data
key, in the same shape as you requested it.
{
"data": {
"company": {
"name": "Dunder Mifflin",
"departments": [
{
"id": "1",
"name": "Management"
},
{
"id": "2",
"name": "Sales"
}
]
}
}
}
To learn more about what data is available in the API, see the GraphQL introspection guide.