App API
Series of routes which are used to interact with assets, configuration, operational and emission data in Validere
Search
All top-level API resources have support for bulk fetches through “search” API methods. For example, you can list facilities, list equipment, and list devices. These search API methods share a common structure and accept common parameters: page, page_size, sort_by, sort_direction and filter.
Pagination parameters
page: An index for the page number for pagination across multiple pages of results. Omitting this will return the first page of results.page_size: A limit on the number of objects to be returned per pagesort_by: Attribute to order the searched results by, similar toORDER BYin SQLsort_direction: Direction to order the sorted results, supportsascanddesc
Filtering
Search APIs accept a filter parameter which supports a query string similar to Mongo to help improve the efficiency of a search request and to reduce unnecessary traffic.
For equality: use
<field>:<value>expressions
{ <field1>: <value1>, ... }Example, search all equipment where status equals active
{ "status": "active" }For multiple conditions use the following form
Example, search all equipment where status equals either active or unknown
For multiple
ANDconditions, add additional key-value pairs to thefilterobject Example, search all equipment wherestatusisactiveAND region isCanada
For multiple
ORconditions, use the$oroperator. Each argument in the subsequent list is a separate clause. Example, search all equipment wherestatusisactiveOR region isUSA
Combining
ANDandOREither status isunknownOR (activeAND inUSA)
Last updated