From edc77aab1401d5c2b024673a2ef3e208fdd77831 Mon Sep 17 00:00:00 2001 From: Elizabeth Vo <65384387+ensvo@users.noreply.github.com> Date: Wed, 11 Sep 2024 15:29:04 +0900 Subject: [PATCH 1/3] api docs for registry show --- pages/apis/rest_api/packages/registries.md | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/pages/apis/rest_api/packages/registries.md b/pages/apis/rest_api/packages/registries.md index 33d84ee184..33b264021b 100644 --- a/pages/apis/rest_api/packages/registries.md +++ b/pages/apis/rest_api/packages/registries.md @@ -33,3 +33,33 @@ curl -H "Authorization: Bearer $TOKEN" \ Required scope: `read_registries` Success response: `200 OK` + +## Get a registry + +Returns the details for a single registry, looked up by its slug. + +```bash +curl -H "Authorization: Bearer $TOKEN" \ + -X GET "https://api.buildkite.com/v2/packages/organizations/#{org.slug}/registries/#{registry.slug}" +``` + +```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": "registry containing ruby gems", + "emoji": null, + "color": null, + "public": false, + "oidc_policy": null +} +``` + +Required scope: `read_registries` + +Success response: `200 OK` \ No newline at end of file From 77f9ad5665a2d074743247aca4cb03f335266b5d Mon Sep 17 00:00:00 2001 From: Elizabeth Vo <65384387+ensvo@users.noreply.github.com> Date: Wed, 11 Sep 2024 16:00:51 +0900 Subject: [PATCH 2/3] api docs for registry create --- pages/apis/rest_api/packages/registries.md | 56 ++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) 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 . |
---|