ProJect - Get all registrations
API Url
Used for loading project registrations for one or more employees
http://localhost:16010/ProMarkREST/rest/ProJect/registrations
Permissions: user
Query parameters
| Field | Type | Description |
|---|---|---|
addEmptyDaysoptional | Boolean | true = Empty/dummy registrations will be created and returned for days where there are no registrations in the requested period of time. Parameter is intended for Project Week. |
addFavouritesoptional | Boolean | true = Server will add also the favourite projects on top of the resulting data. Default is false. |
approvaloptional | Boolean | True to get approval project transactions only. |
approvalGroupoptional | String | Approval Group ID to filter transactions under this approval group only. If not defined, default is all valid approval groups. |
approvalStatusoptional | Number | Approval status to filter data (1: Untreated, 2: Approved, 3: Rejected). In not defined then untreated transactions are returned. 1-3 |
expandoptional | String | Expand specified properties (comma delimiter) with descriptions. Supported values are: 'all', 'project', 'activity', 'timeType', 'piecework', 'extraInfo', 'extraInfoValue'. Supports also exclusions, so you can add a minus in front (eg. 'all,-extraInfo'). |
fieldsoptional | String | List of fields to be returned in the collection. Used for limiting amount of data. |
filteroptional | String | Filter fields and its values and conditions. |
fromoptional | Date | Start date for loading registrations. Default is TODAY. |
projectIdoptional | String | Can contain 1 or more project IDs (comma delimiter) to filter registration on. |
readOnlyoptional | Boolean | true = Load registrations in read-only mode (better performance). Default is false. |
tooptional | Date | End date for loading registrations. Default is 'from'. |
Success 200
| Field | Type | Description |
|---|---|---|
| registrations | Object | Collection of project registrations. All registration entries from 'values' have the same parent coordinates, like employee, project, activity, time type, extra info. |
| activity | String | Activity ID. If 'expand=activity' then it's the object containing id & description. |
descriptionoptional | String | Activity description. Only if 'expand=activity'. |
idoptional | String | Activity Id. Only if 'expand=activity'. |
avatarURIoptional | String | URI used for loading the employee avatar. |
| empId | String | Employee ID. |
| empName | String | Employee fullname. |
| empNo | String | Employee No. |
extraInfooptional | Object | Collection of extra info (project dimensions). |
| dimension | Number | Dimension number. If 0, then record is not a reportin dimension. |
| info | String | Extra info ID. If 'expand=extraInfo' then it's the object containing id & description. |
descriptionoptional | String | Extra info description. Only if 'expand=extraInfo'. |
idoptional | String | Extra info Id. Only if 'expand=extraInfo'. |
| isFixedValue | Boolean | true = Answer needs to be selected from a fixed list. |
| value | String | Extra info value ID. If 'expand=extraInfoValue' then it's the object containing id & description. |
descriptionoptional | String | Extra info value description. Only if 'expand=extraInfoValue'. |
idoptional | String | Extra info value Id. Only if 'expand=extraInfoValue'. |
| favouriteObjectId | Number | The unique ID of the favourite project/activity/time type record. Used in connection with 'favouriteType'. |
| favouriteType | Number | Project/activity/time type is a favourite one if 'favouriteType' > 0 (0: Not favourite, 1: Favourite, 2: Favourite with default time). 0-2 |
| initials | String | Employee initials. |
| isLocked | Boolean | true = Registrations, including notes, cannot be changed. |
pieceworkoptional | String | Piecework ID. If 'expand=piecework' then it's the object containing id & description. |
descriptionoptional | String | Piecework description. Only if 'expand=piecework'. |
idoptional | String | Piecework Id. Only if 'expand=piecework'. |
| project | String | Project ID. If 'expand=project' then it's the object containing id & description. |
descriptionoptional | String | Project description. Only if 'expand=project'. |
idoptional | String | Project Id. Only if 'expand=project'. |
| sortEmpNo | String | Sort employee No. |
| timeType | String | Time type ID. If 'expand=timeType' then it's the object containing id & description. |
descriptionoptional | String | Time type description. Only if 'expand=timeType'. |
idoptional | String | Time type Id. Only if 'expand=timeType'. |
| values | Object | Collection with registration returned back from the server. |
| approvalDept | String | Department secondary to approval group. |
| approvalGroup | String | The approval group the registration belongs to. |
| approvalStatus | Number | Approval status of the registration (0: No approval needed, 1: Pending approval, 2: Approved, 3: Rejected). |
| approvalTime | Date | Date-time when registration was approved/rejected. |
| approvedBy | String | The user who approved the registration. |
| attendanceDate | Date | Date when registration is inserted. |
| copyTransSeq | Number | For internal use! It make it possible to register time for the same project/activity/time type from another day. |
| endTime | Number | End time of registration expressed in seconds relative to 'attendanceDate'. Registrations can also be entered as time intervals. |
| favouriteObjectId | Number | The unique ID of the favourite project/activity/time type record. Used in connection with 'favouriteType'. |
| favouriteType | Number | Project/activity/time type is a favourite one if 'favouriteType' > 0 (0: Not favourite, 1: Favourite, 2: Favourite with default time). 0-2 |
| inclTimeInTotals | Boolean | true = Registered time needs to be included in the total time being displayed. |
| noLongerValid | Boolean | true = Registration is no longer valid. This could be due to change in project profiles, change of home depart back in time etc. Record cannot be changed, but it can be deleted, that is set the RegTime to zero. |
| note | String | Comment / note on the registration. |
| readOnly | Boolean | true = Registration is read only. |
| registeredTime | Number | Time to register expressed in seconds. |
| rejectedHigherLevel | Boolean | If Rejected at higher level |
| signOffBy | String | If the value starts with "*" then it was the employee that made the sign-off. |
| signOffDateTime | Date | Date-time when registration was signed-off. |
| signOffStatus | Number | Sign-off status of the registration (0: Sign-off not required, 1: Sign-off pending, 3: Sign-off). |
| startTime | Number | Start time of registration expressed in seconds relative to 'attendanceDate'. Registrations can also be entered as time intervals. |
| transSeq | Number | This is the unique transaction number. It will be filled by the server for new transactions. |
treatedByFirstoptional | String | The user who approved the registration first. |
treatedTimeFirstoptional | Date | Date-time when registration was approved/rejected first. |
| useInterval | Boolean | true = Use interval in FE false = Use a duration |
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example with expand='all,-extraInfo':
HTTP/1.1 200 OK{"response": {"data": {"registrations": [{"empId": "614","empNo": "1000","sortEmpNo": "!!!!1000","empName": "Jane Doe","initials": "JAD","isLocked": false,"favouriteType": 0,"favouriteObjectId": 0,"extraInfo": [{"info": "DEPT:","isFixedValue": true,"dimension": 1,"value": [{"id": "JD","description": "John Doe"}]},{"info": "GROUP:","isFixedValue": true,"dimension": 2,"value": [{"id": "DEVS","description": "Developers"}]}],"values": [{"attendanceDate": "2017-05-15","readOnly": true,"registeredTime": 1440,"startTime": 0,"endTime": 0,"note": "","noLongerValid": false,"transSeq": 2171364,"copyTransSeq": 0,"favouriteType": 0,"favouriteObjectId": 0,"inclTimeInTotal": true,"approvalStatus": 0,"approvalGroup": "","approvalDept": "","approvedBy": "","approvalTime": null,"signOffStatus": 1,"signOffBy": "","signOffDateTime": null}],"project": [{"id": "2","description": "Project #2"}],"activity": [{"id": "2","description": "spec"}],"timeType": [{"id": "OVER","description": "Over time"}]}]},"errorCode": 0,"errorMessage": ""}}
Success example with filter=[{"type":4,"fields":[{"fieldId":"1","condition":"1","values":["4711"]}]}]:
HTTP/1.1 200 OK{"response": {"data": {"registrations": [{"empId": "414","empNo": "1000","sortEmpNo": "!!!!1000","empName": "Jane Doe","initials": "JAD","project": "4711","activity": "2","timeType": "NORM","piecework": "","isLocked": false,"favouriteType": 0,"extraInfo": [{"info": "DEPT:","value": "AUTHOR","isFixedValue": true,"dimension": 0}],"values": [{"attendanceDate": "2017-12-13","readOnly": false,"registeredTime": 2700,"startTime": 28800,"endTime": 32400,"noLongerValid": false,"transSeq": 2227488,"favouriteType": 0,"inclTimeInTotal": true,"approvalStatus": 1,"approvalGroup": "T&A","approvalDept": "CFP1","approvedBy": "","signOffStatus": 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. |