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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.endorlabs.com/feedback

```json
{
  "path": "/developers-api/rest-api/using-the-rest-api/best-practices/index",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Best practices

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

## Using endorctl

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

## Optimize queries

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