# Buildkite

Manage Buildkite CI: pipelines, builds, jobs, agents, artifacts, annotations. Exposes **29 actions** covering the API surface an agent needs - read and write.

## What it can do

| Method | What it does |
| --- | --- |
| `buildkite_organizations_list` | List organizations - GET /v2/organizations. |
| `buildkite_organization_get` | Get one organization - GET /v2/organizations/&#123;slug&#125;. |
| `buildkite_pipelines_list` | List pipelines in an organization - GET /v2/organizations/&#123;org&#125;/pipelines. |
| `buildkite_pipeline_get` | Get one pipeline - GET /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;. |
| `buildkite_pipeline_create` | Create a pipeline - POST /v2/organizations/&#123;org&#125;/pipelines. |
| `buildkite_pipeline_update` | Update a pipeline - PATCH /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;. |
| `buildkite_pipeline_delete` | Delete a pipeline - DELETE /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;. |
| `buildkite_builds_list` | List builds in a pipeline - GET /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds. |
| `buildkite_build_get` | Get one build - GET /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;. |
| `buildkite_build_create` | Create a build (trigger) - POST /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds. |
| `buildkite_build_cancel` | Cancel a build - POST /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/cancel. |
| `buildkite_build_rebuild` | Rebuild a build - POST /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/rebuild. |
| `buildkite_jobs_list` | List jobs in a build - GET /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/jobs. |
| `buildkite_job_get` | Get one job - GET /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/jobs/&#123;id&#125;. |
| `buildkite_job_retry` | Retry a job - PUT /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/jobs/&#123;id&#125;/retry. |
| `buildkite_job_unblock` | Unblock a job - PUT /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/jobs/&#123;id&#125;/unblock. |
| `buildkite_job_log` | Get job log output - GET /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/jobs/&#123;id&#125;/log. |
| `buildkite_artifacts_list` | List artifacts from a build - GET /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/artifacts. |
| `buildkite_artifact_get` | Get one artifact - GET /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/artifacts/&#123;id&#125;. |
| `buildkite_artifact_delete` | Delete an artifact - DELETE /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/artifacts/&#123;id&#125;. |
| `buildkite_annotations_list` | List annotations on a build - GET /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/annotations. |
| `buildkite_annotation_create` | Create an annotation on a build - POST /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/annotations. |
| `buildkite_annotation_delete` | Delete an annotation - DELETE /v2/organizations/&#123;org&#125;/pipelines/&#123;slug&#125;/builds/&#123;number&#125;/annotations/&#123;id&#125;. |
| `buildkite_agents_list` | List agents in an organization - GET /v2/organizations/&#123;org&#125;/agents. |
| `buildkite_agent_get` | Get one agent - GET /v2/organizations/&#123;org&#125;/agents/&#123;id&#125;. |
| `buildkite_teams_list` | List teams in an organization - GET /v2/organizations/&#123;org&#125;/teams. |
| `buildkite_team_get` | Get one team - GET /v2/organizations/&#123;org&#125;/teams/&#123;id&#125;. |
| `buildkite_users_list` | List users in an organization - GET /v2/organizations/&#123;org&#125;/users. |
| `buildkite_user_get` | Get one user - GET /v2/organizations/&#123;org&#125;/users/&#123;id&#125;. |

## How to get credentials

This connector uses an **API key / token**. Create one in the provider
dashboard, then paste it into FlyMyAI:

- **`BUILDKITE_API_TOKEN`** - Buildkite - Personal Settings - API Access Tokens. (https://buildkite.com/user/api-access-tokens)

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `BUILDKITE_API_TOKEN` | Buildkite - Personal Settings - API Access Tokens. |

## Troubleshooting

- **`401 Unauthorized` / `403 Forbidden`** - the token is wrong, expired, or missing a required scope; regenerate it.
- **`429 Too Many Requests`** - provider rate limit; retry after a short backoff.
- **Unexpected `4xx` on writes** - double-check required fields; the agent confirms before write actions.

## Links

- [Buildkite API documentation](https://buildkite.com/docs/apis/rest-api)
