AiM IQ REST API – Table as a Data Source

AiM's REST API supports tables as a data source. This guide is intended to assist developers locate table and column names via AiM's user inteface (UI).

Finding table and column source in AiM

On most AiM screens, including search screens, table and column information can be obtained by double-clicking on the field’s label text (shown below is Asset Type)

In the above example, the modal window displays the TABLE.COLUMN value for the field Asset Type.

Table: ae_a_asset_e

Column: asset_type

Using table and column with AiM's IQ REST API

Overview

To reference a table and/or column in AiM’s IQ REST API, the table and column must be converted to camel case with two important caveats:

  1. Tables must always start with uppercase
  2. Columns must always start with lowercase

Example

Table: AeAAssetE

Column: assetType

Sample REST API call

https://uconnapp.assetworks.com:6443/fmax/api/v3/iq-reports/custom-resource?fields=multitenantId,assetTag,description,assetType,assetGroup&tableName=AeAAssetE&rowLimit=10

String Parameters

Any field in the target table can be filtered by passing the field name in the URL as a parameter with value.

Example

https://uconnapp.assetworks.com:6443/fmax/api/v3/iq-reports/custom-resource?fields=multitenantId,assetTag,description,assetType,assetGroup&tableName=AeAAssetE&assetTag=UCONN-027120

Multiple values can also be passed as a comma separated list. The values are treated similar to an "IN" statement.

Example

https://uconnapp.assetworks.com:6443/fmax/api/v3/iq-reports/custom-resource?tableName=AeAAssetE&rowLimit=10&assetTag=0007492,0015815

Time Periods

Restrict any returned date field using a pre-defined period of time. Must include parameter "date" with a value reflecting the date field to be filtered (e.g, entDate, editDate, etc.), along with parameter "timePeriod" and a value from the list below.

  • timePeriod=PM (Previous Month)
  • timePeriod=CM (Current Month)
  • timePeriod=PY (Prior Calendar Year)
  • timePeriod=CY (Current Calendar Year)
  • timePeriod=PF (Previous Fiscal Year)
  • timePeriod=CF (Current Fiscal Year)

Example - Returns all phases created in the current month

https://uconnapp.assetworks.com:6443/fmax/api/v3/iq-reports/custom-resource?tableName=AePPhsE&date=entDate&timePeriod=CM

Date Ranges

Restrict any returned date field using a range of dates. Must include parameter "date" with a value reflecting the date field to be filtered (e.g, entDate, editDate, etc.), "timePeriod=C" (custom), and both "startDate" and "endDate" (format is YYYY-MM-DD).

Example - Returns all phases created between 4/1/2022 and 6/30/2022

https://uconnapp.assetworks.com:6443/fmax/api/v3/iq-reports/custom-resource?tableName=AePPhsE&date=entDate&timePeriod=C&startDate=2022-04-01&endDate=2022-06-30