> For the complete documentation index, see [llms.txt](https://docs.validere.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validere.com/guides/api/app.md).

# App API

Series of routes which are used to interact with assets, configuration, operational and emission data in Validere

{% hint style="info" %}
`https://api.validere.io/app`
{% endhint %}

## 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 page
* `sort_by`: Attribute to order the searched results by, similar to `ORDER BY` in SQL
* `sort_direction`: Direction to order the sorted results, supports `asc` and `desc`

### 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

```
{ <field1>: { <operator1>: <value1> }, ... }
```

Example, search all equipment where `status` equals either `active` or `unknown`

```
{ "status": { $in: [ "active", "unknown" ] } }
```

* For multiple `AND` conditions, add additional key-value pairs to the `filter` object Example, search all equipment where `status` is `active` AND region is `Canada`

```
{ "status": "active", "region": "Canada" }
```

* For multiple `OR` conditions, use the `$or` operator. Each argument in the subsequent list is a separate clause. Example, search all equipment where `status` is `active` OR region is `USA`

```
{ "$or": [{"status": "active"}, {"region": "USA"}] }
```

* Combining `AND` and `OR` Either status is `unknown` OR (`active` AND in `USA`)

```
{ "status": "unknown", "$or": [{"status": "active"}, {"region": "USA"}] }
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.validere.com/guides/api/app.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
