> For the complete documentation index, see [llms.txt](https://docs.digibee.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digibee.com/documentation/connectors-and-triggers/pt-br/connectors/web-protocols/rest-v1.md).

# REST V1 (Descontinuado)

{% hint style="warning" %}
O **REST V1** foi descontinuado e não é mais atualizado. Consulte as documentações das versões mais recentes da *feature*: [REST V2](/documentation/connectors-and-triggers/pt-br/connectors/web-protocols/rest-v2.md).&#x20;
{% endhint %}

O **REST V1** realiza chamadas a *endpoints* REST a partir de um *pipeline*.

## Parâmetros

Dê uma olhada nas opções de configuração do componente. Parâmetros suportados por [expressões Double Braces](/documentation/connectors-and-triggers/pt-br/double-braces/overview.md) estão marcados com (DB).

<table data-full-width="true"><thead><tr><th>Parâmetro</th><th>Descrição</th><th>Valor Padrão</th><th>Tipo de Dado</th></tr></thead><tbody><tr><td><strong>URL</strong></td><td>URL a ser chamada - pode conter os parâmetros seguindo o padrão {:param1}, que serão substituídos pela propriedade correspondente da mensagem de entrada.</td><td></td><td><em>String</em></td></tr><tr><td><strong>Content Type</strong></td><td>Configura o Content Type e a codificação.</td><td></td><td><em>String</em></td></tr><tr><td><strong>Verb</strong></td><td>Tipo de chamada do REST (GET, POST e PUT).</td><td></td><td><em>String</em></td></tr><tr><td><strong>Account</strong></td><td>Conta a ser utilizada pelo componente.</td><td></td><td><em>String</em></td></tr><tr><td><strong>Connection Timeout</strong></td><td>Tempo de expiração da conexão (em milissegundos).</td><td></td><td><em>Integer</em></td></tr><tr><td><strong>Reading Timeout</strong></td><td>Tempo máximo para leitura (em milissegundos).</td><td></td><td><em>Integer</em></td></tr><tr><td><strong>Stop On Client Error</strong></td><td>Se ativada, a opção vai gerar um erro para suspender a execução do <em>pipeline</em>.</td><td><em>False</em></td><td><em>Boolean</em></td></tr><tr><td><strong>Stop On Server Error</strong></td><td>Se ativada, a opção vai gerar um erro para suspender a execução do <em>pipeline</em>.</td><td><em>False</em></td><td><em>Boolean</em></td></tr><tr><td><strong>Advanced Settings</strong></td><td>Configurações avançadas.</td><td></td><td><em>Object/Map</em></td></tr><tr><td><strong>Inject JWT</strong></td><td>Se ativada, a opção injeta o JWT presente na chamada do <em>pipeline</em> (gerado ou não pelo componente <strong>JWT)</strong> no <em>header</em> Authorization da chamada REST.</td><td><em>False</em></td><td><em>Boolean</em></td></tr><tr><td><strong>Read JWT</strong></td><td>Se ativada, a opção coloca como resposta o JWT que fica no <em>header Authorization</em> interno, caso exista.</td><td><em>False</em></td><td><em>Boolean</em></td></tr><tr><td><strong>Raw Mode</strong></td><td>Se ativada, a opção recebe ou passa um <em>payload</em> sem ser JSON.</td><td><em>False</em></td><td><em>Boolean</em></td></tr><tr><td><strong>Allow Insecure Calls To HTTPS Endpoints</strong></td><td>Quando ativada, a opção permite que chamadas não seguras a <em>endpoints</em> HTTPS sejam feitas.</td><td><em>False</em></td><td><em>Boolean</em></td></tr><tr><td><strong>Enable Retries</strong></td><td>Quando ativada, a opção permite que sejam feitas novas tentativas.</td><td><em>False</em></td><td><em>Boolean</em></td></tr><tr><td><strong>Maximum Number Of Retries Before Giving Up</strong></td><td>Número máximo de tentativas antes de desistir da chamada.</td><td><em>3</em></td><td><em>Integer</em></td></tr><tr><td><strong>Time To Wait Before Each Retry</strong></td><td>Tempo máximo entre tentativas (em milissegundos).</td><td><em>1000</em></td><td><em>Integer</em></td></tr><tr><td><strong>Compress Body With GZIP</strong></td><td>Quando ativada, a opção permite que o <em>body</em> seja comprimido com GZIP.</td><td><em>False</em></td><td><em>Boolean</em></td></tr></tbody></table>

&#x20;    &#x20;

### Path Parameter <a href="#path-parameter" id="path-parameter"></a>

**Exemplo**

<http://test.com/order/$EXPAND{:id,}>

&#x20;   &#x20;

### Query Parameter <a href="#query-parameter" id="query-parameter"></a>

**Exemplo**

<http://test.com/order$QUERY{page=:page,search=:search}\r\n\t\t\t>

&#x20;     &#x20;

## Fluxo de Mensagens <a href="#fluxo-de-mensagens" id="fluxo-de-mensagens"></a>

### Entrada <a href="#entrada" id="entrada"></a>

application/x-www-form-urlencoded&#x20;

```
{
	header: {
		"headerA":"valueA",
		"headerB":"valueB"
	},
		url: {
		"urlParam1": "paramValue"
	},
	formData: {
		"field1": "value1",
		"field2": "value2"
	}
}
```

multipart/form-data

```
{
	header: {
		"headerA":"valueA",
		"headerB":"valueB"
	},
	url: {
		
	},
	multiPartData: {
		"files": {
		"file_formName" "filename",
		"files_formName[]" ["filename1","filename2"]
	},	"fields": {
		"field1" : "value1",
		"field2" : "value2",
	}
	}
}
```

&#x20;   &#x20;

O componente espera uma mensagem no seguinte formato:

```
{
	header: {
	"headerA":"valueA",
	"headerB":"valueB"
	},
	url: {
	"urlParam1": "paramValue"
	},
	body: {
	// message to be sent to the endpoint
	}
}
```

&#x20;   &#x20;

### Saída <a href="#sada" id="sada"></a>

* Com sucesso

```
{
    status: XXX,
    body: {},
    headers: {}
}
```

* Com erro

```
{
    error: "error message",
    code: XXX,
    body: {},
    headers: {} 
}
```

{% hint style="info" %}
&#x20;No caso de alguns erros, *body* e *headers* estarão indisponíveis.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.digibee.com/documentation/connectors-and-triggers/pt-br/connectors/web-protocols/rest-v1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
