Skip to content

HTTP API Usage provides an HTTP API that allows users to retrieve information about builds, consumed CPU hours and more. The available API endpoints are detailed here.


To start using the HTTP API, you first need to create an authorization token with suitable permissions.

You can run the following command in the administration shell to generate a token that only is allowed to read information about builds. It can't be used for building, or uploading/downloading store paths.> tokens create -p build:read

The token will expire at:
  2026-06-16 12:13:59Z

The token has the following permissions:

It is recommended to create tokens with as few permissions as possible. You can also look into creating restricted "sub-tokens" through an operation called attenuation.

By default, tokens are valid for 1000 days. You can also set shorter expiration times, see tokens create --help.

The tokens you create are not stored in It is your responsibility to store your tokens safely. If needed, you can revoke tokens at any time.

Usage Example

Using the token we created above we can access the API with curl like this:

$ curl -s \
    -H 'Authorization: Bearer EpABCiYKB2FjY291bnQYAyIJCgcIgAgSAhABMg4KDAoCCBsSBggDEgIYABIkCAASIFeRyO2t1bxV2ZlLJKkp4S97nCyAz1ieyrCLv_RzYI0EGkCYCkIllHyVVnfZwyh0zxcKO-iqgtHkkaudYvZE9wL6otfeMe-ATkGh0Gkz_KyLt_YEbt__X5DRJ6Tj_41Z35APIiIKIHmZTFwQzdy2GZadSXRFYscLTHnbb_spQgLonsqos2tv'

  "billable_cpu_seconds": 316,
  "billable_build_count": 251

In the above example, we used the /usage API endpoint, which returns information about how many CPU hours you have used during a given period. To see all available endpoints and their parameters, see the API reference.