Get a package version
Get one version of a package by its id (ver_…), its version, its digest, or a tag that points to it.
GET
/workspaces/{workspace}/packages/{package_type}/{package_name}/versions/{version_id}version_id is the version’s id (ver_…), its version, its digest, or a tag that points to it.
- Authentication: Optional. Public data can be read without a token; send one to see what is private.
- MCP tool:
packagewithactionget_version, 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. |
version_id |
string | Yes | The version’s id (ver_…), its version, its digest, or a tag that points to it. |
Example request
Section titled “Example request”curl https://api.g1t.sh/workspaces/acme/packages/npm/ui/versions/2.1.0 \ -H "Authorization: Bearer $G1T_TOKEN"Example response
Section titled “Example response”A successful request answers 200 with:
{ "id": "ver_01kq9c6g8j0m2p4r6t8v0x2z4b", "name": "2.1.0", "digest": "sha256:3c5e7b9d2f4a6c8e0b1d3f5a7c9e2b4d6f8a0c1e3b5d7f9a2c4e6b8d0f1a3c5e", "size_in_bytes": 97412, "download_count": 2204, "tags": [ "latest" ], "media_type": null, "artifact_type": null, "subject": null, "platforms": [], "published_by": "bo", "created_at": "2026-10-07T16:44:02.000Z", "deprecated": null, "deleted_at": null, "deleted_by": null, "purge_at": null}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. |