# Digibeectl operations

With simple commands, you can easily configure your customer. Settings are automatically saved to a file, speeding up subsequent commands.

Follow the table for the standard syntax and descriptions for performing operations in Digibeectl:

<table data-full-width="true"><thead><tr><th>Operation</th><th>Syntax</th><th>Description</th></tr></thead><tbody><tr><td>completion</td><td><code>digibeectl completion SUB-COMMAND [flags]</code></td><td>Generate the autocompletion script for digibeectl for the specified shell.</td></tr><tr><td>config</td><td><code>digibeectl config [flags]</code></td><td>Configure digibeectl.</td></tr><tr><td>create</td><td><code>digibeectl create RESOURCE [flags]</code></td><td>Command to create resources</td></tr><tr><td>delete</td><td><code>digibeectl delete RESOURCE [flags]</code>   </td><td>Command to delete resources</td></tr><tr><td>get</td><td><code>digibeectl get RESOURCE [flags]</code></td><td>Get all resources or a specific resource.</td></tr><tr><td>help</td><td><code>digibeectl get SUB-COMMAND or RESOURCE [flags]</code>   </td><td>Help about any command.</td></tr><tr><td>info</td><td><code>digibeectl info [flags]</code>  </td><td>Show all commands available.</td></tr><tr><td>set</td><td><code>digibeectl create RESOURCE [flags]</code></td><td>Set a specific resource.</td></tr><tr><td>update</td><td><code>digibeectl update [flags]</code></td><td>Update digibeectl to the latest version.</td></tr><tr><td>version</td><td><code>digibeectl version [flags]</code></td><td>Show the version info of digibeectl.</td></tr></tbody></table>

Below you can see the Help documentation within Digibeectl:

<figure><img src="https://content.gitbook.com/content/jvO5S91EQURCEhbZOuuZ/blobs/o9YBe80wXmfxpV6v3DhA/digibeectl_updated.png" alt=""><figcaption></figcaption></figure>

## Resource types <a href="#h_fb9a16b016" id="h_fb9a16b016"></a>

Resource types are the specific resources to be accessed and used to compose certain commands.

Check out the sages examples for resource type:

```
digibeectl [command] <resource> <resource-id> [flags]
digibeectl [command] [resource] [flags]
```

The following table includes a list of all the supported resource types and their abbreviated aliases: <br>

<table data-full-width="true"><thead><tr><th>Operations</th><th width="379">Resources</th><th>Description</th></tr></thead><tbody><tr><td>create, delete, get</td><td>api-mgmt-credentials</td><td>Create/ delete / get API credentials for Pipeline Metrics API.</td></tr><tr><td>create, delete, get</td><td>deployment</td><td>Create/ delete deployments/ Retrieve details of a specific deployment.</td></tr><tr><td>get</td><td>api-mgmt-url</td><td>Get API URL for Pipeline Metrics API.</td></tr><tr><td>get</td><td>deployment-history</td><td>Get all deployment history.</td></tr><tr><td>get</td><td>license</td><td>Display the realm's license information. By using flags, you can view the license details filtered by pipeline or project.</td></tr><tr><td>get</td><td>metrics</td><td>Get metrics from a valid pipeline.</td></tr><tr><td>get</td><td>pipeline</td><td>Read content from the pipeline.</td></tr><tr><td>get</td><td>project</td><td>Read available projects.</td></tr><tr><td>get</td><td>realm</td><td>Get realm resource.</td></tr><tr><td>create</td><td>pipeline</td><td>Creates a new pipeline.</td></tr><tr><td>create</td><td>project</td><td>Creates a new project.</td></tr><tr><td>set</td><td>deployment</td><td>Manage deployment operations.</td></tr></tbody></table>

## Resource flags <a href="#h_622125f56c" id="h_622125f56c"></a>

The following tables categorize resources based on their corresponding operations and indicate the **respective flags for each operation**:

### **Deployment**

