Registries API

The registries API endpoint lets you create and manage registries in your organization.

Create a registry

curl -H "Authorization: Bearer $TOKEN" \
  -X POST "https://api.buildkite.com/v2/packages/organizations/#{org.slug}/registries" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my registry",
    "ecosystem": "ruby",
    "description": "registry containing ruby gems"
    }' 
{
  "id": "0191df84-85e4-77aa-83ba-6579084728eb",
  "graphql_id": "UmVnaXN0cnktLS0wMTkxZGY4NC04NWU0LTc3YWEtODNiYS02NTc5MDg0NzI4ZWI=",
  "slug": "my-registry",
  "url": "https://api.buildkite.com/v2/packages/organizations/my-org/registries/my-registry",
  "web_url": "https://buildkite.com/organizations/my-org/registries/my-registry",
  "name": "my registry",
  "ecosystem": "ruby",
  "description": "registry containing ruby gems",
  "emoji": null,
  "color": null,
  "public": false,
  "oidc_policy": null
}

Required request body properties:

name Name of the new registry.
Example: "my registry".
ecosystem Registry ecosystem based on the package ecosystem for the new registry.
Example: "ruby".

Optional request body properties:

description Description of the registry.
Default value: null.

Required scope: write_registries

Success response: 200 OK

List all registries

Returns a list of an organization's registries.

curl -H "Authorization: Bearer $TOKEN" \
  -X GET "https://api.buildkite.com/v2/packages/organizations/#{org.slug}/registries"
[
  {
    "id": "0191df84-85e4-77aa-83ba-6579084728eb",
    "graphql_id": "UmVnaXN0cnktLS0wMTkxZGY4NC04NWU0LTc3YWEtODNiYS02NTc5MDg0NzI4ZWI=",
    "slug": "my-registry",
    "url": "https://api.buildkite.com/v2/packages/organizations/my-org/registries/my-registry",
    "web_url": "https://buildkite.com/organizations/my-org/packages/registries/my-registry",
    "name": "my registry",
    "ecosystem": "ruby",
    "description": "registry containing ruby gems",
    "emoji": null,
    "color": null,
    "public": false,
    "oidc_policy": null
  }
]

Required scope: read_registries

Success response: 200 OK

Get a registry

Returns the details for a single registry, looked up by its slug.

curl -H "Authorization: Bearer $TOKEN" \
  -X GET "https://api.buildkite.com/v2/packages/organizations/#{org.slug}/registries/#{registry.slug}"
{
  "id": "0191df84-85e4-77aa-83ba-6579084728eb",
  "graphql_id": "UmVnaXN0cnktLS0wMTkxZGY4NC04NWU0LTc3YWEtODNiYS02NTc5MDg0NzI4ZWI=",
  "slug": "my-registry",
  "url": "https://api.buildkite.com/v2/packages/organizations/my-org/registries/my-registry",
  "web_url": "https://buildkite.com/organizations/my-org/registries/my-registry",
  "name": "my registry",
  "ecosystem": "ruby",
  "description": "registry containing ruby gems",
  "emoji": null,
  "color": null,
  "public": false,
  "oidc_policy": null
}

Required scope: read_registries

Success response: 200 OK

Update a registry

curl -H "Authorization: Bearer $TOKEN" \
  -X POST "https://api.buildkite.com/v2/packages/organizations/#{org.slug}/registries/#{registry.slug}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my registry",
    "description": "registry containing ruby gems"
    }' 
{
  "id": "0191df84-85e4-77aa-83ba-6579084728eb",
  "graphql_id": "UmVnaXN0cnktLS0wMTkxZGY4NC04NWU0LTc3YWEtODNiYS02NTc5MDg0NzI4ZWI=",
  "slug": "my-registry",
  "url": "https://api.buildkite.com/v2/packages/organizations/my-org/registries/my-registry",
  "web_url": "https://buildkite.com/organizations/my-org/registries/my-registry",
  "name": "my registry",
  "ecosystem": "ruby",
  "description": "registry containing ruby gems",
  "emoji": null,
  "color": null,
  "public": false,
  "oidc_policy": null
}

Optional request body properties:

name Name of the registry.
Example: my registry.
description Description of the registry.
Example: registry containing ruby gems.

Required scope: write_registries

Success response: 200 OK

Delete a registry

curl -H "Authorization: Bearer $TOKEN" \
  -X DELETE "https://api.buildkite.com/v2/packages/organizations/#{org.slug}/registries/#{registry.slug}"

Required scope: delete_registries

Success response: 200 OK