ProRoster - Copy part of the plan
API Url
Use it for copying part of the plan in the future
POST
http://localhost:16010/ProMarkREST/rest/ProRoster/plan/{id}/copy
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| id | Number | The plan unique identifier. |
Query parameters
| Field | Type | Description |
|---|---|---|
| context | Number | What to copy: If ProSchedule: 0=All (default if not sent). 1=Just the plan demands. If ProRoster: 0=All (default if not sent). 1=Only published changes. |
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| copyTo | Date | The start date of the target period. |
| from | Date | The start date of the period to be copied. |
repeatoptional | Number | How many times the copy should be repeated. Default is 1. |
| to | Date | The end date of the period to be copied. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
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. |
Error example:
HTTP/1.1 422{"response": {"data": {"copyErrors": [{"demandId": 2154023310,"demandName": "Waiter","empId": "165","empName": "Galba Emperor","date": "2018-07-22","copyDate": "2018-08-22","description": "The demand is overlapping another existing demand"}]},"errorCode": 100,"errorMessage": "There are errors when copying some of the demands"}}}