---
title: "List grants"
method: GET
path: "/v2/grants"
tags: ["Grants"]
---

# List grants

`GET /v2/grants`

## Request

- Base URL: `https://api.sigmacomputing.com`
- URL: `https://api.sigmacomputing.com/v2/grants`
- Auth: HTTP bearer

List all grants for a given object.

  ### Usage notes

  You can specify one of the following:

  - A user by userId. Retrieve the **userId** by calling the [/v2/members](https://help.sigmacomputing.com/reference/list-members) endpoint and using the `memberId` included in the response.
  - A team by teamId. Retrieve the **teamId** by calling the [/v2/teams](https://help.sigmacomputing.com/reference/list-teams) endpoint.
  - A document (such as a workbook, report, data model, or dataset (deprecated)), folder, or workspace by inodeId.
    - Retrieve the **inodeId** by calling the [/v2/files](https://help.sigmacomputing.com/reference/list-files) endpoint and using the `id` included in the response.
    - Retrieve the **inodeId** for a data model by calling the [/v2/dataModels](https://help.sigmacomputing.com/reference/list-data-models) endpoint and using the `dataModelId` included in the response.

  ### Usage scenarios
  - **Manage inherited permissions**: Identify files and folders that have permissions directly granted to them.
  - **Review long-lived permissions**: Audit permissions granted more than a year ago and determine if they are still needed.

## Query parameters

- `page` string
- `limit` number, double
- `inodeId` string
- `teamId` string
- `userId` string
- `directGrantsOnly` boolean

## Response `200`

The response body.

- GrantsListGrantsResponse200
  - `entries` V2GrantsGetResponsesContentApplicationJsonSchemaEntriesItems[], required: Array of results returned by the endpoint
    - `grantId` string, required: The unique identifier of the grant
    - `inodeId` string, required: The unique identifier of the inode
    - `organizationId` string, required: The unique identifier of the organization
    - `memberId` string, nullable, required: The unique identifier of the member
    - `teamId` string, nullable, required: The unique identifier of the team
    - `permission` union, required: The permission granted to the member
      - 'admin' | 'annotate' | 'update' | 'usage' | 'writeback': Valid inode types: table, connection database, and connection schema.
      - 'create' | 'annotate' | 'organize' | 'explore' | 'view' | 'edit' | 'apply': Valid inode types: folder, workspace, workbook, dataset, and data model. Can Contribute permissions are listed as **organize** and Can Manage permissions are listed as **edit**.
      - 'view' | 'edit' | 'apply': Valid inode types: version tag.
    - `createdBy` string, required: The identifier of the user who created this grant
    - `updatedBy` string, required: The identifier of the user or process that last updated this grant
    - `createdAt` string, date-time, required: When the grant was created
    - `updatedAt` string, date-time, required: When the grant was last updated
    - `inodeType` 'folder' | 'customFunction' | 'symlink' | 'versionTag' | 'worksheet' | 'block' | 'dashboard' | 'report' | 'table' | 'semanticView' | 'metricView' | 'scope' | 'sql' | 'workbook' | 'template' | 'dataset' | 'datafile' | 'storedProcedure' | 'apiConnector' | 'apiConnectorAuth' | 'mcpConnector' | 'warehouseAgent' | 'agentSkill' | 'tlsProfile' | 'schedule' | 'application' | 'appBranch', required
  - `nextPage` string, nullable, required: Returns a string that can be used as the `page` parameter in the next request to fetch the next page of results. The last page of results returns `null`.
  - `total` number, double: Total number of results. Useful to determine if there is a need to paginate.
  - `hasMore` boolean: **[Deprecated]** Indicates whether more results are available.

---

[API](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api.md) - [All operations](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/revisions/fb6036208c49?raw)
