Read permissions
This endpoint allows you to view the current permissions for a specific access on resources of a given type.
Endpoint
POST /user/v1/authz/{access}/permissions/read
Prerequisites
- Valid API token authentication
- Required roles:
WEBSERVICE_USER_RWandWEBSERVICE_DNS_R - The access must belong to the user's scope
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
| access | Path | Yes | String | ID of the access |
| permissions | Body | Yes | Array | List of resources to check permissions for |
Validation constraints
permissions.*.resource.type: Required - Resource typepermissions.*.resource.ids: Optional - Array of resource IDs- If present: minimum 1 element, maximum 50 elements
- Values must be unique
permissions.*.resource.ids.*: String
Response
A structured object containing permissions for each requested resource.
Example request
List permissions for specific zones
{
"permissions": [
{
"resource": {
"type": "zone",
"ids": ["example.com", "test.com"]
}
}
]
}
List all permissions of type "zone" for this access
{
"permissions": [
{
"resource": {
"type": "zone"
}
}
]
}
Example response
{
"permissions": {
"zone": {
"example.com": [
"can_view_zone_content",
"can_edit_zone_content"
],
"test.com": [
"can_view_zone_content"
]
}
},
"message": "OK"
}
Error handling
- Success: HTTP 200 with
"message": "OK" - Error: HTTP 400 with details in the
errorsfield