ProJect - Get all registrations

API Url

Used for loading project registrations for one or more employees

GET
http://localhost:16010/ProMarkREST/rest/ProJect/registrations

Permissions: user

Query parameters

FieldTypeDescription
addEmptyDaysoptionalBoolean

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.

addFavouritesoptionalBoolean

true = Server will add also the favourite projects on top of the resulting data. Default is false.

approvaloptionalBoolean

True to get approval project transactions only.

approvalGroupoptionalString

Approval Group ID to filter transactions under this approval group only. If not defined, default is all valid approval groups.

approvalStatusoptionalNumber

Approval status to filter data (1: Untreated, 2: Approved, 3: Rejected). In not defined then untreated transactions are returned.

Size range: 1-3
expandoptionalString

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').

fieldsoptionalString

List of fields to be returned in the collection. Used for limiting amount of data.

filteroptionalString

Filter fields and its values and conditions.

fromoptionalDate

Start date for loading registrations. Default is TODAY.

projectIdoptionalString

Can contain 1 or more project IDs (comma delimiter) to filter registration on.

readOnlyoptionalBoolean

true = Load registrations in read-only mode (better performance). Default is false.

tooptionalDate

End date for loading registrations. Default is 'from'.

Success 200

FieldTypeDescription
    registrationsObject

Collection of project registrations. All registration entries from 'values' have the same parent coordinates, like employee, project, activity, time type, extra info.

      activityString

Activity ID. If 'expand=activity' then it's the object containing id & description.

        descriptionoptionalString

Activity description. Only if 'expand=activity'.

        idoptionalString

Activity Id. Only if 'expand=activity'.

      avatarURIoptionalString

URI used for loading the employee avatar.

      empIdString

Employee ID.

      empNameString

Employee fullname.

      empNoString

Employee No.

      extraInfooptionalObject

Collection of extra info (project dimensions).

        dimensionNumber

Dimension number. If 0, then record is not a reportin dimension.

        infoString

Extra info ID. If 'expand=extraInfo' then it's the object containing id & description.

          descriptionoptionalString

Extra info description. Only if 'expand=extraInfo'.

          idoptionalString

Extra info Id. Only if 'expand=extraInfo'.

        isFixedValueBoolean

true = Answer needs to be selected from a fixed list.

        valueString

Extra info value ID. If 'expand=extraInfoValue' then it's the object containing id & description.

          descriptionoptionalString

Extra info value description. Only if 'expand=extraInfoValue'.

          idoptionalString

Extra info value Id. Only if 'expand=extraInfoValue'.

      favouriteObjectIdNumber

The unique ID of the favourite project/activity/time type record. Used in connection with 'favouriteType'.

      favouriteTypeNumber

Project/activity/time type is a favourite one if 'favouriteType' > 0 (0: Not favourite, 1: Favourite, 2: Favourite with default time).

Size range: 0-2
      initialsString

Employee initials.

      isLockedBoolean

true = Registrations, including notes, cannot be changed.

      pieceworkoptionalString

Piecework ID. If 'expand=piecework' then it's the object containing id & description.

        descriptionoptionalString

Piecework description. Only if 'expand=piecework'.

        idoptionalString

Piecework Id. Only if 'expand=piecework'.

      projectString

Project ID. If 'expand=project' then it's the object containing id & description.

        descriptionoptionalString

Project description. Only if 'expand=project'.

        idoptionalString

Project Id. Only if 'expand=project'.

      sortEmpNoString

Sort employee No.

      timeTypeString

Time type ID. If 'expand=timeType' then it's the object containing id & description.

        descriptionoptionalString

Time type description. Only if 'expand=timeType'.

        idoptionalString

Time type Id. Only if 'expand=timeType'.

      valuesObject

Collection with registration returned back from the server.

        approvalDeptString

Department secondary to approval group.

        approvalGroupString

The approval group the registration belongs to.

        approvalStatusNumber

Approval status of the registration (0: No approval needed, 1: Pending approval, 2: Approved, 3: Rejected).

        approvalTimeDate

Date-time when registration was approved/rejected.

        approvedByString

The user who approved the registration.

        attendanceDateDate

Date when registration is inserted.

        copyTransSeqNumber

For internal use! It make it possible to register time for the same project/activity/time type from another day.

        endTimeNumber

End time of registration expressed in seconds relative to 'attendanceDate'. Registrations can also be entered as time intervals.

        favouriteObjectIdNumber

The unique ID of the favourite project/activity/time type record. Used in connection with 'favouriteType'.

        favouriteTypeNumber

Project/activity/time type is a favourite one if 'favouriteType' > 0 (0: Not favourite, 1: Favourite, 2: Favourite with default time).

Size range: 0-2
        inclTimeInTotalsBoolean

true = Registered time needs to be included in the total time being displayed.

        noLongerValidBoolean

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.

        noteString

Comment / note on the registration.

        readOnlyBoolean

true = Registration is read only.

        registeredTimeNumber

Time to register expressed in seconds.

        rejectedHigherLevelBoolean

If Rejected at higher level

        signOffByString

If the value starts with "*" then it was the employee that made the sign-off.

        signOffDateTimeDate

Date-time when registration was signed-off.

        signOffStatusNumber

Sign-off status of the registration (0: Sign-off not required, 1: Sign-off pending, 3: Sign-off).

        startTimeNumber

Start time of registration expressed in seconds relative to 'attendanceDate'. Registrations can also be entered as time intervals.

        transSeqNumber

This is the unique transaction number. It will be filled by the server for new transactions.

        treatedByFirstoptionalString

The user who approved the registration first.

        treatedTimeFirstoptionalDate

Date-time when registration was approved/rejected first.

        useIntervalBoolean

true = Use interval in FE false = Use a duration

responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.