Event and reaction update
Event and reaction update.
PUT/api/v1/scripts/{script}Headers | |||||||||
Authorization | Bearer token | ||||||||
Accept | application/json | ||||||||
X-Client | ios-cctv|android-cctv|thick-legal|web | ||||||||
X-UUID | unique device id |
Body | |||||||||
json |
JSON
| ||||||||
scriptoptional | int | Unique identifier of the event and reaction | |||||||
titlerequired | string | Event and reaction name | |||||||
reaction_idrequired | int | Reaction ID. The value is taken from the statistics, see Basic Configurations | |||||||
event_idrequired | int | Event ID. The value is taken from the statistics, see Basic Configurations | |||||||
usersrequired | array | Array of user IDs to whom the reaction will be sent. Sub-users will receive reactions: show-camera-sidebar, sound, show-camera | |||||||
statusrequired | array | Status of the event and reaction. If it is disabled (false), the events will not be processed | |||||||
timetablerequired | array | Working time of the event and reaction | |||||||
timetable.daysrequired | array | Schedule of the event and reaction | |||||||
timetable.days.*.typerequired | string | Schedule of the event and reaction within a single day | |||||||
timetable.days.*.fromrequired | string | Start time of the event and reaction | |||||||
timetable.days.*.torequired | string | End time of the event and reaction | |||||||
timetable.days.*.breaksrequired | array | Time pauses during the event and reaction | |||||||
timetable.days.*.breaks.*.fromrequired | string | Start time of the event and reaction pause | |||||||
timetable.days.*.breaks.*.torequired | string | End time of the event and reaction pause | |||||||
timetable.intervalsrequired | array | Working schedule based on time intervals of the event and reaction | |||||||
timetable.intervals.*.fromrequired | string | Start date and time of the event and reaction | |||||||
timetable.intervals.*.torequired | string | End date and time of the event and reaction | |||||||
extrarequired | array | Extra data for creating an event and reaction with the «telegram-message» reaction type | |||||||
extra.bot_tokenrequired | str | Telegram bot token | |||||||
extra.chat_idrequired | str | Telegram chat ID |
Response | |||||||||
200 | Returns the event and reaction object | ||||||||
JSON
| |||||||||
401 | Authorization token not provided or invalid, see Obtaining a token | ||||||||
422 | Returns a JSON object with an error, see Validation | ||||||||
JSON
|
Example | |||||||||
JSON
|