Script update
Script update
PUT /api/admin/v1/scripts/{script} |
Method parameters
int
script, unique identifier of the script
int
event_id, ID of an existing event
int
reaction_id, ID of the reaction
array
users, array of IDs of existing users who will receive push notifications when the script is triggered
array
schedule, schedule on which the script will operate
object array
date
schedule. REQUIRED, .ranges.*.to end time of the time interval
date
schedule. REQUIRED, .ranges.*.to end time of the time interval
date
schedule. REQUIRED, .ranges.*.to end time of the time interval
date
schedule. REQUIRED, .ranges.*.to end time of the time interval
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/scripts/{script}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"script": 0,
"event_id": 0,
"reaction_id": 0,
"users": [],
"schedule": {
"": "date"
},
"schedule.": "void"
}'
PHP
PHP
$data = array (
'script' => 0,
'event_id' => 0,
'reaction_id' => 0,
'users' =>
array (
),
'schedule' =>
array (
'' => 'date',
),
'schedule.' => 'void',
);
$context = stream_context_create([
'ssl'=>['verify_peer' => false],
'http' => [
'method' => 'PUT',
'header' => "Content-Type: application/json\r
Accept: application/json",
'content'=>json_encode($data)
]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/scripts/{script}', false, $context);