ProRoster - Get a plan
API Url
Use it for loading a plan by id.
http://localhost:16010/ProMarkREST/rest/ProRoster/plans/{id}
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| id | Number | The plan unique identifier. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| plans | Object[] | List of plans. |
approvalGroupsoptional | Object[] | List of approval groups. |
| description | String | Description of the approval group. |
| id | String | The Id of the approval group. |
| canEdit | Boolean | |
departmentsoptional | Object[] | List of departments. |
| description | String | Description of the department. |
| id | String | The Id of the department. |
| description | String | Description of the plan. |
endDateoptional | Date | End date of the plan. Optional if plan never expires. |
groupsoptional | Object[] | List of groups. |
| description | String | Description of the group. |
| id | String | The Id of the group. |
| id | Number | The Id of the plan. |
| isReadOnly | Boolean | |
| neverExpires | Boolean | true = The end date never expires. false = Start date must be specified. |
planIdoptional | String | Optional unique Id to identifiy visually a PlanSelection. |
| publishedUntil | Date | |
| startDate | Date | Start date of the plan. |
| state | Number | Plan state: 1:Draft, 2:Published-Demands, 3:Published-Employees, 3:Published-Complete. |
usersoptional | Object[] | List of users. |
| accesMode | Number | Checks if the user has read-only rights or read-write rights. 0 = Read-only, 1 = Read-write. |
| id | String | The Id of the user. |
| isAdmin | Boolean | True = the user is Plan administrator. |
| name | String | The username of the user. |
| version | Number | Version number of the plan. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example:
HTTP/1.1 200 OK{"response":{"data":{"plans":[{"id":2149787202,"planId":"","description":"SAP-HR-Department 15 Pan","startDate":"2016-08-04","endDate":"2062-01-18","version":7,"state":2,"publishedUntil":null,"neverExpires":true,"canEdit":false,"isReadOnly":true,"departments":[{"id":"0000007215","description":"SAP-HR-department 15"}],"groups":[{"id":"BH","description":"Bo Haslund"}],"approvalGroups":[{"id":"01","description":"Kem Default"}],"users":[{"id":"USR","name":"User","isAdmin":true,"accessMode":1}]}]},"errorCode":0,"errorMessage":""}}
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |