Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PKG-7403] - API docs for registries create #2968

Merged
merged 4 commits into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion pages/apis/rest_api/packages/registries.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):

<table class="responsive-table">
<tbody>
<tr><th><code>name</code></th><td>Name of the new registry.<br><em>Example:</em> <code>"my registry"</code>.</td></tr>
<tr><th><code>ecosystem</code></th><td>Registry ecosystem based on the <a href="/docs/packages#get-started">package ecosystem</a> for the new registry.<br><em>Example:</em> <code>"ruby"</code>.</td></tr>
</tbody>
</table>

Optional [request body properties](/docs/api#request-body-properties):

<table class="responsive-table">
<tbody>
<tr><th><code>description</code></th><td>Description of the registry.<br><em>Default value:</em> <code>null</code>.</td></tr>
</tbody>
</table>

Required scope: `write_registries`

Success response: `200 OK`

## List all registries

Returns a list of an organization's registries.
Expand All @@ -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,
Expand Down
Loading