List a workspace's packages
List a workspace's packages you may pull, most recently updated first: each with its id, name, package_type, address (what a client is given, such as g1t.sh/acme/web), visibility, the repository it is linked to, version_count, latest, size_in_bytes, download_count, inherit_access and html_url.
/workspaces/{workspace}/packagesNarrow with package_type and q (part of the name). With state deleted, its deleted packages that can still be restored instead, those you administer, each with deleted_at, deleted_by and purge_at. Public packages are open to anyone.
Only packages you may pull are listed. With state=deleted, the workspace’s deleted packages you administer that can still be restored, each with deleted_at, deleted_by and purge_at.
- Authentication: Optional. Public data can be read without a token; send one to see what is private.
- MCP tool:
packagewithactionlist, and the same inputs - Scope: An access token needs
packages:read.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
workspace |
string | Yes | The workspace’s slug, e.g. “flagon-io”. |
Query parameters
Section titled “Query parameters”| Name | Type | Required | Description |
|---|---|---|---|
package_type |
string | No | The registry: container (also docker), npm, cargo, maven, nuget, rubygems or composer. One of container, npm, cargo, maven, nuget, rubygems, composer. |
q |
string | No | Only packages whose name holds this. |
state |
string | No | active (the default), or deleted: deleted packages that can still be restored. One of active, deleted. |
Example request
Section titled “Example request”curl "https://api.g1t.sh/workspaces/acme/packages?package_type=container" \ -H "Authorization: Bearer $G1T_TOKEN"Example response
Section titled “Example response”A successful request answers 200 with:
[ { "id": "pkg_01kq7b3d5f7h9k1m3p5r7t9v1x", "name": "web", "package_type": "container", "workspace": "acme", "address": "g1t.sh/acme/web", "visibility": "private", "repository": { "id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0", "name": "web", "full_name": "acme/web" }, "description": null, "version_count": 12, "latest": "latest", "size_in_bytes": 48211932, "download_count": 1840, "inherit_access": true, "created_at": "2026-09-14T10:02:11.000Z", "updated_at": "2026-10-08T14:05:20.000Z", "deleted_at": null, "deleted_by": null, "purge_at": null, "html_url": "https://g1t.sh/acme/-/packages/container/web" }]Errors
Section titled “Errors”A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.
| Status | Code | When |
|---|---|---|
| 401 | unauthenticated |
A token is required, or the one sent is not valid. |
| 403 | forbidden |
The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository. |
| 404 | not_found |
It does not exist, or you cannot see it. |
| 422 | invalid |
The input is not valid. message says which field and why. |