ProJect - Get favourite selections

API Url

Used for loading employee favourite project selection (templates).

GET
http://localhost:16010/ProMarkREST/rest/ProJect/employees/{id}/favourites

Permissions: user

Path parameters

FieldTypeDescription
idString

Employee ID for whom to get favourites.

Query parameters

FieldTypeDescription
endDateoptionalDate

End date to query to.

fieldsoptionalString

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

startDateoptionalDate

Start date to query from.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    favouritesObject[]

Collection of project favourites.

      activityDescString

Activity description.

      activityIdString

The Activity identifier.

      extraInfooptionalObject[]

Collection of project extra info.

        infoString

Extra info type (ex: "DEPT:", "GROUP:", "FREE").

        valueDescString

Extra info value description.

        valueIdString

Extra info value identifier, related to 'extraInfo.info'.

      idNumber

Unique identifier of the favourite record.

      pieceworkDescoptionalString

Piecework description.

      pieceworkIdoptionalString

The piecework identifier.

      projectDescString

Project description.

      projectIdString

The Project identifier.

      registeredTimeoptionalNumber[]

Default registration time in seconds for one week, starting with Monday.

      timeTypeDescoptionalString

Time type description.

      timeTypeIdoptionalString

The Time type identifier.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.