Skip to main content
The Endor Labs REST API provides the Query Service for flexible requests for resources. The Endor Labs REST API also provides the ability to save and manage queries for your own use cases through the Saved Query Service. See Using the Query Service for examples on using the Query Service to specify and request resources from the Endor Labs REST API.

Creating a saved query

To create a saved query, embed a Query object specifying the request in a SavedQuery object.

Updating a saved query

The following example updates the Query specified in the SavedQuery to add additional list parameters.
See also interactive mode for managing updates to a SavedQuery with endorctl api update:

Evaluating saved queries

After you create a Saved Query, you can evaluate the request specified by its Query on demand.
The response returns the resulting data in a nested field under the Query specification. Use the jq command to extract the nested data. For the example queries given above, the following command will evaluate the given saved query, and extract the list of Finding objects from the Query response: