Skip to main content

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_RW and WEBSERVICE_DNS_R
  • The access must belong to the user's scope

Parameters

NameLocationRequiredTypeDescription
accessPathYesStringID of the access
permissionsBodyYesArrayList of resources to check permissions for

Validation constraints

  • permissions.*.resource.type: Required - Resource type
  • permissions.*.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 errors field