ProJect - Get favourite selections
API Url
Used for loading employee favourite project selection (templates).
http://localhost:16010/ProMarkREST/rest/ProJect/employees/{id}/favourites
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| id | String | Employee ID for whom to get favourites. |
Query parameters
| Field | Type | Description |
|---|---|---|
endDateoptional | Date | End date to query to. |
fieldsoptional | String | List of fields to be returned in the collection. Used for limiting amount of data. |
startDateoptional | Date | Start date to query from. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| favourites | Object[] | Collection of project favourites. |
| activityDesc | String | Activity description. |
| activityId | String | The Activity identifier. |
extraInfooptional | Object[] | Collection of project extra info. |
| info | String | Extra info type (ex: "DEPT:", "GROUP:", "FREE"). |
| valueDesc | String | Extra info value description. |
| valueId | String | Extra info value identifier, related to 'extraInfo.info'. |
| id | Number | Unique identifier of the favourite record. |
pieceworkDescoptional | String | Piecework description. |
pieceworkIdoptional | String | The piecework identifier. |
| projectDesc | String | Project description. |
| projectId | String | The Project identifier. |
registeredTimeoptional | Number[] | Default registration time in seconds for one week, starting with Monday. |
timeTypeDescoptional | String | Time type description. |
timeTypeIdoptional | String | The Time type identifier. |
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": {"favourites": [{"id": 123456789,"projectId": "Aarsleff","projectDesc": "Construction project","activityId": "ACT1","activityDesc": "Main activity","timeTypeId": "Machine","timeTypeDesc": "Machine hours","extraInfo": [{"info": "MACHINE","valueId": "MACH1","valueDesc": "Machine No 1"}],"registeredTime": [3600, 7200, 14400, 0, 0, 0, 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. |