v44

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-20129390589.6 KB
Grants

List grants

⚠️ This endpoint is in public preview.

List grants, optionally filtered by workspace or principal. Callers without grant:list + grant:read are restricted to grants whose principal is themselves.

get/preview/v2/grants

Query parameters

workspace_idstring
Example:wksp_k3R-nX9vLm7Qp2Yw5Jd8F
principal_idstring

Either a usr_* / legacy user id or a tokn_* token id.

Response

Grants listed.

object'list' required

Example response

{
  "object": "list",
  "data": [
    {
      "principal_id": "my-resource-name",
      "object": "grant",
      "id": "grnt_k3R-nX9vLm7Qp2Yw5Jd8F",
      "workspace": {
        "id": "wksp_k3R-nX9vLm7Qp2Yw5Jd8F",
        "name": "my-resource-name"
      },
      "role": {
        "id": "role_k3R-nX9vLm7Qp2Yw5Jd8F",
        "name": "my-resource-name"
      },
      "created_at": 1738972800
    }
  ]
}