ProSchedule - Get the total hours of the employees of a plan.

API Url

Used for getting the total hours for the employees of a plan.

GET
http://localhost:16010/ProMarkREST/rest/ProRoster/plans/{id}/total-hours

Permissions: user

Path parameters

FieldTypeDescription
idNumber

The plan id.

Query parameters

FieldTypeDescription
empIdsoptionalString

List of employee ids separated by comma. Used to return the data only for certain employees. If list contains employees that are not in the plan, they are ignored.

fromoptionalDate

The start date of the period inside a plan ( If not provided default is start of the current week).

groupByoptionalString

date = calculate total hours grouped by date

tooptionalDate

The end date of the period inside a plan ( If not provided default is end of the current week).

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    totalHoursObject[]
      empIdString

The Id of the employee in plan.

      totalHoursNumber

The total hours of the employee in the period received as query parameters.

  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": {
"totalHours": [
{
"empId": "1314",
"totalHours": 135000
},
{
"empId": "1313",
"totalHours": 135000
},
{
"empId": "1316",
"totalHours": 135000
}
]
},
"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.