# Config Rest API

Overview

Resource | Operation | Description
--- | --- | ---
Config | GET /configs/(section) | List full config.
OptionGetDel | GET /configs/(section)/(option) | get config value.
| DELETE /configs/(section)/(option) | delete an option.
OptionSet | PUT /configs/(section)/(option)/(value) | set config value.
Section | GET /configs/(section) | List config section.

Details

`PUT` `/configs/`(section)`/`(option)`/`(value)

  Set the value of an option. If the option does not exist, create it.

  Status Codes: | 201 Created – Option successfully created or updated. 401 Unauthorized – Invalid Auth Token. 500 Internal Server Error – Configuration Error.

`GET` `/configs/`(section)`/`(option)

  Retrieve the value of an option.

  Parameters: | section – The section name.
  Response Headers:
  | Content-Type – application/json
  Status Codes: | 200 OK – OK. 401 Unauthorized – Invalid Auth Token. 404 Not Found – Config not found. 500 Internal Server Error – Internal Error.

`DELETE` `/configs/`(section)`/`(option)

  Delete an option.

  Status Codes: | 200 OK – OK. 401 Unauthorized – Invalid Auth Token. 500 Internal Server Error – Internal Error.

`GET` `/configs/`(section)

  List configuration of a section

  Parameters: | section – The section name.
  Response Headers:
  | Content-Type – application/json
  Status Codes: | 200 OK – OK. 401 Unauthorized – Invalid Auth Token. 404 Not Found – Config not found. 500 Internal Server Error – Internal Error.

`GET` `/configs/`(section)

  List full configuration.

  Response Headers:
  | Content-Type – application/json
  Status Codes: | 200 OK – OK. 401 Unauthorized – Invalid Auth Token. 500 Internal Server Error – Internal Error.