URL
POST https://{api-url}/api/v2/tenants/{tenantId}/rosters
Sample URLs
For partner-level rosters:
https://{api-url}/api/v2/tenants/msp_5/rosters
For client-level rosters:
https://{api-url}/api/v2/tenants/client_7/rosters
Parameters
All fields are mandatory:
Field | Sub-Fields | Data Type | Description |
---|---|---|---|
name | NA | String | Unique name for roster used for roster identification. |
timeZone | NA | String | Time zone in which the roster should operate (see table below). An example time zone is:"timeZone": { |
shiftDetails | String | NA | Gateway username. |
name | String | Unique name for shift. The shift would be identified with the name.Example: Morning Shift | |
name | String | Unique name for shift. The shift would be identified with the name.Example: Morning Shift | |
schedule
| String | Define the schedule type for the roster.
| |
users
| String | Add users to a roster. | |
userGroups
| String | Add user groups to a roster. |
Timezones
Region/City | Region/City | Region/City |
---|---|---|
Pacific/Asia | Pacific/Honolulu | America/Anchorage |
America/Los_Angeles | America/Denver | America/Chicago |
America/New_York | America/Puerto_Rico | America/St_Johns |
America/Buenos_Aires | Atlantic/Azores | GMT |
Europe/Paris | Europe/Istanbul | Africa/Addis_Ababa |
Asia/Tehran | Asia/Yerevan | Asia/Karachi |
Asia/Calcutta | Asia/Dacca | Asia/Saigon |
Asia/Shanghai | Asia/Tokyo | Australia/Darwin |
Australia/Sydney | Pacific/Guadalcanal | Pacific/Auckland |
One-tTime schedule types
Both fields are mandatory:
Field | Description |
---|---|
startDate | startDate and endDate indicates a duration for a roster to operate. Use a start date for a roster. If, for example, a roster should start from 06-February-2018 at 07:00 AM, use "startDate": "2018-02-06T07:05:00+0000". |
endDate | Provide an end date for a roster.For example, if a roster should stop on 10-March-2018 at 05:30 PM, provide "endDate": "2018-03-10T17:30:00+0000". |
Date should be in GMT format.
This is a sample payload to create a one-time roster:
{
"name": "SJ Network Support",
"description": "Team which handles SJ network issues",
"timeZone": {
"name": "Asia/Calcutta"
},
"shiftDetails": [{
"name": "Morning shift",
"schedule": {
"type": "one-time",
"startDate": "2018-02-06T07:05:00+0000",
"endDate": "2018-03-10T17:30:00+0000"
},
"users": [{
"id": "USR0000000018"
}],
"userGroups": [{
"uniqueId": "USRGRP-37644ff5-7ea5-a3aa-e288-9c2666dc02e4"
}]
}]
}
Recurring schedule type
All fields are mandatory:
Field | Description |
---|---|
startTime | startTime and endTime indicate the business hours for a roster.Provide start time for a roster.For example, a roster should start from 07:00 AM, provide "startTime": "07:00:00". |
endTime | Provide end time for a roster.For example, a roster should end at 05:00 PM, provide "endTime": "17:00:00". |
pattern
| Schedule pattern type for a roster to operate.
|
Pattern types for recurring schedule
Sample payloads for recurring pattern types
Daily - Create a roster to repeat once in five days:
"pattern": {
"type": "daily",
"repeatFrequency": 5
}
Weekly - Create a roster to repeat once in 5 weeks on specific weekdays:
"pattern": {
"type": "weekly",
"weekDays": "Wednesday,Thursday,Friday",
"repeatFrequency": 5
}
Monthly - Create a roster to repeat once in 5 months on a specific weekday of a month:
"pattern": {
"type": "monthly",
"repeatType": "DAY_OF_WEEK",
"weekIndex": "First",
"dayOfWeek": "Sunday",
"repeatFrequency": 5
}
Create a roster to repeat once in 5 months on a specific day of a month:
"pattern": {
"type": "monthly",
"repeatType": "DAY_OF_MONTH",
"dayOfMonth": "1",
"repeatFrequency": 5
}
Yearly - Create a roster to repeat once in 2 years:
"pattern": {
"type": "yearly",
"repeatFrequency": 2
}
Sample request
{
"name": "SJ Network Support",
"description": "Team to handle all network issues in SJ site.",
"timeZone": {
"name": "Asia/Calcutta"
},
"shiftDetails": [{
"name": "Morning shift",
"schedule": {
"type": "one-time",
"startDate": "2018-02-05T07:05:00+0000",
"endDate": "2018-06-10T16:10:20+0000"
},
"users": [{
"id": "USR0000000018"
}],
"userGroups": [{
"uniqueId": "USRGRP-37644ff5-7ea5-a3aa-e288-9c2666dc02e4"
}]
}, {
"name": "Evening shift",
"schedule": {
"type": "recurring",
"startDate": "2018-03-06T00:00:00+0000",
"startTime": "16:30:00",
"endTime": "01:30:10",
"pattern": {
"type": "weekly",
"weekDays": "Wednesday,Thursday,Friday",
"repeatFrequency": 5
},
"endPattern": {
"type": "NEVER"
}
},
"users": [{
"id": "USR0000000020"
}],
"userGroups": [{
"uniqueId": "USRGRP-48965gg5-8fg6-a3aa-e288-0d3667e36f5"
}]
}]
}
Sample response
{
"id": "ES-3b05178f-b197-46b2-9451-db9bfc3c8403",
"name": "SJ Network Support",
"description": "Team to monitor all network issues in SJ site.",
"createdTime": "2018-02-04T09:08:15+0000",
"updatedTime": "",
"timeZone": {
"id": "19",
"name": "Asia/Calcutta",
"label": "GMT +05:30 India",
"code": "IST"
},
"client": {
"id": 7,
"uniqueId": "client_7",
"name": "Logix Inc",
"activated": true
},
"shiftDetails": [{
"id": "ESD-237dffd1-8b86-47da-a40a-78246b6028e1",
"name": "Morning shift",
"schedule": {
"type": "one-time",
"startDate": "2018-02-06T07:05:00+0000",
"endDate": "2017-06-10T16:10:20+0000"
},
"users": [{
"id": "USR0000000018",
"loginName": "John_Smith",
"lastName": "Smith",
"firstName": "John",
"email": "john.smith@myorganization.com",
"phoneNumber": "",
"mobileNumber": "9004561234"
}],
"userGroups": [{
"uniqueId": "USRGRP-37644ff5-7ea5-a3aa-e288-9c2666dc02e4",
"name": "Network Admins",
"description": "",
"createdTime": "2017-03-14T11:40:35+0000"
}]
},
{
"id": "ESD-edaea54b-9a2a-42e9-b54b-6dea26c55202",
"name": "Evening shift",
"schedule": {
"type": "recurring",
"startDate": "2018-02-06T00:00:00+0000",
"startTime": "16:30:00",
"endTime": "01:30:10",
"pattern": {
"type": "weekly",
"weekDays": "Wednesday,Thursday,Friday",
"repeatFrequency": 5
},
"endPattern": {
"type": "NEVER"
}
},
"users": [{
"id": "USR0000000018",
"loginName": "James_Blake",
"lastName": "Blake",
"firstName": "James",
"email": "james.blake@myorganization.com",
"phoneNumber": "",
"mobileNumber": "9001237123"
}],
"userGroups": [{
"uniqueId": "USRGRP-37644ff5-7ea5-a3aa-e288-9c2666dc02e4",
"name": "Database Admins",
"description": "Team to monitor all Database issues.",
"createdTime": "2017-03-14T11:40:35+0000"
}]
}
]
}