ProJect - Get project weeks
API Url
Used for loading the project weeks.
http://localhost:16010/ProMarkREST/rest/ProJect/weeks
Permissions: user
Query parameters
| Field | Type | Description |
|---|---|---|
empIdoptional | String | Employee ID. |
numWeeksoptional | Number | Number of Weeks back in time from last registration date. |
splitByPerProfIdoptional | String | Week will be split by this period profile ID, if defined. |
| toDate | Date | Last Registration Date. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| weeks | Object[] | Collection of project weeks. |
| endDate | Date | End date of the week. |
| locked | Boolean | True if week is locked for registration else false. False if employee id is not defined. |
| signedOff | Boolean | True if the week is marked as signed off else false. False if employee id is not defined. |
| startDate | Date | Start date of the week. |
| status | Number | Possible Values: 0: No registrations for approval, 1: Sign off missing, 2: Signed off, 3: Approved, 4: Rejected. If employee Id is not defined, then the value is 0. |
| weekNo | String | Week Number. |
| year | Number | Year. |
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": {"weeks": [{"year": 2017,"weekNo": "13","startDate": 2017-03-27,"endDate": 2017-04-02,"signedOf": false,"locked":false,"status": 0}]},"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. |