add-scheduler

Modified at V2.1 Use this interface to add a schedule. You can add 8 schedulers for each streaming session or record task.

HTTP Request

GET http://ip/usapi?method=add-scheduler&chn-type=xxx&chn-id=xxx...
Parameter Description
method add-scheduler
chn-type Channel type.
0: streaming channel
1: record channel
2: auto-reboot
chn-id Channel ID.
Streaming channel which can be obtained using get-settings or get-rec-channels.
title Schedule title. The string ranges from 1 to 32 characters which contains A-Z, a-z, 0-9, spaces and special characters like ._-+'[](). It can not start or end with spaces.
desc Schedule description. The string ranges from 1 to 32 characters which contains A-Z, a-z, 0-9, spaces and special characters like ._-+'[](). It can not start or end with spaces.
is-full-day 0: not a full day schedule.
1: a full day schedule.
time-begin Start time formats like 2023-02-02 10:00:00.
time-end End time formats like 2023-02-02 11:00:00.
is-repeat 0: not recurring event.
1: recurring event.
repeat-event 0: daily
1: weekly
2: monthly
3: yearly
Daily
repeat-interval Repeat every specified number of days. At least one of repeat-interval and repeat-is-workday must be set.
repeat-is-workday Every weekday
Weekly
repeat-is-interval The number of weeks between each occurrence.
repeat-wdays Specifies mask(s) for on which day(s) of the week the event occurs.
0x01: Monday
0x02: Tuesday
0x04: Wednesday
0x08: Thursday
0x10: Friday
0x20: Saturday
0x40: Sunday
Monthly
repeat-interval The number of months between each occurrence.
repeat-mday Day of the month on which to repeat. Set this or both repeat-wday and repeat-idx.
repeat-wday Week of the month on which to repeat. Set this with repeat-idx, or use repeat-mday instead.
repeat-idx Specifies on which day(s) the event can occur.
0: Monday
1: Tuesday
2: Wednesday
3: Thursday
4: Friday
5: Saturday
6: Sunday
Yearly
repeat-month Specifies in which month the event occurs.
repeat-mday Date of the year on which to repeat. Set this or both repeat-wday and repeat-idx.
repeat-wday Week of the year on which to repeat. Set this with repeat-idx, or use repeat-mday instead.
repeat-idx Specifies on which day(s) the event can occur.
0: Monday
1: Tuesday
2: Wednesday
3: Thursday
4: Friday
5: Saturday
6: Sunday
Repeat by minute
is-repeat-minute Whether to repeat by minute.
0: No
1: Yes
repeat-minute-interval Repeat interval, in minutes
repeat-minute-duration Duration of each occurrence, in minutes
end-event Specifies the end event.
0: no ending.
1: end by repeat times
2: end by date.
Repeat times
end-interval Specifies the number of occurrences. Must be a positive integer.
End date
end-dateline Specifies the date to stop applying the pattern.

When the channel type is auto-reboot (chn-type is 2), time-end is set automatically by the system and is-full-day does not apply. For recurring schedules, the end time setting does not apply; the schedule is set to have no end date.

Response Body

{
  "result": 0
}
Item Description
result Returned status.
0 indicates that the request was accepted successfully. Refer to API Status Codes to find specific description for other values.

results matching ""

    No results matching ""

    results matching ""

      No results matching ""