UiPath Documentation
industry-department-solutions
latest
false
UiPath logo, featuring letters U and I in white

Supply Chain & Retail Solutions user guide

Last updated Apr 16, 2026

Configuring a REST API connector

A REST API connector connects Peak to any REST-compliant API endpoint using a Python script you write. This enables you to ingest data from sources not covered by other connectors.

Prerequisites

Before configuring a REST API connector, ensure you meet the following requirements:

  • You have access to Peak with permissions to configure Data Sources.
  • You have the REST API endpoint URL and any required authentication credentials.

Configuring the connection

  1. In Peak, open Manage and select Data Sources.
  2. Select Add feed and choose the REST API connector.
  3. At the Connection stage, either select an existing connection from the dropdown or select New connection.
  4. For a new connection, enter the connection parameters. See Connection parameters.
  5. Select Save and proceed to the next stage.

Note: The connection name and authentication type cannot be edited after a connection is saved.

Connection parameters

ParameterDescription
Connection nameA name for this connection. Use alphanumeric characters.
Authentication typeThe authorization method required by the API. See Authentication types.

Authentication types

TypeDescription
No AuthThe API does not require authorization. No additional details required.
Basic AuthThe API requires a username and password.
Custom AuthThe API requires a custom authorization URL, request headers, and a JSON body.

Configuring import settings

The import configuration screen is where you write and test the Python script that fetches data from the API.

Installing dependencies

If your script requires Python packages, add them in the Install dependency field before writing your script. Multiple packages can be added by pressing Tab or Enter.

Writing the fetch script

Write your fetch logic in the Python script editor. Use the following objects in your script:

  • outputStream.write(obj): Writes a record to the feed output. Call this for each record you want to ingest.
  • metadata.save(object): Saves feed run details (for example, a timestamp or offset) so they can be used on the next run to fetch data incrementally. metadata starts as an empty object {}.

Import these objects at the top of your script:

import requests
from lib import outputStream, metadata
import requests
from lib import outputStream, metadata

After writing your script, select Test to run it. Logs appear below the editor; select the refresh icon to fetch live logs.

Previewing results

After a successful test, a preview of up to 10 records is available in two formats:

  • JSON: The data as received from the API.
  • Tabular: The data in a table format.

Load type and feed name

  • Load type: Always Incremental.
  • Feed name: Use only alphanumeric characters and underscores. Must start with a letter, must not end with an underscore, maximum 50 characters.

Configuring the destination

Select where your data will be ingested. Available options depend on your configured data warehouse:

  • Redshift: Redshift and S3
  • Snowflake: Snowflake only

Configuring the trigger

Set up how and when the feed runs. See Triggers and watchers.

Result

Peak creates the REST API connector feed and runs it according to the selected trigger. You can monitor feed runs and troubleshoot failures from Manage > Data Sources.

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated