fluke/devops-service/doc/chef.md

127 lines
1.7 KiB
Markdown
Raw Normal View History

2018-04-04 22:44:39 +03:00
# Chef parameters API
## Get bootstrap templates list [GET /v3/chef/bootstrap_templates]
> Get available bootstrap templates list
### Request
* Policy: read_chef
* Method: GET
* Headers:
* Accept: application/json
### Response
**Status: 200**
* Headers:
* Content-Type: application/json
* Body:
```json
[
"omnibus"
]
```
## Get node tags list [GET /v3/chef/tags/:cm_name]
> Get tags list for node :cm_name
### Request
* Policy: read_chef
* Method: GET
* Headers:
* Accept: application/json
### Response
**Status: 200**
* Headers:
* Content-Type: application/json
* Body:
```json
[
"tag"
]
```
### Response
**Status: 404**
* Headers:
* Content-Type: application/json
* Body:
```json
{
"message": "cm_name not found"
}
```
## Set node tags [POST /v3/chef/tags/:cm_name/set]
> Set tags for node :cm_name
### Request
* Policy: modify_chef_tags
* Method: POST
* Headers:
* Accept: application/json
* Body:
```json
[
"tag"
]
```
### Response
**Status: 200**
* Headers:
* Content-Type: application/json
* Body:
```json
{
"message": "ok",
"tags": []
}
```
### Response
**Status: 404**
* Headers:
* Content-Type: application/json
* Body:
```json
{
"message": "cm_name not found"
}
```
## Unset node tags [POST /v3/chef/tags/:cm_name/unset]
> Unset tags for node :cm_name
### Request
* Policy: modify_chef_tags
* Method: POST
* Headers:
* Accept: application/json
* Body:
```json
[
"tag"
]
```
### Response
**Status: 200**
* Headers:
* Content-Type: application/json
* Body:
```json
{
"message": "ok",
"tags": []
}
```
### Response
**Status: 404**
* Headers:
* Content-Type: application/json
* Body:
```json
{
"message": "cm_name not found"
}
```