Skip to content

Commit

Permalink
api docs for packages show
Browse files Browse the repository at this point in the history
  • Loading branch information
ensvo committed Sep 11, 2024
1 parent 003d3f7 commit a9c1549
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,10 @@
- name: "Members"
path: "apis/rest-api/organizations/members"
pill: "beta"
- name: "Packages"
children:
- name: "Packages"
path: "apis/rest-api/packages/packages"
- name: "Pipelines "
children:
- name: "Overview"
Expand Down
38 changes: 38 additions & 0 deletions pages/apis/rest_api/packages/packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Packages API

The packages tokens API lets you create and manage packages in a registry.

## Get a package

Returns the details for a single package.

```bash
curl -H "Authorization: Bearer $TOKEN" \
-X GET "https://api.buildkite.com/v2/packages/organizations/#{org.slug}/registries/#{registry.slug}/packages/#{id}"
```

```json
{
"id": "0191e23a-4bc8-7683-bfa4-5f73bc9b7c44",
"url": "https://api.buildkite.com/v2/packages/organizations/my_great_org/registries/my-registry/packages/0191e23a-4bc8-7683-bfa4-5f73bc9b7c44",
"web_url": "https://buildkite.com/organizations/my_great_org/packages/registries/my-registry/packages/0191e23a-4bc8-7683-bfa4-5f73bc9b7c44",
"name": "banana",
"organization": {
"id": "0190e784-eeb7-4ce4-9d2d-87f7aba85433",
"slug": "my_great_org",
"url": "https://api.buildkite.com/v2/organizations/my_great_org",
"web_url": "https://buildkite.com/my_great_org"
},
"registry": {
"id": "0191e238-e0a3-7b0b-bb34-beea0035a39d",
"graphql_id": "UmVnaXN0cnktLS0wMTkxZTIzOC1lMGEzLTdiMGItYmIzNC1iZWVhMDAzNWEzOWQ=",
"slug": "my-registry",
"url": "https://api.buildkite.com/v2/packages/organizations/my_great_org/registries/my-registry",
"web_url": "https://buildkite.com/organizations/my_great_org/packages/registries/my-registry"
}
}
```

Required scope: `read_packages`

Success response: `200 OK`

0 comments on commit a9c1549

Please sign in to comment.