ProRoster - Create template
API Url
Use it for creating a template with all the demands in the specified from and to dates.
POST
http://localhost:16010/ProMarkREST/rest/ProRoster/templates
Permissions: user
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| planTemplates | Object[] | List of demands. |
| from | Date | Starting date of the template. |
| id | Number | The Id of the template. |
| isPrivate | Boolean | If true then the template is private to the user. |
| name | String | The name of the template. |
| planId | Number | The id of the plan. |
| rolloutFrom | Date | Rollout date start. |
| rolloutTo | Date | TRollout date end. |
| to | Date | Ending date of the template |
Success example:
HTTP/1.1 200 OK{"response": {"data": {"demands": [{"planId": 2153908066,"id": -2153908066,"from": "2021-08-24","to": "2021-08-24","name": "Template 1","rolloutFrom": "2021-08-24","rolloutFrom": "2021-08-24","isPrivate": 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. |