4.10. Configuration API

The HTTPS-based suSSHi Chef configuration API uses secure HTTP methods to provide CREATE, READ, UPDATE and DELETE (CRUD) operations on the model abstractions of data stored within suSSHi Chef’s database.

The API documentation, which is available under Dashboard > API Manual in suSSHi Chef, contains details about all API resources and their HTTP methods together with example data and schema definitions for the request and response bodies.

../_images/list7.png

4.10.1. API Tokens

In order to create a new API token, click System > API Tokens > New. Select the partition for which the token should be valid and a self-explanatory name. Additionally, you may want to customize the permissions of the token.

../_images/new3.png

After hitting Create, the newly created token will be displayed.

../_images/created.png

Warning

Please copy the API token and keep it in a safe place or send it to the client who wants to access the API with this token. The token is displayed only once after creation!

4.10.2. Postman

Postman is an API platform for building and using APIs. Postman offers collections of pre-built requests that can be easily exported and shared with others. A Postman collection for the suSSHi Chef configuration API can be downloaded here.

After importing the Postman collection, you need to customize the Postman environment:

Postman Environment
{
  "name": "suSSHi Chef Config API Environment",
  "values": [
    {
      "key": "susshi_chef_api_scheme",
      "value": "https",
      "enabled": true
    },
    {
      "key": "susshi_chef_api_host",
      "value": "YOUR_SUSSHI_CHEF_API_HOST",
      "enabled": true
    },
    {
      "key": "susshi_chef_api_application",
      "value": "YOUR_SUSSHI_CHEF_API_APPLICATION_NAME",
      "enabled": true
    },
    {
      "key": "susshi_chef_api_token",
      "value": "YOUR_SUSSHI_CHEF_API_TOKEN",
      "enabled": true
    }
  ]
}

Download the Postman environment here.