Supported Features

OData Features Supported in APM

OData Service Resource (Base URL): {{host}}/meridium/api/odata

The following OData features are supported:

TitleDescription
MetadataGenerates metadata of the service ($metadata)
EntityCollectionReturns the collection of entities for a family
EntityByIdReturns an entity identified by entity key
PropertyReturns the property of an entity identified by entity key
Projected EntitiesReturns selected properties of an entity ($select)
Server-driven paginationQueries the data by pages
System queriesBasic system query options

System Queries

The following system query options are supported on the root entity:

  • $metadata (schema)
  • $count
  • $select (limited to depth level of 1)
  • $filter
  • $top
  • $orderby
  • $expand (to get relationship data, limited to depth level of 1)
  • $skip

Functions

You can use the following functions in your query:
FunctionDescription
startswithThis function determines whether a string begins with the characters of a specified string, returning true or false as appropriate. It is used to filter data based on key words of a property.

~/odata/Work_Order?$filter=startswith(Work_Order_ID ,'WO1')

endswithThis function determines whether a string ends with the characters of a specified string, returning true or false as appropriate. It is used to filter data based on key words of a property.

~/odata/Work_Order?$filter=endswith(Work_Order_ID ,'O12')

containsThis function determines whether a string contains the characters of a specified string, returning true or false as appropriate. It is used to filter data based on key words of a property.

~/odata/Work_Order?$filter=contains(Work_Order_ID ,'WO2101')

roundThis function rounds off a number to a specified number of decimal places. It is used to filter data by rounding off a decimal value for a property and compare with a given decimal value.

~/odata/Work_Order?$filter=round(Labor_Cost) eq 1000

tolowerThis function converts a string to lowercase letters. It is used to convert data of a property to lowercase and compare to a given word.

~/odata/Work_Order?$filter=tolower(Work_Order_Type) eq 'other'

toupperThis function converts a string to uppercase letters. It is used to filter data by converting data to uppercase and compare with a given word.

~/odata/Work_Order?$filter=toupper(Work_Order_Type) eq 'OTHER'

floorThis function returns the largest integer value that is smaller than or equal to a number. It is used to filter data by rounding off to the floor value.

~/odata/Work_Order?$filter=floor(Labor_Cost) gt 1000

ceilingThis function returns the smallest integer value that is larger than or equal to a number. It is used to filter data by rounding off to the ceiling value.

~/odata/Work_Order?$filter=ceiling(Labor_Cost) gt 1000

yearThis function returns the year in a given date (a number from 1000 to 9999). It is used to filter data based on a year.

~/odata/Work_Order?$filter=year(WO_Close_Date) gt 2000

monthThis function returns the month part for a given date (a number from 1 to 12). It is used to filter data based on a month.

~/odata/Work_Order?$filter=month(WO_Close_Date) gt 02

dayThis function returns the day of the month (from 1 to 31) for a specified date. It is used to filter data based on a day.

~/odata/Work_Order?$filter=day(WO_Close_Date) gt 21

lengthThis function returns the length of the string. It is used to filter data based on the length of the string.

~/odata/Work_Order?$filter=length(Work_Order_ID) gt 6

trim This function removes leading and trailing spaces from a string. It is used to ignore the leading and trailing spaces and filter the data.

~/odata/Work_Order?$filter=trim(ID) eq 'WO-8300333'

Binary Operations

You can use the following binary operations in your query:

  • Add
  • And
  • Divide
  • Equal
  • GreaterThan
  • GreaterThanOrEqual
  • LessThan
  • LessThanOrEqual
  • Multiply
  • NotEqual
  • Or
  • Subtract
  • Modulo