Apart from these endpoints, the Chef server API provides us with an endpoint to query data indexed by the Chef server. This includes data bags, environments, roles, and nodes. The Chef server API provides two endpoints for the purposes of search:
/search/INDEX. The search engine used by Chef is based on Apache Solr. You can do a full-text query using a defined query syntax. Chef provides support for search, using different patterns such as exact, wildcard, range, and fuzzy.
/search endpoint allows you to search for data bags, roles, nodes, and environments. It has support for the
GET method returns a JSON with links to each available search index.
For a request, we can use the following code:
GET /search ...