Search for assets and tags in the asset framework that match the query pattern.

tm_af_search_assets(token, query, ...)

Arguments

token

A valid access token

query

Search query

...

Additional arguments passed on to the underlying HTTP method. This might be necessary if you need to set some curl options explicitly via config.

Value

A data frame with search results. Each row represents one asset/tag which matched the query pattern. The column names of the data frame returned correspond to the search properties listed in Details. The only exception from this pattern are the ìd search property which will be represented by the nodeId column and the data search property which will be represented by the tagName column. Data frames containing only asset but no tag search results won't include the dataType and tagName columns.

Details

tm_af_search_assets() allows to search for nodes in the TrendMiner asset framework with arbitrary queries. A node either represents an asset (component of the plant) or a tag (attribute of an asset storing timeseries data). tm_af_search_assets() is powering a couple of other functions under-the-hood like, e.g., tm_af_assets() and tm_af_tags() which offer a higher abstraction level by using pre-defined search queries.

Available query operators

  • Search operators: equal(==), not equal(!=), in(=in=), not in(=out=)

  • Logical operator: AND(;), OR(,)

  • Wildcard operator: *

List of node properties you can search on

  • id Node id (in UUID format)

  • sourceId

  • type Type of the node. Either "ASSET" or "ATTRIBUTE" whereas the later refers to a tag

  • externalId

  • template

  • templateId

  • name Name of the node

  • description Description of the node

  • options

  • deleted Boolean value. Either "TRUE" or "FALSE"

  • dataType Only available for nodes of type "ATTRIBUTE"

  • data Tag name. Only available for nodes of type "ATTRIBUTE"

Examples

if (FALSE) { token <- tm_token() # Retrieve all assets that have "Reactor" in their name tm_af_search_assets(token, 'type=="ASSET";name=="*Reactor*"') # Retrieve all tags whose name starts with "Temperature" tm_af_search_assets(token, "type=='ATTRIBUTE';name=='Temperature*'") }