This code provides a go client interface to the chefapi to interact with users. Running this code provides a simpler API than the native chef REST API for use by web applications. See the chefapi_demo_server repository to see how this code was installed and started.
=================
==============
===============
=================
=================
Filter values may restrict the returned information to a specific owner of the users and to a specific organization. If not set users for all users and/or all organizations will be returned.
The request can specify filter values in a json body.
{
"user": "username",
"organization" "orgname"
}
The body returned looks like this:
{
"organization": "orgname",
"admins": [
"user1",
"user2"
],
"users": [
"user1",
"user2"
]
}
Values 200 - List returned 400 - Invalid request was made 403 - Unauthorized request was made
================================
The body returned looks like this:
{
"name": "user_name",
"chef_environment": "_default",
"run_list": [
"recipe[recipe_name]"
]
"json_class": "Chef::Node",
"chef_type": "user",
"automatic": { ... },
"normal": { "tags": [ ] },
"default": { },
"override": { }
}
Values 200 - Node data returned 400 - Invalid request was made 403 - Unauthorized request was made
================================
The request body looks like this:
{
"name": "user_name",
"chef_environment": "_default",
"run_list": [
"recipe[recipe_name]"
]
"json_class": "Chef::Node",
"chef_type": "user",
"automatic": { ... },
"normal": { "tags": [ ] },
"default": { },
"override": { }
}
No body is returned
Values
200 - Node data returned
400 - Invalid request was made
403 - Unauthorized request was made
## Back End Chef Infra Server Endpoints used
-----------
### DELETE /Users
### POST /Users
### GET /Users
### POST /Associations
### GET /Groups/NAME