ACL Add
Dodanie nowego ACL
POST /conference-bridge/{conference_bridge_id}/room/{room_id}/acl
URL Parameters
Nazwa | Rodzaj | Przykład | Opis |
---|---|---|---|
conference_bridge_id | <INTEGER> |
5 | Identyfikator Mostka konferencyjnego |
room_id | <INTEGER> |
11 | Identyfikator Pokoju konferencyjnego |
Body
{
"data": <ConferenceRoomACL>
}
Nazwa | Rodzaj | Opis | Zasób |
---|---|---|---|
data | <ConferenceRoomACL> |
Obiekt | ConferenceRoomACL |
Response Body
{
"data": <ConferenceRoomACL>
}
Response Code
Status | Opis |
---|---|
200 | Żądanie przyjęte do realizacji |
403 | Nie można wykonać takiej akcji |
404 | Nie znaleziono zasobu |
Example
curl -X POST \
$CONPEEK_URL/conference-bridge/5/room/11/acl \
-H 'Authorization: '$CONPEEK_KEY \
-H 'Content-Type: application/json' \
-d '{"data": {
"access_mode": "MEMBER",
"check_mode": "PIN",
"check_value": "1111"
}}'
import requests
import json
import os
from urllib import parse
url = parse.urljoin(os.environ["CONPEEK_URL"], "/conference-bridge/%(bridge_id)s/room/%(room_id)s/acl" % {
"bridge_id": "5",
"room_id": "11"
})
payload = {
"data": {
"access_mode": "MEMBER",
"check_mode": "PIN",
"check_value": "1111"
}
}
headers = {
'Content-Type': "application/json",
'Authorization': os.environ["CONPEEK_KEY"]
}
response = requests.request("POST", url, data=json.dumps(payload), headers=headers)
print(response.text)
<?php
$curl = curl_init();
$payload = array(
"data" => array(
"access_mode" => "MEMBER",
"check_mode" => "PIN",
"check_value" => "1111"
)
);
$conference_bridge_id = "5";
$room_id = "11";
curl_setopt_array($curl, array(
CURLOPT_URL => getenv("CONPEEK_URL")."/conference-bridge/$conference_bridge_id/room/$room_id/acl",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode($payload),
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;
}