# Admin options

As an Admin you can also view all Kapsules and Logs as described in the User [options section](https://docs.extendbi.com/komment3/kaptain-admin-module/broken-reference).

<figure><img src="https://4099892881-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXdGSelEVi2ug2LCBzJx5%2Fuploads%2FgdP18BSjZ246JzZwOF1i%2Fimage.png?alt=media&#x26;token=57f26535-8238-45c3-b3d5-8d855225516d" alt=""><figcaption></figcaption></figure>

## Users

<figure><img src="https://4099892881-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXdGSelEVi2ug2LCBzJx5%2Fuploads%2FDuDcB9kkS9RbGAISzBoA%2Fimage.png?alt=media&#x26;token=58aa2d69-7be2-43e1-855c-b14677932407" alt=""><figcaption></figcaption></figure>

When logged in with an Admin role, you are able to see all users that are setup in Kaptain. With Admin role you are able to:

* Create users
* Update users
* Delete users

### Create user

<figure><img src="https://4099892881-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXdGSelEVi2ug2LCBzJx5%2Fuploads%2FAEh36QM1TMTw8exttr3N%2Fimage.png?alt=media&#x26;token=bf02dff8-f8e4-455f-89e8-959a9c490f14" alt=""><figcaption></figcaption></figure>

`User Name`: Name of user

`Password`: Password

`Role`: USER or ADMIN

`Group`: Group(s) which the user should be member of

`Qlik User ID`: Defined as User Directory\initials

`Can Create Kapsule`: Tick if the user should be allowed to create Kapsules

{% hint style="info" %}
To make sure you insert the correct User Directory and initials (they are case sensitive) you can use the formula `=osuser()` somewhere in a Qlik Sense app so you can see the exact User Directory and UserId.
{% endhint %}

{% hint style="warning" %}
On Qlik Sense SaaS there is no User Directory so simply put in the **IdP Subject** preceded by a "**\\**". e.g. ***\auth0|5e214039b4718b775cf20ec4d613346c38b52ef77b5aedb74d837bbb507fb823***

You can find each users' IdP Subject in the QMC in the Users section.
{% endhint %}

### Update user

Here you have the same options as in the Create user menu

### Delete user

Here you can delete Kaptain users

## Groups

<figure><img src="https://4099892881-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXdGSelEVi2ug2LCBzJx5%2Fuploads%2FuYrNz3Y1Lyg6kGxwJSOp%2Fimage.png?alt=media&#x26;token=bf0af7d6-0f63-4c82-86c1-2859ae1094c5" alt=""><figcaption></figcaption></figure>

When logged in with an Admin role, you are able to see all Groups that are setup in Kaptain. With Admin role you are able to:‌

* Create Groups
* Update Groups
* Delete Groups

### Create Groups

<figure><img src="https://4099892881-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXdGSelEVi2ug2LCBzJx5%2Fuploads%2FPsKVBlkFebA9VgDfy6Y9%2Fimage.png?alt=media&#x26;token=c514ed36-c797-4c72-abe7-748a42719c39" alt=""><figcaption></figcaption></figure>

`Permission`: Define if members of the group have read and/or delete permissions

`Group Name`: Name of group

`Kapsules`: One or more Kapsules that should be included in the group

`Users`: User(s) to be part of the group

{% hint style="info" %}
Note that you are not given read/write permission to end users. This is handled via the Komment extension interface. This only relates to users (Qlik developers or Admins) setup in the Kaptain Admin module.
{% endhint %}

### Update Group

Here you have the same options as in the Create Group menu

### Delete Group

Here you can delete groups

## API Keys

### Administer API keys

In the left hand menu administrators can access the API Key section. In here the administrator can see the API keys that have been added:<br>

<figure><img src="https://4099892881-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXdGSelEVi2ug2LCBzJx5%2Fuploads%2FZ1JEjRUy9NbqD3FLMHmc%2Fimage.png?alt=media&#x26;token=08ef7725-3387-47cd-8518-ddcd5cac9a95" alt=""><figcaption></figcaption></figure>

From this view the administrator can perform the following actions:

1. Create a new API key
2. Copy an API key value
3. Delete an API key

#### Create new API key

To create a new API key click on the button "Create ApiKey" to activate the following window:<br>

<figure><img src="https://4099892881-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXdGSelEVi2ug2LCBzJx5%2Fuploads%2FsucTAW3HU2Hky6Ns7N9m%2Fimage.png?alt=media&#x26;token=46aa6cbd-7a3f-4343-93a0-e65225b1ebfa" alt=""><figcaption></figcaption></figure>

**Name**: Write the desired name of the API key

**API Key**: To autogenerate an API Key press the button "generate". It is also possible to paste in the value of an already generated API key. Simple paste it into the API Key box shown in the image above.

#### Copy an API Key value

To copy an API Key value simply press the copy icon shown next to the API key:<br>

<figure><img src="https://4099892881-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXdGSelEVi2ug2LCBzJx5%2Fuploads%2FcxOPDSkfZtDEnNXchxii%2Fimage.png?alt=media&#x26;token=bbfd4500-55c7-49ef-ad8c-cb4b6903d9bf" alt=""><figcaption></figcaption></figure>

#### Delete API Key

To delete an API Key you press the trash can icon shown in the Action column:<br>

<figure><img src="https://4099892881-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXdGSelEVi2ug2LCBzJx5%2Fuploads%2FXygZYVHVM4okXjBFLtRM%2Fimage.png?alt=media&#x26;token=9e637e17-eb35-4908-8cc1-7e11cfba6bdb" alt=""><figcaption></figcaption></figure>

### Apply API Key to Komment extension

The API Key is used to connect Komment and Kaptain in order to make all data transfers to and from the selected database as secure as possible.

* Create an API key in Kaptain as described above

* Copy the value of the generated API Key

* Go to the folder where you have your Komment.zip file.

* Open the zip file and navigate to static\config

* Copy the file Settings.txt

* Navigate out of the zip file and paste the Settings.txt file in the initial folder

* Open the Settings.txt file

* Insert the copied API Key value in ApiKey section<br>

  <figure><img src="https://4099892881-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXdGSelEVi2ug2LCBzJx5%2Fuploads%2FeTgkzv17hdbCLJRgSmjv%2Fimage.png?alt=media&#x26;token=b9c2d607-ec36-46d2-9be3-0e503db65792" alt=""><figcaption></figcaption></figure>

* Save and close the file

* Copy the Settings.txt file

* Open the Komment.zip file and navigate to static\config

* Paste the Settings.txt file and say OK to replace the existing file

* Navigate out of the zip file

* Follow the above steps to import the updated zip file to the QMC

{% hint style="warning" %}
If you have multiple servers with Komment and Kaptain installed you need to create an API Key on each Kaptain instance. To minimize maintenance you can copy the value from one instance to the others when creating additional API Keys.
{% endhint %}

### Update Kaptain Data Connection

When generating new Kaptain Data Connections from within Komment, they API Key will automatically be embedded in the data connection string. However, if you have existing Kaptain Data Connections that was setup prior to version 2.5.2 you can use the below approach to update those data connections with your newly generated API Key.

* Go to the Data Load Editor within an app in Qlik Sense
* Search for the relevant data connection
* Press the edit button of the data connection
* Create a new Query Header as shown below:
  * **Name**: Authorization

  * **Value**: Bearer \<INSERT API Key value><br>

    <figure><img src="https://4099892881-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXdGSelEVi2ug2LCBzJx5%2Fuploads%2FikEukikn0dTlFp5wuOzw%2Fimage.png?alt=media&#x26;token=b2766e7c-c985-40b3-afc0-5660ec4c81d8" alt=""><figcaption></figcaption></figure>

  * Press save

  * Navigate to QMC and remove autogenerated initials that are added to the name of the data connection. This is to ensure that all previous references to the existing name will continue to work.
