General - Get periods of a period profile
API Url
Use it for loading period list by period profile id.
http://localhost:16010/ProMarkREST/rest/General/period-profiles/{id}/periods
Permissions: user
Query parameters
| Field | Type | Description |
|---|---|---|
dateoptional | Date | Date to query from. |
empIdoptional | String | Employee id. |
forwardoptional | Boolean | If forward = true, it returns no. of forward periods compared to input date including input date. And if it is false then it returns no. of backward periods including input date. If not defined, it is set to false. |
takeoptional | integer | Maximum number of records to get (default is 10). |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| periods | Object[] | Objects containing the periods. |
| from | Date | Start Date of the period. |
| status | Number | 1:Open, 2:Under validation, 3:Closed-editable, 4: Closed |
| to | Date | End Date of the period. |
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": {"periods": [{"status": 1,"from": "2017-06-30","to": "2017-07-31"}]},"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. |