# Rest API

You can connect to your REST API to request data and interact with 3rd party services or even your own backend. This allows you to combine data with your other data sources and trigger operations based on data of other data source.

## Connecting to your REST API

To connect your REST API, follow the steps below:

1. Go to **Data Management** and click on "**New source**" to create a new data source.&#x20;
2. Select **REST API** from the list of available data sources.
3. Name your data source connection and provide the connection details:

<table><thead><tr><th width="201">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Base url</strong></td><td>The base url where the API endpoints are placed. You can also provide the entire url for the endpoint if you want to create one data source for each endpoint.</td></tr><tr><td><strong>Timeout</strong></td><td>Length until request times out (to avoid infinitely long requests).</td></tr><tr><td><strong>Params</strong></td><td>Parameters that are passed along with the request.</td></tr><tr><td><strong>Headers</strong></td><td>Headers that are passed along with the request. Especially useful for authentication headers for simple authentication via bearer token.</td></tr><tr><td><strong>(optional) OAuth 2.0 Authentication</strong></td><td><ul><li><strong>Token url</strong>: Url from which to request the access token.</li><li><strong>Client ID &#x26; Secret</strong>: Client credentials (API key and secret) sent as part of the authorization header.</li><li><strong>Scope</strong>: The access scope that you want to request.</li><li><strong>Audience</strong>: Defines the endpoints at which the token can be used. </li></ul></td></tr></tbody></table>

4. Click on "**Test connection"** to ensure that your connection works reliably and save your data source connection with "**Connect**".

Note: You can configure the data source for two different environments, Staging and Production. You can find more information about it [here](broken://pages/FM88Izx8RDNtGtuF6cvH).&#x20;


---

# 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.uify.io/integrations/rest-api.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.
