# Data Connector API

On the main Data Connectors screen, when clicking the “Add” button, the system will display the screen to connect a new data source to the platform.

For each Data Connector option available on the platform, the system will present some additional fields to be filled in.

When selecting the **API** option, you will be asked to fill in the following fields:

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2F3yqnAYdHhK5ZVOJZ8bDE%2Fimage.png?alt=media&#x26;token=af4b0411-b2d7-404b-9466-5c0c052ae8bf" alt=""><figcaption></figcaption></figure>

* **Data Connector Identifier Name**: Enter the name that will identify the data source that will be connected
* **Select the secret for this data connector**: Select the secret you want to use from the registered options. We will use this secret to connect to the service.
* **Response Data Path**: Enter the path we should access in the API to identify the data you want to use.
  * The Path must be separated by **common.dot (.)**
  * If the API root is the return, enter only **"."**
* **Data History**: Select the desired history option from the following options:
  * **The Daily History** every day will have values that represent the day of processing. Example, you will have data that represents the days 01/10, 02/10, 03/10 etc.. .
  * **The Monthly History** will have data that represents the month of processing. Example, you will have data that represents the months 01/2023, 02/2023, 03/2023 etc...

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FtixBbTt6rJLMW5580rIC%2Fimage.png?alt=media&#x26;token=47521ee7-0899-49e1-a632-6ce4b3559db6" alt=""><figcaption></figcaption></figure>

* **Endpoints**:&#x20;
  * **Endpoint**: Enter the endpoint we should query.

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2Fg7daeJRF1Oxgm0aDuUCi%2Fimage.png?alt=media&#x26;token=268d1fd4-7f4c-4ac3-bec7-1b8c3e084642" alt=""><figcaption></figcaption></figure>

* **Request Headers**:

  * **Key**: Enter the header key
  * **Value**: Enter the header value

  You can add programmed values, possible values are

  * $token (Token generated from the registered secret)

  Usage example: "Bearer $token"

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FmSYFy7ATVSF9P2aDbNi7%2Fimage.png?alt=media&#x26;token=336b1c73-19fa-44d1-88ca-e0512e3f7ce3" alt=""><figcaption></figcaption></figure>

* **Request Query Params**:&#x20;

  * **Name**: Enter the name of the parameter
  * **Value**: Enter the value of the parameter

  You can add programmed values, possible values ​​are:

  * $current\_day (Current day's date (YYYY-MM-DD))
  * $start\_of\_month (Start of month (YYYY-MM-DD))
  * $end\_of\_month (End of month (YYYY-MM-DD))
  * $d-1 (Current Day - 1 Day (YYYY-MM-DD))
  * $d-2 (Current Day - 2 Days (YYYY-MM-DD))
  * $d-3 (Current Day - 3 Days (YYYY-MM-DD))

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2F9KvXXuF8HngO7WCIMvf7%2Fimage.png?alt=media&#x26;token=486a37db-770c-492e-ab5f-e60dda269c1a" alt=""><figcaption></figcaption></figure>

* **Pagination:** When enabling the pagination option, the system will display the following field:
  * **Pagination type**: select the pagination type from the available options

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FsCt3kT5B3mdxnpkwRnDX%2Fimage.png?alt=media&#x26;token=59b8cec2-8126-426b-a702-2db7f6d51f50" alt=""><figcaption></figcaption></figure>
