> ## Documentation Index
> Fetch the complete documentation index at: https://docs.endorlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Best practices

> Follow these best practices when using the Endor Labs REST API.

## Using endorctl

* Enable [tab-completion](https://docs.endorlabs.com/developers-api/cli/commands/completion.md).
* Use [interactive mode](https://docs.endorlabs.com/developers-api/cli/commands/api.md#endorctl-api-update-interactive-mode) for creates and updates.

## Optimize queries

* Use the [count](https://docs.endorlabs.com/developers-api/rest-api/using-the-rest-api/getting-started.md#list-parameters) flag if you only need the total number of objects matching the query.
* Use [grouping](https://docs.endorlabs.com/developers-api/rest-api/using-the-rest-api/grouping.md) if you only need the number of objects per unique value of a given field, or a set of fields.
* Use [field-masks](https://docs.endorlabs.com/developers-api/rest-api/using-the-rest-api/masks.md) to return only the fields you need.
* [Filter](https://docs.endorlabs.com/developers-api/rest-api/using-the-rest-api/filters.md) on [common fields](https://docs.endorlabs.com/developers-api/rest-api/using-the-rest-api/data-model/common-fields.md) such as `uuid` or `meta.name` before resource kind specific fields.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.