Get all schedules
The GET /schedules
endpoint gets a list of all schedules that the requestor has access to.
In this page
Headers
Header parameters in Requests (User Admin API) apply to this endpoint.
Authorization scopes supported:
Scope | Access granted |
---|---|
users:read | Entire endpoint |
users:write | Entire endpoint |
Parameters
The endpoint accepts the following query parameters:
limit
Type | Required | Example |
---|---|---|
integer | False | 25 |
The required number of items per page. Minimum of 1. Maximum of 5000. Default is 25.
page
Type | Required | Example |
---|---|---|
integer | False | 1 |
The required page. Minimum of 1, maximum of 1000000000. Default is 1.
Requests
Request all schedules
curl -L -X GET "https://***.api.newvoicemedia.com/useradmin/schedules" \ -H "Accept: application/vnd.newvoicemedia.v4+json" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
Request second page of schedules
curl -L -X GET "https://***.api.newvoicemedia.com/useradmin/schedules?page=2" \ -H "Accept: application/vnd.newvoicemedia.v4+json" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
Responses
Responses contain a list of all schedules that the requester has access to.
Successful response
Successful requests return a 200 Success
code and a collection of schedules.
Example response
{ "schedules": [ { "scheduleId": "044bbe6e-1ce2-48bb-9ca1-92ceb28b6cd4", "scheduleName": "Day Shift", "scheduleNextRun": "2022-01-14T15:00:00Z", "scheduleLastRun": "0001-01-01T00:00:00", "scheduleTimezone": "Europe/Kiev", "scheduleRules": [ { "days": [ "Friday", "Monday", "Thursday", "Tuesday", "Wednesday" ], "time": "17:00:00" } ] }, { "scheduleId": "763cd3f5-ffa5-424f-bf28-8c55a0054838", "scheduleName": "Night Shift", "scheduleNextRun": "2022-01-17T07:00:00Z", "scheduleLastRun": "2022-01-13T20:35:01Z", "scheduleTimezone": "Europe/London", "scheduleRules": [ { "days": [ "Friday", "Monday", "Thursday", "Tuesday", "Wednesday" ], "time": "07:00:00" } ] } ], "meta": { "page": 1, "count": 2, "pageCount": 1, "totalCount": 2 } }
where:
schedules
. A collection of schedules.scheduleId
. The unique ID of the schedule.scheduleName
. The name of the schedule.scheduleNextRun
. The date and time of the schedule's next run. In UTC timezone and ISO 8071 formatscheduleLastRun
. The date and time of the schedule's last run. In UTC timezone and ISO 8071 formatscheduleTimezone
. The timezone in which the schedule must be run under.scheduleRules
. A collection of rules detailing when the schedule must run.days
. The days of the week the schedule must runtime
. The time in which the schedule must run, on the days specified. Time shown in the timezone detailed underscheduleTimezone.
Try it out
For information, see Trying out Vonage Contact Center APIs.