Skip to content

Work Order Management Service – Filtering

GET All workorders endpoints with the parameter filter supports querying for filterable properties.

When reading the work orders, all work orders are filtered for the main tenant. In addition, you can provide one or more field names in the filter query (all other field names will be ignored):

  • woHandle
  • dueDate
  • notifyAssignee
  • title
  • type
  • status
  • assignedTo
  • description
  • source
  • priority
  • createdBy
  • createdDate
  • modifiedBy
  • modifiedDate

Wildcards are not supported. Timestamps must be in the following example format: 2023-01-01T00:00:00.00Z

When a filter has no matches, the response will be empty.

Filter functions

Function eq (equals)

{
  "status": "OPEN"
}

or

{
  "status": {
    "eq": "OPEN"
  }
}

Function in

The function in is similar to equals, but instead matching to one value, it checks an array of values, and matches for any of them.

{
  "status": {
    "in": ["OPEN", "DONE"]
  }
}

Function notIn

The function notIn is reverse to in. It checks an array of values and matches for none of them.

{
  "status": {
    "notIn": ["OPEN", "DONE"]
  }
}

Function startsWith

{
  "title": {
    "startsWith": "Rule"
  }
}

Function endsWith

{
  "createdBy": {
    "endsWith": "@test.com"
  }
}

Function like

The function returns work orders whose title includes Rule either as prefix or suffix. %25 is encoded form of %

{
  "title": {
    "like": "%25Rule%25"
  }
}

Function notLike

The function notLike is reverse to like, returns the work orders whose title includes Rule neither as prefix nor suffix. %25 is encoded form of %

{
  "title": {
    "notLike": "%25Rule%25"
  }
}

Function gt

The function gt operates as greater than the input value as matching criteria to filter work orders.

{
  "createdDate": {
    "gt": "2023-11-01T00:00:00.00Z"
  }
}

Function gte

The function gte operates as greater than and equals to the input value as matching criteria to filter work orders.

{
  "createdDate": {
    "gte": "2023-11-01T00:00:00.00Z"
  }
}

Function lt

The function lt operates as less than the input value as matching criteria to filter work orders.

{
  "createdDate": {
    "lt": "2023-11-01T00:00:00.00Z"
  }
}

Function lte

The function lte operates as less than and equals to the input value as matching criteria to filter work orders.

{
  "createdDate": {
    "lte": "2023-11-01T00:00:00.00Z"
  }
}

Function between

The function between operates as within the range of input values as matching criteria to filter work orders.

{
  "createdDate": {
    "between": ["2023-11-01T00:00:00.000Z", "2023-11-12T23:59:59.999Z"]
  }
}

Function notBetween

The function notBetween operates as outside of the range of input values as matching criteria to filter work orders.

{
  "createdDate": {
    "notBetween": ["2023-11-01T00:00:00.000Z", "2023-11-12T23:59:59.999Z"]
  }
}

Filter operations

Operation and

{
  "status": "OPEN",
  "createdBy": {"endsWith": "@test.com"}
}

or

{
  "status": {
    "in": ["OPEN","DONE","CANCELLED","ARCHIVED"]
  },
  "createdBy": {"endsWith": "@test.com"}
}

Nested fields

Field associations

You can filter work orders for any associated input asset or event ID(s).

E.g., all the work orders that includes asset of ID cb72dfd7400e4fc6a275f22e6751cce6 of type ASSET will have below request filter parameter json.

{
  "associations": [
    {
      "type": "ASSET",
      "id": "cb72dfd7400e4fc6a275f22e6751cce61"
    }
  ]
}

E.g., all the work orders that includes multiple events of type EVENT will have below request filter parameter json.

{
  "associations": [
    {
      "type": "EVENT",
      "id": "c72d22e6751cce6"
    },
    {
      "type": "EVENT",
      "id": "b14d22e6751cce6"
    }
  ]
}

Note

Filtering work orders based on nested fields associations matches for any asset/event type in the work orders list for that specific tenant, the field id additionally matches with the given asset/event type.

Field externalSystems

You can filter work orders for any associated input external systems name(s) based on multiple parameters.

E.g., all the work orders that includes type as source and name as Senseye and type as will have below request filter parameter json.

{
  "externalSystems": [
    {
      "type": "source",
      "name": "Senseye"
    }
  ]
}

Community

Connect and Collaborate with Industrial Professionals and Join the Community!

Click to load comments