AiM IQ REST API – Personal Query as a Data Source

AiM’s REST API supports Personal Queries as a data source.  This guide is intended to assist developers using this option.

Locating a Personal Query and Screen Name in AiM

The REST API account making the service call to a Personal Query must either be the author or included in a group to which the Personal Query has been shared.  If user is not the author, the “filtername” value must be prefixed with the user account of the author followed by “%7D”.

e.g.
filterName=MGG15002%7DSTORRS%20SERIALIZED%20PLUMBING%20ASSETS

In the example below, user has saved a personal query to identify active serialized plumbing assets on the Storrs campus.

To obtain the Screen Name, click on the personal query name hyperlinked at the top of the screen (as highlighted above).  Screen Name will be one of the parameters in the URL, as shown below.  In this example, the value is MASTER_ASSET_DOCUMENT_SEARCH.

Using Personal Query with AiM’s IQ REST API

To use a Personal Query in AiM’s IQ REST API, the personal query name must be URL encoded.

Example

Prior to URL encoding:

STORRS SERIALIZED PLUMBING ASSETS

After URL encoding:

STORRS%20SERIALIZED%20PLUMBING%20ASSETS

Sample REST API call

https://uconnapp.assetworks.com:6443/fmax/api/v3/iq-reports/custom-resource?fields=multitenantId,assetTag,description,assetType,assetGroup&filterName=MGG15002%7DSTORRS%20SERIALIZED%20PLUMBING%20ASSETS&screenName=MASTER_ASSET_DOCUMENT_SEARCH&rowLimit=10

Similar to the Tables as a data source option, the API expects fields to be given in camel case with the first character always lowercase.

Advanced parameters such as Grouping, Sorting and Aggregating are available and explained in the AiM IQ 11.1 Reference Guide REST APIs