CLI
CLI is a tool for centrally executing JSON-formatted commands on specified sites.
The tool allows you to:
execute requests on multiple sites;
track their status;
analyse responses for each site;
re-run failed requests;
save requests as templates;
work with templates and reuse them.
Getting started with CLI
select CLI in the side menu of the interface
or, on the Sites page, select one or more sites and click CLI in the context menu or in the group operations menu
1. Request editor
1.1 Creating a new request
To create a CLI request, click New request.
CLI supports three types of requests:
GET
POST
DELETE
The request type is selected using the tabs at the top of the form.
A request can be specified in one of two ways:
JSON format
The user enters the request body in JSON format in the editor. Formatting and editing functions are available.
URL command
The user enters a command in the URL field after the prefix. For example:
show/mws/member
Next, click Select sites. A modal window for site selection will open. Check the boxes for the sites where the request should be executed, then click Continue.
At the next step, verify that the list of sites is correct, then click Confirm.
To send the command, click Execute in the request editor form.
The submitted request is displayed in History and is no longer editable.
1.2 Request statuses
Each request can have one or more statuses (depending on the number of selected sites):
Draft — the request has not been sent or saved to history.
In progress — the request is being executed.
Success — the request was successfully executed on the site.
Error — the request execution failed.
1.3 Viewing responses
To view the response for each site, select the required site from the dropdown list next to the response field. For each site, the following is displayed:
the response body;
or an error message if the response body is absent.
1.4 Saving a request as a template
The current request can be saved as a template:
Click Save as template.
The request will be saved in the Templates section and will be available for reuse.
1.5 Retry for failed
The Retry for failed button lets you re-run the request only for the sites that received an Error status.
2. History
The History section allows you to view and manage previously executed CLI requests. It enables tracking request execution status, analysing results and errors, and rerunning failed requests. Records from history cannot be deleted.
For auditing and team collaboration purposes, the following events are automatically recorded in the Event Log:
sending a CLI request;
completion of a CLI request (successful or failed).
3. Templates
Templates are used to save frequently executed requests so they can be reused without re-entering parameters. They help speed up operations and reduce the likelihood of errors when working with the CLI.
3.1 Creating a new template
A template can be created:
manually in the Templates section using the Create template button;
or from an open request in the History section using the Save as template button.
The following actions are available:
Execute a request from a template
Duplicate a template
Rename a template
Edit and save a template
Delete a template
3.2 Executing a request from a template
Please verify that the list of selected sites is correct before executing the request. When you click Execute, a Request is created from the open template and displayed in the History section.
4. Team collaboration and user roles
Users with the Owner, Administrator, Manager, and Viewer roles can execute CLI commands on the Owner’s sites. Within the controller, restrictions are applied depending on the team member’s role.