# List access grants Retrieve a paginated list of access grants for an organization, with optional filters. Returns access grants matching the specified filters. You can filter by entity type, entity ID, grantee type, and grantee ID. Results are paginated. #### Path Parameters **`organization_id`** string required The unique identifier of the organization (format: `org_*`). #### Query Parameters **`entity_type`** string optional Filter by entity type. Allowed values: `knowledge_slice`, `vector_store`, `assistant`. **`entity_id`** string optional Filter by entity ID. **`grantee_type`** string optional Filter by grantee type. Allowed values: `user`, `department`, `role`. **`grantee_id`** string optional Filter by grantee ID. **`skip`** integer optional · Defaults to `0` Number of items to skip for pagination. **`limit`** integer optional · Defaults to `20` Maximum number of items to return (1-100). ## Returns A paginated list of access grant objects with `items`, `total`, `skip`, `limit`, and `has_more` fields. Request ```bash cURL curl -s -X GET "https://api.aitronos.com/v1/organizations/org_xyz789/access/grants?entity_type=knowledge_slice&limit=10" \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") result = client.access_control.list_grants( organization_id="org_xyz789", entity_type="knowledge_slice", limit=10, ) print(result) ``` ```python Python import requests org_id = "org_xyz789" url = f"https://api.aitronos.com/v1/organizations/{org_id}/access/grants" headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"} params = {"entity_type": "knowledge_slice", "limit": 10} response = requests.get(url, headers=headers, params=params) print(response.json()) ``` ```javascript JavaScript const orgId = "org_xyz789"; const params = new URLSearchParams({ entity_type: "knowledge_slice", limit: "10" }); const response = await fetch( `https://api.aitronos.com/v1/organizations/${orgId}/access/grants?${params}`, { headers: { "Authorization": `Bearer ${accessToken}`, }, } ); const data = await response.json(); console.log(data); ``` Response ```json 200 OK { "items": [ { "id": "agrant_abc123def456", "entity_type": "knowledge_slice", "entity_id": "kslice_abc123", "grantee_type": "user", "grantee_id": "usr_def456", "access_level": "read", "granted_by": "usr_owner1", "organization_id": "org_xyz789", "created_at": "2025-06-15T10:00:00Z", "updated_at": "2025-06-15T10:00:00Z" } ], "total": 1, "skip": 0, "limit": 10, "has_more": false } ``` ```json 401 Error { "success": false, "error": { "code": "AUTHENTICATION_REQUIRED", "message": "Please log in to continue.", "system_message": "Authentication required", "type": "client_error", "status": 401, "details": {}, "trace_id": "abc-123-def", "timestamp": "2025-11-02T08:21:45Z" } } ``` ## Related Resources - [Create Grant](/docs/api-reference/access-control/create-grant) - [Bulk Create Grants](/docs/api-reference/access-control/bulk-create-grants) - [Update Grant](/docs/api-reference/access-control/update-grant) - [Revoke Grant](/docs/api-reference/access-control/revoke-grant) - [Slice Grants](/docs/api-reference/access-control/slice-grants) - [Store Grants](/docs/api-reference/access-control/store-grants) - [Assistant Grants](/docs/api-reference/access-control/assistant-grants) - [Resolved Access](/docs/api-reference/access-control/resolved-access) - [Users with Access](/docs/api-reference/access-control/users-with-access)