URL

POST https://{api-url}/api/v2/tenants/{tenantId}/rosters/{id}

Sample URLs

https://{api-url}/api/v2/tenants/client_93/rosters/ES-c27584ee-29de-1cf2-4983-86308844e35d

Parameters

All fields are mandatory:

FieldSub-FieldsData TypeDescription
nameNAStringUnique name for roster used for roster identification.
timeZoneNAStringTime zone in which the roster should operate (see table below). An example time zone is:
"timeZone": {
"name": "Asia/Calcutta"
},
shiftDetailsStringNAGateway username.
nameStringUnique name for shift. The shift would be identified with the name.Example: Morning Shift
nameStringUnique name for shift. The shift would be identified with the name.Example: Morning Shift
schedule
  • type
    • one-time
    • recurring
StringDefine the schedule type for the roster.
  • If a roster should be active only for a single time period, provide"type": "one-time".
  • If a roster should repeat multiple times, provide"type": "recurring".
users
  • id
StringAdd users to a roster.
userGroups
  • uniqueId
StringAdd user groups to a roster.

View the < relref “/api/alerts/rosters-create-post.md” –> Create Rosters API for more details on supported fields.

Status code

200 OK

Sample request

{
	"name": "Network and Windows Support",
	"description": "Team working on all network and Windows devices issues.",
	"timeZone": {
		"name": "Asia/Calcutta"
	},
	"shiftDetails": [{
		"id": "ESD-5296f16f-d254-4d67-bfe8-574d3519d172",
		"name": "Morning shift",
		"schedule": {
			"type": "one-time",
			"startDate": "2017-12-28T04:41:12+0000",
			"endDate": "2017-12-29T09:46:20+0000"
		},
		"users": [{
			"id": "USR0000000018"
		}],
		"userGroups": [{
			"uniqueId": "USRGRP-37644ff5-7ea5-a3aa-e288-9c2666dc02e4"
		}]
	}]
}

Sample response

{
	"id": "ES-26ecfba7-6896-47a8-aa8d-825b610513e6",
	"name": "Network and Windows Support",
	"description": "Team working on network and Windows devices issues.",
	"createdTime": "2017-12-27T06:32:11+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-5296f16f-d254-4d67-bfe8-574d3519d172",
		"name": "Morning shift",
		"schedule": {
			"type": "one-time",
			"startDate": "2017-12-28T04:41:12+0000",
			"endDate": "2017-12-29T09:46:20+0000"
		},
		"users": [{
			"id": "USR0000000018",
			"loginName": "John.Smith",
			"lastName": "Smith",
			"firstName": "John",
			"email": "john.smith@myorganization.com",
			"phoneNumber": "",
			"mobileNumber": "802-123-4433"
		}],
		"userGroups": [{
			"uniqueId": "USRGRP-37644ff5-7ea5-a3aa-e288-9c2666dc02e4",
			"name": "Network Architects",
			"description": "",
			"createdTime": "2017-03-14T11:40:35+0000"
		}]
	}]
}