<table data-full-width="true"><thead><tr><th>Operation</th><th>Resource</th><th>Flags</th><th>Shorthand</th><th>Description</th><th>Permission</th></tr></thead><tbody><tr><td><strong>get</strong></td><td>deployment</td><td><br></td><td><br></td><td>List deployments.</td><td>DEPLOYMENT:READ</td></tr><tr><td><br></td><td><br></td><td>--deployment-id</td><td>-d</td><td>Filter deployment by ID.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--environment</td><td>-e</td><td>Filter deployments by environment (default "test").</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--name</td><td>-n</td><td>Filter deployments by name.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--projectName</td><td>-p</td><td>Filter deployments by project name.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--status</td><td>-s</td><td>Filter deployments by status.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--allspecs</td><td>-a</td><td>Show all pipeline specs (FlowSpec, TriggerSpec, InSpec, OutSpec).</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--flowspec</td><td>-f</td><td>Show pipeline Flow specs.</td><td><br></td></tr><tr><td></td><td></td><td>--output</td><td>-o</td><td>Display the resources in JSON format.</td><td></td></tr><tr><td><strong>get</strong></td><td>deployment-history</td><td><br></td><td><br></td><td>List deployments history.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--name string</td><td>-n</td><td>Filter deployments history by pipeline name.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--majorversion</td><td>-m</td><td>Filter deployments history by major version.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--page</td><td>-p</td><td>Show the number of items to return. Default is 1.</td><td><br></td></tr><tr><td></td><td></td><td>--output</td><td>-o</td><td>Display the resources in JSON format.</td><td></td></tr><tr><td><br></td><td><br></td><td>--size</td><td>-s</td><td>Show the number  of pages to filter. Default is 20.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--help</td><td>-h</td><td>Get help with deployment history.</td><td><br></td></tr><tr><td><strong>create</strong></td><td>deployment</td><td><br></td><td><br></td><td>Create a deployment.</td><td>DEPLOYMENT:CREATE, DEPLOYMENT:CREATE:REDEPLOY, CONFIGURATION:READ, CONFIGURATION:UPDATE</td></tr><tr><td><br></td><td><br></td><td>--pipeline-id</td><td>(mandatory flag)</td><td>The pipeline ID.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--pipeline-size</td><td>-s</td><td>The pipeline size (SMALL/MEDIUM/LARGE). Default: SMALL</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--consumers</td><td>-c</td><td>The maximum number of consumers on the pipeline to be deployed (Default: SMALL=10 / MEDIUM=20 / LARGE=40).</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--environment</td><td>-e</td><td>The pipeline environment for deployment. Default: test.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--instance-name</td><td>-i</td><td>The pipeline instance name required when the pipeline has multiple instances.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--redeploy</td><td></td><td>Enable the pipeline redeployment.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--replicas</td><td><br></td><td>The pipeline number of replicas. Default: 1</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--wait</td><td><br></td><td>If active, waits for the deployment to be completed. Timeout: 300 seconds.</td><td><br></td></tr><tr><td><strong>delete</strong></td><td>deployment</td><td><br></td><td><br></td><td>Remove a deployment.</td><td>DEPLOYMENT:DELETE</td></tr><tr><td><br></td><td><br></td><td>--deployment-id</td><td>-d</td><td>The ID of the deployment to be deleted.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--environment</td><td>-e</td><td>The environment of the deployment to be deleted.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--help</td><td>-h</td><td>List of help commands for implementation.</td><td><br></td></tr><tr><td><strong>set</strong></td><td>deployment</td><td></td><td></td><td>Manage deployment operations.</td><td></td></tr><tr><td></td><td></td><td><p>--rollback</p><p>--id<br>(must be used together)</p></td><td></td><td>Perform rollback to restore the previous version of the pipeline that was deployed.</td><td></td></tr><tr><td></td><td></td><td><p>--restore</p><p>--history-id<br>(must be used together)</p></td><td></td><td>Create a new deployment using the ID of a previously deployed version.</td><td></td></tr></tbody></table>

### License

<table data-full-width="true"><thead><tr><th>Operation</th><th>Resource</th><th>Flags</th><th>Shorthand</th><th>Description</th><th>Permissions</th></tr></thead><tbody><tr><td><strong>get</strong></td><td>license</td><td><p>--by-project</p><p>--by-pipeline</p></td><td></td><td>Display the realm's license information. By using flags, you can view the license details filtered by pipeline or project.</td><td></td></tr></tbody></table>

### Metrics

<table data-full-width="true"><thead><tr><th>Operation</th><th>Resource</th><th width="160">Flags</th><th>Shorthand</th><th>Description</th><th>Permissions</th></tr></thead><tbody><tr><td><strong>get</strong></td><td>metrics</td><td><p>--pipeline-name</p><p>--pipeline-version</p><p>--from </p><p>--to</p><p>--relative-date</p><p><br></p></td><td></td><td><p>Get metrics from a valid pipeline.<br></p><p>Use the --from and --to flag to filter metrics for a specific date or interval. The --from flag can be used without the --to flag, but the --to flag cannot be used on its own.<br></p><p>The --relative-date flag is another option that allows you to filter metrics within relative time intervals. You can use values such as: last 5 minutes, last 3 days, last 7 days or specify a date range. <br></p></td><td></td></tr></tbody></table>

