Skip to content

Commit

Permalink
api docs for registry update
Browse files Browse the repository at this point in the history
  • Loading branch information
ensvo committed Sep 11, 2024
1 parent 49e5edd commit cb5e072
Showing 1 changed file with 47 additions and 4 deletions.
51 changes: 47 additions & 4 deletions pages/apis/rest_api/packages/registries.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ curl -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "my registry",
"ecosystem": "ruby"
"ecosystem": "ruby",
"description": "registry containing ruby gems"
}'
```

Expand All @@ -23,7 +24,7 @@ curl -H "Authorization: Bearer $TOKEN" \
"web_url": "https://buildkite.com/organizations/my-org/registries/my-registry",
"name": "my registry",
"ecosystem": "ruby",
"description": null,
"description": "registry containing ruby gems",
"emoji": null,
"color": null,
"public": false,
Expand Down Expand Up @@ -71,7 +72,7 @@ curl -H "Authorization: Bearer $TOKEN" \
"web_url": "https://buildkite.com/organizations/my-org/packages/registries/my-registry",
"name": "my registry",
"ecosystem": "ruby",
"description": null,
"description": "registry containing ruby gems",
"emoji": null,
"color": null,
"public": false,
Expand Down Expand Up @@ -102,7 +103,7 @@ curl -H "Authorization: Bearer $TOKEN" \
"web_url": "https://buildkite.com/organizations/my-org/registries/my-registry",
"name": "my registry",
"ecosystem": "ruby",
"description": null,
"description": "registry containing ruby gems",
"emoji": null,
"color": null,
"public": false,
Expand All @@ -112,4 +113,46 @@ curl -H "Authorization: Bearer $TOKEN" \

Required scope: `read_registries`

Success response: `200 OK`

## Update a registry

```bash
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"
}'
```

```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
}
```

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

<table class="responsive-table">
<tbody>
<tr><th><code>name</code></th><td>Name of the registry.<br><em>Example:</em> <code>my registry</code>.</td></tr>
<tr><th><code>description</code></th><td>Description of the registry.<br><em>Example:</em> <code>registry containing ruby gems</code>.</td></tr>
</tbody>
</table>

Required scope: `write_registries`

Success response: `200 OK`

0 comments on commit cb5e072

Please sign in to comment.