# Robôs

## Buscar Runtimes cadastrado na empresa

<mark style="color:blue;">`GET`</mark> `https://app.rpaidea.com/api/robot/v2`

Busca os robôs  cadastrado na empresa do usuário logado.

Pode utilizar x-api-key ou Authorization.

#### Headers

| Name                                           | Type   | Description              |
| ---------------------------------------------- | ------ | ------------------------ |
| Authorization                                  | string | Bearer {RESULT-OF-LOGIN} |
| Content-Type<mark style="color:red;">\*</mark> | string | application/json         |
| x-api-key                                      | String | Token                    |

{% tabs %}
{% tab title="200 Lista de robôs" %}

```
[
    {
        "_id": {
            "timestamp": 1664252603,
            "machineIdentifier": 15838872,
            "processIdentifier": 23085,
            "counter": 2655267,
            "time": 1664252603000,
            "date": 1664252603000,
            "timeSecond": 1664252603
        },
        "sequence": null,
        "name": "Projeto",
        "label": "Robô Teste",
        "description": "Consulta situação de CNPJ no site Sintegra",
        "icon": null,
        "config": {
            "variables": [
                {
                    "name": "diretorioCnpjPendente",
                    "type": "string",
                    "value": "C:\\temp\\CNPJ_PENDENTE",
                    "required": true,
                    "file": ""
                },
                {
                    "name": "diretorio",
                    "type": "string",
                    "value": "C:\\temp\\Result",
                    "required": true,
                    "file": ""
                }
            ]
        },
        "script": null,
        "type": "MANUAL",
        "functions": null,
        "functionsDisplayment": null,
        "globalVariables": null,
        "resolution": null,
        "background": "",
        "idCompany": 1,
        "ideVersion": "2.7.8",
        "ideVersionCreate": "2.6.3",
        "version": 1.18,
        "alpha": false,
        "deprecated": null,
        "idExecution": null,
        "production": true,
        "sendLog": false,
        "idStoreBot": null,
        "idStoreBotGetted": null,
        "openSource": null,
        "idInfoRobot": null,
        "ideaId": null,
        "processId": null,
        "robotType": null,
        "releaseNotes": null,
        "nextUid": null,
        "retros": null,
        "creationDate": null,
        "publicationDate": null,
        "_idEx": "63327abbf1ae985a2d288423"
    }
]
```

{% endtab %}

{% tab title="401 Usuário não autorizado." %}

```javascript
{
  "timestamp": 1574970103297,
  "status": 401,
  "error": "Unauthorized",
  "message": "Unauthorized",
  "path": "/api/user/auth"
}
```

{% endtab %}
{% endtabs %}
