Clear cookbooks and roles
Clears cookbooks and roles from the pattern manager.
POST /v1/clear_env/chef
Description
Deletes cookbooks and roles from the pattern manager. You can specify to delete cookbooks, roles, or both. By default all cookbooks and roles are deleted.
This API requires the pattern manager admin token.
Parameters
The following table lists the parameters that are used to clear cookbooks and roles from the pattern manager:
Type | Name | Description | Schema | Default | Required |
---|---|---|---|---|---|
Body | cookbooks | States whether cookbooks should be deleted | Boolean | True | No |
Body | pattern | Delete cookbooks and roles that match this pattern | String |
|
No |
Body | roles | States whether roles should be deleted | Boolean | True | No |
Example Request
POST /v1/clear_env/chef
Header: Authorization = Bearer $ADMIN_TOKEN
{
"cookbooks": "true",
"roles": "true",
"pattern": "db2.*"
}
Responses
The table lists responses that are returned for a request to clear cookbooks and roles from the pattern manager:
HTTP Code | Description | Schema |
---|---|---|
200 | OK | No content |
400 | Bad Request | |
403 | The requester has not specified the correct access token in the Authorization HTTP header | |
500 | Internal server error |