EndpointsList package grants

packages

List package grants

Lists the customer Workspaces that hold a grant to your Package, newest grant first: each Workspace ID, the version it redeemed, the Offer and redemption time that granted it, and when. Use the Workspace ID to revoke a grant. Requires package.grants.list in the Package's Workspace.

GET/packages/{id}/grants
Authorizationstringheaderrequired

Bearer token for the authenticated caller.

Optional workspace/scope context for the request. Carries a single workspace wire id (ws_…) today. Only needed for broad tokens - a workspace-owned token implies its workspace.

Required string length: 1 - 53

Example: "ws_j572abc123def4"

idstringrequired

Package ID

Required string length: 1 - 54

Example: "pkg_j572abc123def456"

cursorstring

Pagination cursor from a previous response's next_cursor.

Maximum string length: 512

limitintegerdefault:50

Grants per page (1-100, default 50)

Required range: 1 <= x <= 100

Response

application/json

Grants, newest first

dataobject[]required
child attributes
data.workspace_idstringrequired

The customer Workspace that holds the grant.

Required string length: 2 - 53

Example: "ws_9177x8shcx0niswcn"

data.versionstringrequired

The version the customer redeemed. The grant covers every published version of the Package.

Required string length: 1 - 128

Pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9]\d*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$

data.offer_idstring | nullrequired

The Offer whose redemption granted access, or null for a grant made before Akua recorded it.

Required string length: 4 - 56

data.redeemed_atinteger | nullrequired

When the customer redeemed the Offer (Unix seconds), or null like offer_id. Unix timestamp (seconds)

Required range: x >= 0

data.granted_atintegerrequired

Unix timestamp (seconds)

Required range: x >= 0

has_morebooleanrequired

True if more grants exist after this page.

next_cursorstring | nullrequired

Opaque cursor for the next page, or null if no more pages.