Understanding How The API Works »
Checking the permissions of the currently logged in user via the API requires specific syntax depending on whether you are using REST or SOAP. Use this table to find the syntax for your command.
REST Syntax
Click to view all REST Resources |
CheckPermissionReport/ POST — Returns a list of allowed and forbidden permissions for the currently logged in user based on the provided permissions array.
HTTP Action — POST
URI — https://api.dynect.net/REST/CheckPermissionReport/
|
Arguments:
array permission — Required. A list of permissions to check against the current user.
string zone_name — Optional. Zone_name to check whether the logged in user has permissions.
|
Response — Click for More Info
- hash
data
- array
allowed — A list of allowed permissions:
- string
name — The name of the permission.
- array
reason — A list of permission groups containing this permission.
- array
forbidden — A list of forbidden permissions:
- string
name — The name of the permission.
- array
reason — A list of permission groups containing this permission.
- string
admin_override — Identifies if the requesting user is an account administrator.
Valid values:
1 — The requesting user is an account administrator.
0 — The requesting user is NOT an account administrator.
|
SOAP Syntax
Click to view all SOAP Commands |
CheckPermissions — Returns a list of allowed and forbidden permissions for the currently logged in user based on the provided permissions array.
|
Arguments:
string token — Required. The session identifier.
array permission — Required. A list of permissions to check against the current user.
string zone_name — Optional. Zone_name to check whether the logged in user has permissions.
|
Response — Click for More Info
- hash
data
- array
allowed — A list of allowed permissions:
- string
name — The name of the permission.
- array
reason — A list of permission groups containing this permission.
- array
forbidden — A list of forbidden permissions:
- string
name — The name of the permission.
- array
reason — A list of permission groups containing this permission.
- string
admin_override — Identifies if the requesting user is an account administrator.
Valid values:
1 — The requesting user is an account administrator.
0 — The requesting user is NOT an account administrator.
|
Example Request — Click for More Info
{
'token' => 'asdlkfjasl23j4879afa',
'permission' => [ 'RecordGet', 'ZoneGet' ],
'zone_name' => 'test.com',
}
|
<< DNS API Knowledge Base