Skip to content
  • There are no suggestions because the search field is empty.

API Reference

General information

Each customer receives a dedicated ONE RACEHUB server in the PACETEQ cloud. There is an GraphQL api endpoint listening on this server. Give a customer acronym of "demo", the address is https://demo.oneracehub.net/graphql. Opening this address in the browser will show the Apollo Studio Playground . Clicking on "Query your server" will show the sandbox page.
 
api-playground
 
On the left side of the screen the schema documentation can be inspected. Clicking on "query", "mutation" or "subscription" will show all available documents and the corresponding document schema.

Connection check

The "version" query can be used to check the connection to the ONE RACEHUB api as it doesn't require authentication. 
query Version {
version
}
A 200 response will show that the server is active. As well the version string will be returned.

Logging in

ONE RACEHUB api issues tokens once the user is logged in. These tokens need to be sent via the "Authorization" header for subsequent requests. A token is valid for seven days. The token is received by a "login" mutation. 
mutation Login {
login(username: "konrad", password: "secretpassword") {
  token
}
}
{
"data": {
  "login": {
    "token": "about 236 characters long string"
  }
}
}

Checking availability

A good query to understand if the login was successful is the "whoami" query. It can be used to return the username of the account you are currently logged in with.

query WhoAmI {
whoami {
  person {
    username
  }
}
}
The response will show:
{
"data": {
  "whoami": {
    "person": {
      "username": "konrad"
    }
  }
}
}

Accessing the API with excel / vba

PACETEQ can provide an excel/vba template which contains a function to retrieve a login token from the endpoint.