> For the complete documentation index, see [llms.txt](https://sitasys-ag.gitbook.io/evalink-talos/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sitasys-ag.gitbook.io/evalink-talos/management-api/manage-users.md).

# Manage users

## Introduction

There are two types of users in evalink talos:&#x20;

* Administrator
* Operator

evalink talos offers the ability to invite new users in your company and select their type (Administrator/Operator). They can then accept the invitation and create an account with their e-mail and password.

{% hint style="danger" %}
Managing users is currently restricted for generated API tokens
{% endhint %}

## invite users

<mark style="color:green;">`POST`</mark> `https://talos-app.io/api/oauth-service/invitations`

Use this endpoint to invite users into your evalink talos tenant.&#x20;

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | string | Use 'Bearer' followed by your API token. |

#### Request Body

| Name         | Type    | Description                                                            |
| ------------ | ------- | ---------------------------------------------------------------------- |
| email        | string  | The e-mail of the user you would like to invite.                       |
| companyId    | string  | The Company ID, as it is displayed on the evalink talos Web Interface. |
| companyAdmin | boolean | The admin priviledges for the user you are inviting.                   |

{% tabs %}
{% tab title="200 " %}

```
{
  "links": {
    "empty": true
  }
}
```

{% endtab %}
{% endtabs %}

Example:

```javascript
{
  "companyAdmin": true,
  "companyId": "<companyId>",
  "email": "<emailAddress>"
}
```

## find users by company ID

<mark style="color:blue;">`GET`</mark> `https://talos-app.io/api/oauth-service/users/search/findByCompanyId:companyId`

Use this endpoint to find the users for a particular company.

#### Path Parameters

| Name      | Type   | Description                                                            |
| --------- | ------ | ---------------------------------------------------------------------- |
| companyId | string | The Company ID, as it is displayed on the evalink talos Web Interface. |

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | string | Use 'Bearer' followed by your API token. |

{% tabs %}
{% tab title="200 " %}

```
{
  "_embedded": {
    "users": [
      {
        "email": "string",
        "firstName": "string",
        "id": "string",
        "lastName": "string",
        "mfaEnabled": true
      }
    ]
  },
  "_links": {}
}


```

{% endtab %}
{% endtabs %}

## find a list of users by user IDs

<mark style="color:blue;">`GET`</mark> `https://talps-app.io/api/oauth-service/users/search/findByIdIn`

Use this endpoint to receive a list of users based on a collection of user IDs.

#### Path Parameters

| Name | Type  | Description                 |
| ---- | ----- | --------------------------- |
| ids  | array | The collection of user IDs. |

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | string | Use 'Bearer' followed by your API token. |

{% tabs %}
{% tab title="200 " %}

```
{
  "_embedded": {
    "users": [
      {
        "email": "string",
        "firstName": "string",
        "id": "string",
        "lastName": "string",
        "mfaEnabled": true
      }
    ]
  },
  "_links": {}
}
```

{% endtab %}
{% endtabs %}

## find a user by user ID

<mark style="color:blue;">`GET`</mark> `https://talos-app.io/api/oauth-service/users/{id}`

Use this endpoint to receive a user by their user ID.

#### Path Parameters

| Name | Type   | Description           |
| ---- | ------ | --------------------- |
| id   | string | The required user ID. |

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | string | Use 'Bearer' followed by your API token. |

{% tabs %}
{% tab title="200 " %}

```
{
  "email": "string",
  "firstName": "string",
  "id": "string",
  "lastName": "string",
  "links": {
    "empty": true
  },
  "mfaEnabled": true
}
```

{% endtab %}
{% endtabs %}

```
{
  "email": "string",
  "firstName": "string",
  "id": "string",
  "lastName": "string",
  "links": {
    "empty": true
  },
  "mfaEnabled": true
}


```

## find the roles of a particular user

<mark style="color:blue;">`GET`</mark> `https://talos-app.io/api/oauth-service/users/{id}/roles`

Use this endpoint to receive the roles of a particular user by using the user ID.

#### Path Parameters

| Name | Type   | Description           |
| ---- | ------ | --------------------- |
| id   | string | The required user ID. |

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | string | Use 'Bearer' followed by your API token. |

{% tabs %}
{% tab title="200 " %}

```
{
  "_embedded": {
    "persistentEntityResources": [
      null
    ]
  },
  "_links": {}
}
```

{% endtab %}
{% endtabs %}

## update the roles of a particular user

<mark style="color:green;">`POST`</mark> `https://talos-app.io/api/oauth-service/users/{id}/roles`

IUse this endpoint tot updates the role of a specific user.&#x20;

#### Path Parameters

| Name        | Type   | Description                     |
| ----------- | ------ | ------------------------------- |
| id          | string | The required user ID.           |
| userRoleIds | array  | The collection of user role ID. |

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | string | Use 'Bearer' followed by your API token. |

{% tabs %}
{% tab title="200 " %}

```
{
  "_embedded": {
    "persistentEntityResources": [
      null
    ]
  },
  "_links": {}
}
```

{% endtab %}
{% endtabs %}
