List of administrator roles
Getting the list of administrator roles
GET /api/admin/v1/roles |
Method parameters
int
per_page, number of items per pagination page. Default is 25
string
type, role type
int
exclude, array of role IDs to exclude
bool
permissions, include permissions in the role object
int
page, pagination page number
200 |
Successful response
JSON
|
401 |
Authorization token is not provided or is invalid. Obtaining a token |
cURL
BASH
curl -k --request POST \
--url 'https://your-domain/api/admin/v1/roles' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"per_page": 0,
"type": "string",
"exclude": 0,
"permissions": true,
"page": 0
}'
PHP
PHP
$data = array (
'per_page' => 0,
'type' => 'string',
'exclude' => 0,
'permissions' => true,
'page' => 0,
);
$context = stream_context_create([
'ssl'=>['verify_peer' => false],
'http' => [
'method' => 'GET',
'header' => "Content-Type: application/json\r
Accept: application/json",
'content'=>json_encode($data)
]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/roles', false, $context);