Search
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
and /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
The /search
endpoint allows you to search for data bags, roles, nodes, and environments. It has support for the GET
method.
GET
The GET
method returns a JSON with links to each available search index.
For a request, we can use the following code:
GET /search
Response:
The response will return something like this:
{ "client": "https://chef.indix.tv:443/search/client", "environment": "https://chef.indix.tv:443/search/environment", "node": "https...