Get a package
Get one package by its package_type and package_name (URL-encode a slash in a REST path: web%2Fworker).
GET
/workspaces/{workspace}/packages/{package_type}/{package_name}Not found when you may not pull it, as for one that does not exist.
A name with a slash is one URL-encoded path segment: /workspaces/acme/packages/container/web%2Fworker. Not found when you may not pull it.
- Authentication: Optional. Public data can be read without a token; send one to see what is private.
- MCP tool:
packagewithactionget, 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”. |
package_type |
string | Yes | The registry: container (also docker), npm, cargo, maven, nuget, rubygems or composer. One of container, npm, cargo, maven, nuget, rubygems, composer. |
package_name |
string | Yes | The package’s name without the workspace: web for g1t.sh/acme/web, web/worker for an image with more parts, group:artifact for Maven. |
Example request
Section titled “Example request”curl https://api.g1t.sh/workspaces/acme/packages/npm/ui \ -H "Authorization: Bearer $G1T_TOKEN"Example response
Section titled “Example response”A successful request answers 200 with:
{ "id": "pkg_01kq7b4e6g8j0m2p4r6t8v0x2z", "name": "ui", "package_type": "npm", "workspace": "acme", "address": "g1t.sh/-/npm/@acme/ui", "visibility": "public", "repository": { "id": "rep_01kpw0b3d5f7h9k1m3p5r7t9v1", "name": "ui", "full_name": "acme/ui" }, "description": "Acme's design system components.", "version_count": 4, "latest": "2.1.0", "size_in_bytes": 391204, "download_count": 9213, "inherit_access": true, "created_at": "2026-08-02T09:30:00.000Z", "updated_at": "2026-10-07T16:44:02.000Z", "deleted_at": null, "deleted_by": null, "purge_at": null, "html_url": "https://g1t.sh/acme/-/packages/npm/ui"}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. |