### Permissions

<table data-full-width="true"><thead><tr><th>Operation</th><th>Resource</th><th>Flags</th><th>Shorthand</th><th>Description</th><th>Permissions</th></tr></thead><tbody><tr><td><strong>get</strong></td><td>users</td><td><br></td><td><br></td><td>Show users </td><td><br></td></tr><tr><td><br></td><td><br></td><td><p>--archived</p><p><br><br></p></td><td>-a </td><td><p>Show archived users</p><p><br></p></td><td><br></td></tr><tr><td><br></td><td><br></td><td>--help</td><td>-h</td><td>Show help for users</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--output</td><td>-o </td><td>Return data in JSON format instead of formatted data.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--page int</td><td>-p</td><td>Page number (default 1)</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--search string</td><td>-s</td><td>Search users</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--size int</td><td><br></td><td>Items per page (default: 10) </td><td><br></td></tr><tr><td><strong>get</strong></td><td>user-permissions</td><td><br></td><td><br></td><td>Show the user permissions</td><td><br></td></tr><tr><td><br></td><td><br></td><td><p>--archived</p><p><br><br></p></td><td>-a </td><td><p>Show archived users</p><p><br></p></td><td><br></td></tr><tr><td><br></td><td><br></td><td>--email string</td><td>-e</td><td>Show user email</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--help </td><td>-h</td><td>Help for user permissions</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--list</td><td>-l</td><td>Display information as a list</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--output</td><td>-o</td><td>Return data in JSON format instead of formatted data.</td><td><br></td></tr></tbody></table>

### **Pipeline**

<table data-full-width="true"><thead><tr><th>Operation</th><th>Resource</th><th>Flags</th><th>Shorthand</th><th>Description</th><th>Permissions</th></tr></thead><tbody><tr><td><strong>get</strong></td><td>pipeline</td><td><br></td><td><br></td><td>List pipelines.</td><td>PIPELINE:READ</td></tr><tr><td><br></td><td><br></td><td>--allspecs  </td><td><br></td><td>Show all pipeline specs (FlowSpec, TriggerSpec, InSpec, OutSpec). Required:pipeline-id</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--flowspec</td><td>-o</td><td>Show pipeline FlowSpec. Required: --pipeline-id</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--archived</td><td>-a</td><td>Show only archived pipelines.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--help</td><td>-h</td><td>Get help for the pipeline.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--name string</td><td>-n</td><td>Filter pipelines by name.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--page int</td><td><br></td><td>Page results (default 1).</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--pipeline-id string</td><td><br></td><td>Filter pipelines by ID.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--pipeline-version-major string</td><td><br></td><td>Filter pipelines bymajor version.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--pipeline-version-minor string</td><td><br></td><td>Filter pipelines by minor version.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--project-id string</td><td><br></td><td>Filter pipelines by project id.</td><td><br></td></tr><tr><td><br></td><td><br></td><td>--show-versions</td><td><br></td><td>Show pipelines with versions.</td><td><br></td></tr><tr><td></td><td></td><td>--output</td><td>-o</td><td>Display the resources in JSON format.</td><td></td></tr><tr><td><strong>create</strong></td><td>pipeline</td><td><p>--name string</p><p>--description</p><p>(mandatory flags)</p><p>--project string</p><p>--help</p></td><td><p>-n</p><p>-d</p><p>-p</p><p>-h</p><p><br></p></td><td>Creates a new pipeline. </td><td></td></tr></tbody></table>

### Project

<table data-full-width="true"><thead><tr><th>Operation</th><th>Resource</th><th>Flags</th><th>Shorthand</th><th>Description</th><th>Permissions</th></tr></thead><tbody><tr><td>create</td><td>project</td><td><p>--name</p><p>--description</p><p>(mandatory flags)</p><p>--help</p></td><td><p>-n</p><p>-d</p><p>-h</p><p><br></p></td><td>Creates a new project.</td><td><br></td></tr></tbody></table>

### **Realm**

<table data-full-width="true"><thead><tr><th>Operation</th><th>Resource</th><th>Flags</th><th>Shorthand</th><th>Description</th><th>Permissions</th></tr></thead><tbody><tr><td><strong>get</strong></td><td>realm</td><td><br></td><td><br></td><td>List realm information.</td><td>REALM:READ</td></tr><tr><td><br></td><td><br></td><td>--help</td><td>-h</td><td>List help commands.</td><td><br></td></tr><tr><td></td><td></td><td>--output</td><td>-o</td><td>Display the resources in JSON format.</td><td></td></tr></tbody></table>

