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): + + + + + + +
nameName of the new registry.
Example: "my registry".
ecosystemRegistry ecosystem based on the package ecosystem for the new registry.
Example: "ruby".
+ +Optional [request body properties](/docs/api#request-body-properties): + + + + + +
descriptionDescription of the registry.
Default value: null.
+ +Required scope: `create_registries` + +Success response: `200 OK` + ## List all registries Returns a list of an organization's registries. @@ -21,7 +71,7 @@ curl -H "Authorization: Bearer $TOKEN" \ "web_url": "https://buildkite.com/organizations/my-org/packages/registries/my-registry", "name": "my registry", "ecosystem": "ruby", - "description": "registry containing ruby gems", + "description": null, "emoji": null, "color": null, "public": false, @@ -52,7 +102,7 @@ curl -H "Authorization: Bearer $TOKEN" \ "web_url": "https://buildkite.com/organizations/my-org/registries/my-registry", "name": "my registry", "ecosystem": "ruby", - "description": "registry containing ruby gems", + "description": null, "emoji": null, "color": null, "public": false, @@ -62,4 +112,4 @@ curl -H "Authorization: Bearer $TOKEN" \ Required scope: `read_registries` -Success response: `200 OK` \ No newline at end of file +Success response: `200 OK`