diff --git a/pages/apis/rest_api/packages/registries.md b/pages/apis/rest_api/packages/registries.md index 33b264021b..b5c37cbad1 100644 --- a/pages/apis/rest_api/packages/registries.md +++ b/pages/apis/rest_api/packages/registries.md @@ -2,6 +2,56 @@ The registries API lets you create and manage registries in your organization. +## Create a registry + +```bash +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" + }' +``` + +```json +{ + "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": null, + "emoji": null, + "color": null, + "public": false, + "oidc_policy": null +} +``` + +Required [request body properties](/docs/api#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" . |
description | Description of the registry. Default value: null . |
---|