Read Project Has Consultant
Pobranie ustawień konsultantów w projekcie
GET /project/{project_id}/user
URL Parameters
Nazwa | Rodzaj | Przykład | Opis |
---|---|---|---|
project_id | <STRING> |
18 | Identyfikator systemowy projektu |
Response Body
{
"data": <LIST<ProjectHasConsultant>>
}
Nazwa | Rodzaj | Opis | Zasób |
---|---|---|---|
data | <LIST<<ProjectHasConsultant>> |
Lista Obiektów ustawień konsultantów w projekcie. | ProjectHasConsultant |
Response Code
Status | Opis |
---|---|
200 | Rekord został pobrany pomyślnie |
403 | Nie można wykonać takiej akcji |
404 | Nie znaleziono zasobu |
Example
curl -X GET \
$CONPEEK_URL/project/18/user \
-H 'Authorization: '$CONPEEK_KEY \
-H 'Content-Type: application/json'
import requests
import os
from urllib import parse
url = parse.urljoin(os.environ["CONPEEK_URL"], "/project/%(project_id)s/user" % {
"project_id": "18"
})
headers = {
'Content-Type': "application/json",
'Authorization': os.environ["CONPEEK_KEY"]
}
response = requests.request("GET", url, headers=headers)
print(response.text)
<?php
$curl = curl_init();
$project = "18";
curl_setopt_array($curl, array(
CURLOPT_URL => getenv("CONPEEK_URL")."/project/$project/user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: ".getenv("CONPEEK_KEY"),
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Response
200 OK
{
"data": [
{
"accept_chat": 1,
"accept_audio": 1,
"accept_video": 0,
"state": "BLENDING",
"tenant_user_id": 52,
"tenant_user_name": "jkowalski",
"project_id": 18,
"project_name": "Web Info",
"project_state": "STARTED"
},
{
"accept_chat": 0,
"accept_audio": 1,
"accept_video": 0,
"state": "INBOUND",
"tenant_user_id": 53,
"tenant_user_name": "abc",
"project_id": 18,
"project_name": "Web Info",
"project_state": "STARTED"
}
]
}