O'Reilly logo

Mastering Chef by Mayank Joshi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required