# Aplicação

## Registrar aplicação

<mark style="color:green;">`POST`</mark> `http://utility-assistant.local/application`

Registra aplicação (computador), ao registrar são gerados as credenciais de aplicação. (client credentials)

#### Headers

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

#### Request Body

| Name         | Type    | Description                            |
| ------------ | ------- | -------------------------------------- |
| force        | boolean | Flag para forçar cadastro de aplicação |
| client\_name | string  | Nome da aplicação                      |

{% tabs %}
{% tab title="201 Cake successfully retrieved." %}

```javascript
{
    "detail": {
        "code": 1018,
        "status": "APPLICATION_CREATED",
        "message": "Application created successfully"
    }
}
```

{% endtab %}
{% endtabs %}

## Listar dados da aplicação

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

Retorna as credenciais de aplicação&#x20;

#### Headers

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

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

```javascript
{
    "client_name": "My PC",
    "client_id": "e6cf870ab39ed797cabf9d4fc4b9ad0194baf1ac",
    "client_secret": "6ccba7c406ed93b8fb79872d9bd905bd43f5aed2",
    "detail": {
        "code": 1021,
        "status": "APPLICATION_LISTED",
        "message": "Application listing"
    }
}
```

{% endtab %}
{% endtabs %}

## Alterar dados da aplicação

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

Altera dados da aplicação

#### Headers

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

#### Request Body

| Name         | Type   | Description       |
| ------------ | ------ | ----------------- |
| client\_name | string | Nome da aplicação |

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

```javascript
{
    "detail": {
        "code": 1120,
        "status": "APPLICATION_UPDATED",
        "message": "Application updated with success"
    }
}
```

{% endtab %}
{% endtabs %}


---

# 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.vaultid.com.br/workspace/middleware/assistente-utilitario/api/application.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.
