Function returns all rights
https://rest.crmango.com/api/GetAllRights
Bearer
varchar
Auth token
This endpoint takes no body parameters
Function returns all rights
id
integer
Record ID
name
varchar
Right name
curl --request GET \
--url 'https://rest.crmango.com/api/GetAllRights' \
--header 'Authorization: Bearer auth_token'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest.crmango.com/api/GetAllRights',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer auth_token'
),
));
$response = curl_exec($curl);
echo $response;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://rest.crmango.com/api/GetAllRights");
xhr.setRequestHeader("Authorization", "Bearer auth_token");
xhr.send();
import requests
url = "https://rest.crmango.com/api/GetAllRights"
payload = {}
headers = {
'Authorization': 'Bearer auth_token'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
{
"code": 200,
"response": [
{
"id": 1,
"name": "Admin"
},
{
"id": 2,
"name": "Obchodnik"
},
{
"id": 3,
"name": "Montaz"
},
{
"id": 4,
"name": "Back-office"
},
{
"id": 21,
"name": "Vedenie"
}
]
}
{
"code": "int",
"message": "string"
}