### API Management

<table data-full-width="true"><thead><tr><th>Operation</th><th>Resource</th><th>Flags</th><th>Shorthand</th><th>Description</th></tr></thead><tbody><tr><td><strong>get</strong></td><td>api-mgmt-credentials</td><td><br></td><td><br></td><td>Get API credentials for Pipeline Metrics API.</td></tr><tr><td><br></td><td><br></td><td>--username</td><td>-u</td><td>Search by username (optional).</td></tr><tr><td><br></td><td><br></td><td>--help</td><td>-h</td><td>Get help with the commands.</td></tr><tr><td><strong>get</strong></td><td>api-mgmt-url</td><td><br></td><td><br></td><td>Get API URL for Pipeline Metrics API.<br></td></tr><tr><td><br></td><td><br></td><td>--help</td><td>-h</td><td>Get help with the commands.</td></tr><tr><td><strong>create</strong></td><td>api-mgmt-credentials</td><td><br></td><td><br></td><td>Create API credentials for Pipeline Metrics API.</td></tr><tr><td><br></td><td><br></td><td>--username</td><td>-u</td><td>username for API credentials (required).</td></tr><tr><td><br></td><td><br></td><td>--password</td><td>-p</td><td>password for API credentials (required).</td></tr><tr><td><strong>delete</strong></td><td>api-mgmt-credentials</td><td>--username</td><td>-u</td><td>Delete a username. </td></tr></tbody></table>

{% hint style="info" %}
For the username to be deleted, the realm name must be included before the username.
{% endhint %}

### Data Management

#### Configuration

<table data-full-width="true"><thead><tr><th>Operation</th><th>Subcommands</th><th>Flags</th><th>Shorthand</th><th>Description</th></tr></thead><tbody><tr><td><strong>config</strong></td><td>set</td><td><br></td><td><br></td><td>Set a new configuration with authentication parameters.</td></tr><tr><td><br></td><td><br></td><td>--file (mandatory)</td><td>-f</td><td>Generate a configuration file.</td></tr><tr><td><br></td><td><br></td><td>--secret-key (mandatory)</td><td>-s</td><td>The encrypted key.</td></tr><tr><td><br></td><td><br></td><td>--auth-key<br>(mandatory)</td><td>-a</td><td>The authentication key.</td></tr><tr><td></td><td></td><td>--auth-id (optional)</td><td></td><td>If an account is not provided, the flag value will be displayed as account-X, where X is a unique sequential integer starting from 0.</td></tr><tr><td><strong>config</strong></td><td>get</td><td><br></td><td><br></td><td>Get the realm configuration details. Default is the current realm.</td></tr><tr><td></td><td></td><td>--auth-id (optional)</td><td></td><td>Get realms settings when searching by --auth-id.</td></tr><tr><td><br></td><td><br></td><td>--help</td><td>-h</td><td>List help commands.</td></tr><tr><td><strong>config</strong></td><td>view</td><td><br></td><td><br></td><td>List all available realms/accouns and their configurations.</td></tr><tr><td><strong>config</strong></td><td>list</td><td><br></td><td><br></td><td>List all available realms/accouns and their configurations.</td></tr><tr><td><strong>config</strong></td><td>use</td><td><br></td><td><br></td><td><p>This command allows the user to change the current realm or the current account on digibeectl.<br><br></p><p>To use it, <strong>you must specify one</strong> of the following flags: <code>--realm</code> or <code>--auth-id</code>.<br><br>These flags are mutually exclusive, meaning only one of them can be used at a time.</p></td></tr><tr><td><br></td><td><br></td><td>--realm </td><td>-r</td><td>The user can change the current realm for any of the availableRealms.</td></tr><tr><td></td><td></td><td>--auth-id</td><td></td><td>The user can switch between configured accounts.</td></tr><tr><td><strong>config</strong></td><td>delete</td><td><br></td><td><br></td><td>Delete a digibeectl configuration from a realm.</td></tr><tr><td></td><td></td><td>--auth-id (optional)</td><td></td><td>Use an <code>--auth-id</code> to delete a digibeectl configuration.</td></tr><tr><td><strong>config</strong></td><td>update</td><td><br></td><td><br></td><td>Update digibeectl to LTS (Long-term support) version.</td></tr><tr><td><strong>config</strong></td><td>update-context</td><td></td><td></td><td>The user receives an update of the realms available for accounts with active status in digibeectl.</td></tr><tr><td><strong>config</strong></td><td>version</td><td><br></td><td><br></td><td>Display current digibeectl version.</td></tr></tbody></table>
