API ReferencePermissions
List Permissions
List permission tuples with optional filtering by namespace, object, relation, or subject.
Endpoint
GET /v1/permissionsBase URL: https://api-id.avnology.net
Authentication: API Key or OAuth token with admin:permissions:read scope
Request
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
namespace | string | No | Filter by resource type |
object | string | No | Filter by resource ID |
relation | string | No | Filter by relation |
subject | string | No | Filter by subject |
page_size | integer | No | Results per page (default: 25) |
page_token | string | No | Cursor for pagination |
Example Request
curl -G "https://api-id.avnology.net/v1/permissions" \
--data-urlencode 'namespace=organizations' \
--data-urlencode 'object=org_7a2b3c4d' \
-H "Authorization: Bearer ak_live_..."Response
Success (200 OK)
{
"permissions": [
{ "namespace": "organizations", "object": "org_7a2b3c4d", "relation": "owner", "subject": "identities:usr_4f18acec" },
{ "namespace": "organizations", "object": "org_7a2b3c4d", "relation": "admin", "subject": "identities:usr_7b2c3d4e"
Code Examples
JavaScript (fetch)
async function listPermissions(apiKey, namespace, object) {
const url = new URL('https://api-id.avnology.net/v1/permissions');
if (namespace) url.searchParams.set('namespace', namespace);
if (object) url.searchParams.set('object'
Python (httpx)
import httpx
def list_permissions(api_key: str, namespace: str = "", object_id: str = "") -> dict:
params = {}
if
Go (net/http)
func listPermissions(ctx context.Context, apiKey, namespace, object string) (*ListPermissionsResponse, error) {
u, _
Related
- Check Permission -- check a specific permission
- Grant Permission -- create a new permission
- SDK:
client.permissions.list({ namespace, object })(TypeScript)