Permissions
1 API call in this section.
List Permissions
/permissionsRetrieves a paginated list of permissions with optional filtering by role ID, scope, and search term.
Response Behavior
When
role_idis provided: Returns permissions assigned to the specified roleWhen
scopeis provided: Returns permissions filtered by the specified scopeWhen
searchis provided: Returns only permissions whose name or description contains the search termWhen neither filter is provided: Returns all permissions ordered by name
Frontend Integration Contract
Endpoint:
GET /permissionsTo search tenant permissions, call
/permissions?language=en&scope=tenant&search=<term>&page=1&limit=100Read filtered results from
permissions; usetotal,page, andlimitfrom the same filtered query for paginationEmpty matches return
success: true,permissions: [], andtotal: 0
Query parameters
| Parameter | Type | Description |
|---|---|---|
languageOptional | string | Language code for response localization (Optional, default: en) Language code for localized response messages ( Example: |
pageOptional | string | Page number for pagination (Optional, default: 1) Page number for pagination (default: 1) Example: |
limitOptional | string | Number of records per page (Optional, default: 10) Number of records per page (default: 10) Example: |
role_idOptional | string | Filter permissions by role ID (Optional) |
scopeOptional | string | Filter permissions by scope (Optional, |
searchOptional | string | Search permissions by name or description (Optional, case-insensitive, applied before pagination) Case-insensitive search across permission |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/permissions?language=en&page=1&limit=10&role_id=&scope=&search=" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "message": "Permissions retrieved successfully",4 "permissions": [5 {6 "id": "perm-001",7 "name": "create:users",8 "description": "Create new users",9 "scope": "system"10 },11 {12 "id": "perm-002",13 "name": "delete:users",14 "description": "Delete existing users",15 "scope": "system"16 },17 {18 "id": "perm-003",19 "name": "manage:tenants",20 "description": "Manage tenant organizations",21 "scope": "system"22 }23 ],24 "total": 42,25 "page": 1,26 "limit": 1027}