> For the complete documentation index, see [llms.txt](https://docs.vaultid.com.br/workspace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vaultid.com.br/workspace/middleware/assistente-utilitario/api/selected-user.md).

# Usuário selecionado

## Detalhes do usuário selecionado

<mark style="color:blue;">`GET`</mark> `http://utility-assistant.local/selected-user`

Detalhes do usuário selecionado (ativo)

#### Headers

| Name   | Type   | Description      |
| ------ | ------ | ---------------- |
| Accept | string | application/json |

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

```javascript
{
	"name": "NOME DO USUÁRIO",
	"username": "01234567890",
	"date_last_update": "2019-01-26 10:14:36",
	"photo": "Foto/Thumbnail encodada em base64, veja RFC2397",
	"detail": {
		"code": 1124,
		"status": "SELECTED_USER_DETAIL",
		"message": "Selected user detail"
	}
}
```

{% endtab %}

{% tab title="400 " %}

```javascript
{
	"detail": {
		"code": 1091,
		"status": "UNKNOWN_ERROR",
		"message": "Unknown error"
	}
}
```

{% endtab %}
{% endtabs %}

## Alternar usuário selecionado

<mark style="color:orange;">`PUT`</mark> `http://utility-assistant.local/selected-user`

#### Headers

| Name         | Type   | Description                       |
| ------------ | ------ | --------------------------------- |
| Content-Type | string | application/x-www-form-urlencoded |
| Accept       | string | application/json                  |

#### Request Body

| Name     | Type   | Description        |
| -------- | ------ | ------------------ |
| username | string | Usuário (CPF/CNPJ) |

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

```javascript
{
	"detail": {
		"code": 1125,
		"status": "SELECTED_USER_CHANGED",
		"message": "Changed selected user"
	}
}
```

{% endtab %}
{% endtabs %}

## Certificados do usuário selecionado

<mark style="color:blue;">`GET`</mark> `http://utility-assistant.local/selected-user/certificates`

#### Headers

| Name   | Type   | Description      |
| ------ | ------ | ---------------- |
| Accept | string | application/json |

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

```javascript
{
	"certificates": [{
		"index": 0,
		"alias": "NOME DO USUARIO:01234567890"
	}],
	"detail": {
		"code": 1109,
		"status": "CERTIFICATES_LISTED",
		"message": "Certificate Listing"
	}
}
```

{% endtab %}
{% endtabs %}
