# Administration commands

This page describes all commands that allow [Akamas resources](#clireference-operations) to be managed with their options (see also [common options](#clireference-commonoptions) available for all commands).

| Command                                                           | Description                             |
| ----------------------------------------------------------------- | --------------------------------------- |
| [install license](#clireference-installlicense)                   | install license                         |
| [unistall license](#clireference-uninstalllicense)                | uninstall license                       |
| [status](#status-command)                                         | check the status of the Akamas instance |
| [log](#log-command)                                               | get logs                                |
| [initialize configuration](#clireference-initializeconfiguration) | initialize Akamas configuration         |
| [set configuration](#clireference-setconfigurationvalue)          | set Akamas configuration                |

## Install License command <a href="#clireference-status" id="clireference-status"></a>

An Akamas license is an Akamas resource (see list of [Akamas resources](/akamas-docs/3.6/reference/cli-reference.md#clireference-operations)) so you can use the following command (see [install command](/akamas-docs/3.6/reference/cli-reference/resource-management.md#clireference-install)) to install a license in an Akamas instance:

```bash
akamas install license licenkse.ak
```

## Uninstall License command <a href="#clireference-uninstalllicense" id="clireference-uninstalllicense"></a>

An Akamas license is an Akamas resource (see list of [Akamas resources](/akamas-docs/3.6/reference/cli-reference.md#clireference-operations)) so you can use the following command (see [uninstall command](/akamas-docs/3.6/reference/cli-reference/resource-management.md#clireference-uninstall)) to remove a license from the Akamas installation:

```bash
akamas uninstall license <license-id>
```

## Status command

Print the status of the Akamas instance.

```bash
akamas status [-d]
```

with the following options:

| Option  | Short option | Type | Description                                |
| ------- | ------------ | ---- | ------------------------------------------ |
| --debug | -d           | Flag | Print a detailed status of Akamas instance |

## Log command

Print the logs of the Akamas services.

```bash
akamas status [-d]
```

with the following options:

| Option             | Short option | Description                                                                                  | Type                                  | Accepted values                                                                                                                                                                                                   | Requires                            | Mutually exclusive                                |
| ------------------ | ------------ | -------------------------------------------------------------------------------------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------------------- |
| --debug            | -d           | Show extended error messages, if presents                                                    | Flag                                  | -                                                                                                                                                                                                                 | -                                   | -                                                 |
| --page-size        |              | Number of log's lines to be retrieved at one time                                            | Integer                               | (0, 65536)                                                                                                                                                                                                        | -                                   | <ul><li>no-pagination</li><li>dump</li></ul>      |
| --no-pagination    |              | Disable pagination and print all logs                                                        | Flag                                  | -                                                                                                                                                                                                                 | -                                   | <ul><li>page-size</li><li>dump</li></ul>          |
| --dump             |              | Output logs without pagination and formatting                                                | Flag                                  | -                                                                                                                                                                                                                 | -                                   | <ul><li>page-size</li><li>no-pagination</li></ul> |
| --workspace        | -ws          | UUID or name of the Workspace to visualize. When empty, system logs will be returned instead | String                                | -                                                                                                                                                                                                                 | -                                   | -                                                 |
| --from             | -f           | The start timestamp or timedelta of the logs                                                 | String                                | <ul><li>%Y-%m-%d</li><li>%Y-%m-%dT%H:%M:%S</li><li>%Y-%m-%d %H:%M:%S</li><li>%Y-%m-%dT%H:%M:%S.%f</li><li>%Y-%m-%d %H:%M:%S.%f</li><li>-nw</li><li>-nd</li><li>-nh</li><li>-nm</li><li>-ns</li><li>-nms</li></ul> | -                                   | -                                                 |
| --to               | -t           | The end timestamp or timedelta of the logs                                                   | String                                | <ul><li>%Y-%m-%d</li><li>%Y-%m-%dT%H:%M:%S</li><li>%Y-%m-%d %H:%M:%S</li><li>%Y-%m-%dT%H:%M:%S.%f</li><li>%Y-%m-%d %H:%M:%S.%f</li><li>-nw</li><li>-nd</li><li>-nh</li><li>-nm</li><li>-ns</li><li>-nms</li></ul> | -                                   | -                                                 |
| --study            | -s           | UUID or name of the Study                                                                    | <ul><li>String</li><li>UUID</li></ul> | -                                                                                                                                                                                                                 | -                                   | -                                                 |
| --exp              | -e           | Number of the experiment                                                                     | Integer                               | -                                                                                                                                                                                                                 | <ul><li>study</li></ul>             | -                                                 |
| --trial            |              | Number of the trial                                                                          | Integer                               | -                                                                                                                                                                                                                 | <ul><li>study</li><li>exp</li></ul> |                                                   |
| --system           | -y           | UUID or name of the System                                                                   | <ul><li>String</li><li>UUID</li></ul> | -                                                                                                                                                                                                                 |                                     |                                                   |
| --workflow         | -w           | UUID or name of the Workflow                                                                 | <ul><li>String</li><li>UUID</li></ul> | -                                                                                                                                                                                                                 |                                     |                                                   |
| --service          | -S           | Name of the Akamas Service                                                                   | String                                | <ul><li>system</li><li>campaign</li><li>telemetry</li><li>orchestrator</li><li>analyzer</li><li>metrics</li><li>optimizer</li><li>license</li><li>log</li></ul>                                                   | -                                   | -                                                 |
| --log-level        | -l           | Log level                                                                                    | String                                | <ul><li>TRACE</li><li>DEBUG</li><li>INFO</li><li>WARN</li><li>ERROR</li></ul>                                                                                                                                     | -                                   | -                                                 |
| --without-metadata |              | Print only timestamp and message                                                             | Flag                                  | -                                                                                                                                                                                                                 | -                                   | -                                                 |
| --sorting          |              | Sorting order of the printed logs                                                            | String                                | <ul><li>asc</li><li>desc</li></ul>                                                                                                                                                                                |                                     |                                                   |
| \<MESSAGE>         |              | Regular expression against the message                                                       | String                                | -                                                                                                                                                                                                                 | -                                   | -                                                 |

## Initialize Akamas configuration <a href="#clireference-initializeconfiguration" id="clireference-initializeconfiguration"></a>

Initialize the CLI’s configuration file, either interactively or through the provided options.

```bash
akamas init config [options]
```

with the following options:

| Option          | Short option | Type   | Default                 | Description                                                                                                       |
| --------------- | ------------ | ------ | ----------------------- | ----------------------------------------------------------------------------------------------------------------- |
| --api-address   | -a           | String | <http://localhost:8000> | Api address                                                                                                       |
| --default-local | -l           | Flag   |                         | Configure the Akamas CLI for localhost NOTE: This argument is mutually exclusive with arguments: \[api\_address]. |
| --workspace     | -w           | String | default                 | Active workspace                                                                                                  |
| --echo-only     |              | Flag   |                         | Print configuration on stdout                                                                                     |

## Set Akamas configuration <a href="#clireference-setconfigurationvalue" id="clireference-setconfigurationvalue"></a>

Set a value in the CLI’s configuration file

```bash
akamas set config [options]
```

with the following options:

| Option        | Short option | Type          | Description                                 |
| ------------- | ------------ | ------------- | ------------------------------------------- |
| --api-address | -a           | String        | Set the API address of your Akamas instance |
| --workspace   | -w           | String        | Set the default workspace                   |
| --method      | -m           | local, oauth2 | Set the default authentication method       |
| --keyring     | -k           | String        | Set keyring type                            |
| --verify-ssl  | -v           | Boolean       | Set Verify SSL                              |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akamas.io/akamas-docs/3.6/reference/cli-reference/administration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
