ProRoster - Create new plan
API Url
Use it for saving a new plan.
http://localhost:16010/ProMarkREST/rest/ProRoster/plans
Permissions: user
Query parameters
| Field | Type | Description |
|---|---|---|
| force | Boolean | True = Will ignore the warning. False = In case you haven't put yourself in the user restrictions or if you are not an admin, the routine ends with an error. If there aren't any user restrictions, you will not get an error. |
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| plans | Object[] | |
approvalGroupsoptional | Object[] | Object array of approval group details. |
| id | String | Id of the approval group. |
departmentsoptional | Object[] | Object array of department details. |
| id | String | Id of the department. |
| description | String | Description of the plan. |
endDateoptional | Date | End date of the plan. Optional if plan never expires. |
groupsoptional | Object[] | Object array of group details. |
| id | String | Id of the group. |
| neverExpires | Boolean | Boolean if the plan is endless or not. |
planIdoptional | String | Plan ID (needs to be unique also). |
| startDate | Date | Start date of the plan. |
usersoptional | Object[] | Object array of user rights details. |
| accesMode | Number | 0 = user has read-only rights, 1 = user has read-write rights. |
| id | String | Id of the user. |
| isAdmin | Boolean | True = the user is Plan administrator. |
Request example:
{"request":{"data":{"plans":[{"planId":"UUT","description":"SAP-HR-Department 15 Pan","startDate":"2015-10-01","endDate":"2018-07-27","neverExpires":true,"departments":[{"id":"BAYPROJ"}],"groups":[{"id":"2"}],"approvalGroups": [{"id": "01"}],"users":[{"id":"AAM","isAdmin":true,"accessMode":1}]}]}}}
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" |
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. |