VMmanager: Administrator guide

Using Swagger

Swagger is an interactive shell for exploring the work of API. With Swagger, you can generate a request for an API function of the platform and check how that function works.

To open the Swagger web interface, in the right menu click Swagger.

Entering the Swagger interface

The Swagger interface is available at the URL https://domain.com/swagger/.

Comments to the URL

Swagger sections

Swagger contains a description of the following DCImanager 6 API services:

  • vm — platform main service. Read more in VMmanager API;
  • auth_v4 — authorization service. Read more in Auth API v4;
  • alert — notification settings service;
  • balancer — balancer service;
  • ipmgr — service for operations with IP-addresses, pools and networks. Read more in IPmanager 6;
  • license — licensing service;
  • msgsender — email sending service;
  • notice_center — service for sending notifications to the platform interface;
  • plugin — plugin service;
  • rDNS proxy service — service for operations with reverse PTR records. To use the service, install the Integration with DNSmanager 6 module. Without the module installed, API requests will return a 404 error. Read more about the module in Integration with DNSmanager 6 module;
  • updater — platform updating service;
  • uploader — ISO upload service.

To switch between services, select the desired section in the Select a definition field.

Selecting a section

Execute API requests

API requests are executed with real platform objects. Before executing the query, make sure that the actions you perform will not interfere with VMmanager.

To execute a request:

  1. Select the required function and press Try it out.
  2. Enter the required parameters and the request body and press Execute.

After the request has been executed, the Responses section displays the request format for the curl utility and the server response.

Section interface

Usage examples

Changing the session lifetime

  1. In the Select a definition field select Auth v4.
  2. Select a POST request /setting/{name}.
  3. Click the Try it out button.
  4. In the Name field enter: token_ttl.
  5. Enter the Request body:

    {
      "value": "<time>"
    }

    <time> — required session lifetime, min

  6. Click the Execute button.

Useful tips