ProRoster - Revert to snapshot
API Url
Use it to revert a snapshot
http://localhost:16010/ProMarkREST/rest/ProRoster/plans/{planId}/snapshots/{snapshotId}
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| planId | Number | The plan's unique identifier. |
| snapshotId | Number | The snapshot's unique identifier. |
Query parameters
| Field | Type | Description |
|---|---|---|
| empId | String | List of employees |
| end | Date | End date for reverting the snapshot |
| from | Date | Start date for reverting the snapshot |
Parameter
| Field | Type | Description |
|---|---|---|
ignoreDayProfileoptional | Object[] | |
| isLocked | Boolean | Is the attribute locked. |
| value | Boolean |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
assignedDemandsoptional | Object[] | Collection of demands (only when expand=demands). |
acceptBeforeoptional | Object[] | |
daysoptional | Number | Accept days before shift takes place. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
approvalGroupoptional | Object[] | |
descriptionoptional | String | Description of the approvalGroup. |
idoptional | String | Id of the approvalGroup. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
assignmentMethodoptional | Object[] | |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
methodoptional | String | Assignment methode Automatic = "A" or Manual "M". |
| backColor | String | BackGround color in HEX without #. |
| baseDemandId | Number | The Id of the base demand from which the demand was created. |
categoryoptional | Object[] | |
descriptionoptional | String | Description of the category. |
idoptional | String | Id of the category. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| date | Date | The date of the demand . |
dayProfileoptional | Object[] | The day profile object. |
backColoroptional | String | BackGround color. |
| description | String | Description of the day profile. |
endTimeoptional | Number | Normal time end of day profile. |
foreColoroptional | String | ForeGround color. |
idoptional | String | Day profile ID. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| isVariable | Boolean | True if day profile is variable. |
startTimeoptional | Number | Normal time start of day profile. |
departmentoptional | Object[] | |
descriptionoptional | String | Description of the department. |
idoptional | String | Id of the department. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| description | String | Description of the demand. |
| empId | String | The Id of the employee assigned to a demand. |
| foreColor | String | ForeGround color in HEX without #. |
groupoptional | Object[] | |
descriptionoptional | String | Description of the group. |
idoptional | String | Id of the group. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| id | Number | The Id of the demand. |
| isPublished | Boolean | False = the assigned demand is not published. True = the assigned demand is published. |
| isTask | Boolean | True if demand is task, false if not. |
maximumBidsoptional | Object[] | |
amountoptional | Number | Number of employees to bid in. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| name | String | The name of the demand . |
normalTimeoptional | Object[] | Normal time interval for variable day profiles. |
endTimeoptional | Number | End time of the interval in seconds. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
startTimeoptional | Number | Start time of the interval in seconds. |
| planId | Number | The Id of the plan. |
qualificationSetupoptional | Object[] | |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
qualificationoptional | Object[] | |
descriptionoptional | String | Description of the qualification. |
empQualIdoptional | String | Id of the employee qualification. |
idoptional | Number | Id of the demand qualification. |
orderoptional | Number | Order of qualifications. |
primaryoptional | Boolean | true = This is a primary qualification. |
| requiredEmployees | Object[] | |
| amount | Number | Number of employees |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| version | Number | Version number of the demand. |
| from | Date | Starting date of the snapshot. |
| isPrivate | Boolean | If true then the snapshot is private to the user. |
| name | String | The name of the snapshot. |
| planId | Number | The id of the plan. |
| to | Date | Ending date of the snapshot |
| user | String | The user who created the snapshot. |
| version | Number | The snapshot version. |
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": {"planId": 2164573937,"version": 133,"from": "2020-04-13","to": "2020-04-19","name": "test","user": "test","isPrivate": true,"assignedDemands": [{"id": 2164580306,"empId": "1848","date": "2020-04-16","baseDemandId": 2163133262,"demandId": 2164580121,"planId": 2164573937,"name": "Casino Host","description": "Casino Host","foreColor": "FFD500","backColor": "678DB6","version": 2,"isPublished": false,"snapshotVersion": 133,"dayProfile": [{"id": "0600-1430","startTime": 21600,"endTime": 52200,"description": "Day Mon-Fri 8 hours","isVariable": false,"foreColor": "000000","backColor": "FFFF00","isRequired": false,"isLocked": false}],"attendanceTime": [{"isRequired": false,"isLocked": false}],"department": [{"description": "","isRequired": false,"isLocked": false,"isStrict": false}],"group": [{"description": "","isRequired": false,"isLocked": false,"isStrict": false}],"approvalGroup": [{"description": "","isRequired": false,"isLocked": false}],"ignoreDayProfile": [{"value": false,"isLocked": false}],"category": [{"description": "","isRequired": false,"isLocked": false}]}],"planDemands": [{"id": 2164580301,"baseDemandId": 2163133262,"planId": 2164573937,"counter": 0,"date": "2020-04-16","name": "Casino Host","description": "Casino Host","foreColor": "FFD500","backColor": "678DB6","hoursPerDay": 21600,"version": 4,"isPublished": true,"demandType": 0,"snapshotVersion": 133,"dayProfile": [{"id": "0600-1430","startTime": 21600,"endTime": 52200,"description": "Day Mon-Fri 8 hours","isVariable": false,"foreColor": "000000","backColor": "FFFF00","isRequired": false,"isLocked": false}],"requiredEmployees": [{"amount": 4,"planningValue": 0,"usePlanningValue": false,"isRequired": true,"isLocked": false}],"attendanceTime": [{"isRequired": false,"isLocked": false}],"department": [{"description": "","isRequired": false,"isLocked": false,"isStrict": false}],"assignmentMethod": [{"method": "","isRequired": false,"isLocked": false}],"group": [{"description": "","isRequired": false,"isLocked": false,"isStrict": false}],"approvalGroup": [{"description": "","isRequired": false,"isLocked": false}],"maximumBids": [{"isRequired": true,"isLocked": false}],"category": [{"description": "","isRequired": false,"isLocked": false}],"ignoreDayProfile": [{"value": false,"isLocked": false}],"acceptBefore": [{"isRequired": false,"isLocked": false}],"qualificationSetup": [{"isRequired": false,"isLocked": false}]}]},"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. |