Skip to content

Commit

Permalink
docs(rest-connector): Add documentation for the Document upload in th…
Browse files Browse the repository at this point in the history
…e REST Connector
  • Loading branch information
johnBgood committed Dec 11, 2024
1 parent 6088f25 commit b158177
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/components/connectors/protocol/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,26 @@ Secrets are currently not supported in the body of a **REST Connector**.

## Response

:::note
Starting from version 8.7.0, the REST Connector supports storing the response as a document.
:::

The HTTP response will be available in a temporary local `response` variable. This variable can be mapped to the process by specifying the **Result variable**.

The following fields are available in the `response` variable:

- **status**: Response status
- **body**: Response body of your request
- **headers**: Response headers
- **document**: When the `Store response` checkbox is selected, this field will represent the stored document:
- **documentId**: The ID of the stored document
- **storeId**: The store ID
- **metadata**: Metadata of the stored document (if available)
- **size**: Size of the stored document in bytes
- **expiresAt**: Expiration date of the stored document
- **fileName**: Name of the stored document
- **customProperties**: Custom properties of the stored document
- **contentType**: Content type of the stored document

## Output mapping

Expand All @@ -237,7 +250,8 @@ Additionally, you can choose to unpack the content of your `response` into multi
= {
actual_temp: response.body.main.temp,
feel_temp: response.body.main.feels_like,
weather: response.body.weather[1].main
weather: response.body.weather[1].main,
weather_report_id: response.document.documentId
}
```

Expand Down

0 comments on commit b158177

Please sign in to comment.