Skip to content

Commit

Permalink
Merge pull request #59 from buildkite/document-copy-api-package-types
Browse files Browse the repository at this point in the history
Document packages#copy api supported package types
  • Loading branch information
gilesgas authored Oct 8, 2024
2 parents d908f92 + 7b18840 commit 96b78b2
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion pages/apis/rest_api/packages/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,28 @@ Success response: `200 OK`

## Copy a package

Copies a package from a source registry to a destination registry.
For some supported [package ecosystems](/docs/packages/ecosystems), copies a package from a source registry to a destination registry.

```bash
curl -H "Authorization: Bearer $TOKEN" \
-X POST "https://api.buildkite.com/v2/packages/organizations/{org.slug}/registries/{source_registry.slug}/packages/{package.id}/copy?to={destination_registry.slug}"
-H "Content-Type: application/json"
```

Currently, this REST API call only supports package types belonging to the following package ecosystems:

- [Alpine (apk)](/docs/packages/alpine)
- [Debian/Ubuntu (deb)](/docs/packages/debian)
- [Files (generic)](/docs/packages/files)
- [JavaScript (npm)](/docs/packages/javascript)
- [Python (PyPI)](/docs/packages/python)
- [Red Hat (RPM)](/docs/packages/red-hat)
- [Ruby (RubyGems)](/docs/packages/ruby)

If you wish this feature to be available for package types belonging to other package ecosystems, please contact [support](https://buildkite.com/support).

The following type of response is returned by Buildkite upon a successful `curl` copying event.

```json
{
"id": "0191e23a-4bc8-7683-bfa4-5f73bc9b7c44",
Expand Down

0 comments on commit 96b78b2

Please sign in to comment.