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", "team_ids": [ "team-one-uuid", "team-two-uuid" ], "oidc_policy": [ { "iss": "https://agent.buildkite.com", "claims": { "organization_slug": "my-org", "pipeline_slug": { "in": ["my-pipeline", "my-other-pipeline"] } } } ] }' { "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". |
team_ids | The IDs of one or more teams who will be granted access to this registry. Required only when the teams feature has been enabled. Example: [ "2a1ac413-a56c-4aaa-aede-dc49bb46d00f", "5916fed1-1fbb-4a8d-9791-5b3fa0b5d269" ]. |
Optional request body properties:
description | Description of the registry. Default value: null. |
|---|---|
emoji | Emoji for the registry using the emoji syntax. Example: ":sunflower:". |
color | Color hex code for the registry. Example: "#f0ccff". |
oidc_policy | A policy matching a basic or more complex OIDC policy format. Can be either stringified YAML, or a JSON array of policy statements. 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", "oidc_policy": [ { "iss": "https://agent.buildkite.com", "claims": { "organization_slug": "my-org", "pipeline_slug": { "in": ["my-pipeline"] } } } ] }' { "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. |
oidc_policy | A policy matching a basic or more complex OIDC policy format. Can be either stringified YAML, or a JSON array of policy statements. Be aware that if you are modifying an existing OIDC policy, the entire revised OIDC policy needs to be re-posted in this update request. Default value: null. |
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