Announce Update
از این سرویس برای ویرایش آوای بخش تماس انبوه استفاده میشود.
پارامترها
| پارامترها | پارامترهای ضروری[**]/منطقی[*] | دادههای نمونه | توضیحات | دادههای تعریف شده |
|---|---|---|---|---|
| id_ | ** | 6033876dc92de036d1390923 | شناسه یکتا آوا که از جستوجو به دست میآید | - |
| name | * | test_sound_new | نام آوا | - |
| filename | * | file-20200825065434-58826-bbc-farsi-pargarmp3_. wav | نام فایل | - |
| description | - | Just for test | توضیحات | - |
نمونه فراخوانی
Example Code
PHP
<?php
$curl = curl_init ();
curl_setopt_array ($curl, array (CURLOPT_URL => "http: //192. 168. 51. 21/API/v4/autodialer/announcements/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS =>"{\r\n \"_id\": \"6033876dc92de036d1390923\",\r\n \"name\": \"test_sound_new\",\r\n \"filename\": \"file-20200825065434-58826-bbc-farsi-pargarmp3_. wav\",\r\n \"description\": \"Just for test\"\r\n}",
CURLOPT_HTTPHEADER => array ("X-APIKEY: SAMPLE_API_KEY",
"Authorization: Basic dGVzdDpBYTEyMzQ1Ng==",
"Content-Type: application/JSON"),));
$response = curl_exec ($curl);
if (! curl_errno ($curl)) {
$httpcode = curl_getinfo ($curl, CURLINFO_HTTP_CODE);
echo 'response code: '. $httpcode, '<br/>';
}
curl_close ($curl);
echo $response;
?>
JavaScript
<html>
<head>
<script src="https: //ajax. googleAPIs. com/ajax/libs/jquery/3. 5. 1/jquery. min. js"></script>
</head>
<body>
<script>
var settings = {
"url": "http: //192. 168. 51. 21/API/v4/autodialer/announcements/update",
"method": "POST",
"timeout": 0,
"headers": {
"X-APIKEY": "vZKtIKWsld0egNlkzHo8i5LVBqLNBSWARCQsPOSgDjFmAHM3tG",
"Authorization": "Basic dGVzdDpBYTEyMzQ1Ng==",
"Content-Type": "application/JSON"
},
"data": JSON. stringify ({
"_id": "6033876dc92de036d1390923",
"name": "test_sound_new",
"filename": "file-20200825065434-58826-bbc-farsi-pargarmp3_. wav",
"description": "Just for test"
}),
};
$. ajax (settings). always (function (jqXHR) {
console. log ("response code: " + jqXHR. status + " " + jqXHR. statusText);
console. log ("response body: " + jqXHR. responseText);
});
</script>
</body>
</html>
cURL
curl --location --request POST 'http: //192. 168. 51. 21/API/v4/autodialer/announcements/update' \
--header 'X-APIKEY: SAMPLE_API_KEY' \
--header 'Authorization: Basic dGVzdDpBYTEyMzQ1Ng==' \
--header 'Content-Type: application/JSON' \
--data-raw '{
"_id": "6033876dc92de036d1390923",
"name": "test_sound_new",
"filename": "file-20200825065434-58826-bbc-farsi-pargarmp3_. wav",
"description": "Just for test"
}'
```
</details>
</details>
</div>
</details>
<details><summary>Example Output</summary>
```shell
{
"success": 1,
"message": "Requested operation is done successfully",
"data": ""
}