WebAPI – How do I get work orders assigned to user?

WebAPI – How do I get work orders assigned to user?

This method returns the work orders list assigned to each employee.

 The method to be used to get the work orders list assigned to the employee is:

GET /api/mytenant/myorganization/maintenance/workorders/getWorkOrdersAssignedToEmployee?version=AAAA&stateKey=002WORKORDER;006WORKORDER&maxRecords=100&assignedTo=user@domain.com&daysLimit=100

 The method parameters are optional, however, the method receives the employee to filter WOs. If the parameter maxRecords is not specified, it returns a maximum of 100 records. The logic is the following:

  1. assignedTo: returns all WOs assigned to that employee, this parameter must be the username
  2. .stateKey: returns all WOs assigned with these states, this parameter must be the state key. Allows to define the list of values separated by “;”
  3. maxRecords: number of WOs to be returned, this parameter must be an integer, equal or inferior to 200
  4. daysLimit: returns all WOs assigned with a creation date inferior to the number of days defined in this parameter
  5. version: returns all WOs assigned with a version superior to this parameter, this parameter must be base64. If not specified, the value AAAA will be considered.

The server returns an answer HttpStatusCode.OK, with the WOs assigned to the employee. If the parameter maxRecords is specified and the value is equal or inferior to 200, it returns the number of records. If the parameter value is higher than 200, it returns an error message.