> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/b/buildkite.md).

# Buildkite

Buildkite is a CI/CD platform with self-hosted agents. OctoXLabs reads the agents of every organization that the token can see as devices, and the organization members as users.

## Use cases

* List Buildkite agents with an IP address (Devices).

```
Adapters = buildkite AND IpAddresses = *
```

* List Buildkite organization members (Users).

```
Adapters = buildkite AND Email = *
```

## Before you begin

### Network

| Source              | Destination       | Port | Protocol |
| ------------------- | ----------------- | ---- | -------- |
| OctoXLabs connector | api.buildkite.com | 443  | HTTPS    |

### Required permissions

| Scope or role                                                 | Permission | Needed for        |
| ------------------------------------------------------------- | ---------- | ----------------- |
| API access token scopes for organizations, members and agents | Read       | Devices and Users |

## Create credentials in Buildkite

{% stepper %}
{% step %}

### Open your settings

Sign in to Buildkite and open `https://buildkite.com/user/api-access-tokens` in your personal settings. Tokens are issued to individuals, not organizations.
{% endstep %}

{% step %}

### Create a token

Create a token and give it read access to the organizations, members and agents you want to collect.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter | Required | Type   | Default           | Description                                               |
| --------- | -------- | ------ | ----------------- | --------------------------------------------------------- |
| Domain    | Yes      | String | api.buildkite.com | API host without the scheme. The code adds `https://`.    |
| API Token | Yes      | String |                   | Sent as a Bearer token. The field key in code is `token`. |

## Troubleshooting

| Error message                | Cause                                                                                                                                  | Fix                                                                                                  |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Status Code: `, URL, Method` | The API answered with an unexpected HTTP status. The shared request code raises it and logs the status, URL, method and response body. | Check the URL, the credentials and the permissions listed above, then run the connection test again. |

## Change history

{% hint style="info" %}
Available starting from version 5.6.0.
{% endhint %}
