Skip to main content

Custom API Source Connector

The Custom API source connector lets DataSync connect to any REST API to extract and load data into your data warehouse. Before setting up the connection, you need to prepare an API profile file (.apip), table definition files (.rsd), or both, and then fill in the required connection properties.

DataSync supports three authentication types for Custom API connections: None for public APIs, HTTP Basic for username and password authentication, and OAuth 2.0. OAuth 2.0 itself supports two methods: authorization code for setups where a user signs in through a browser, and client credentials for system-to-system connections where no user sign-in is required.

note

You need to create your API profile files (.apip or .rsd) before configuring a Custom API source connection. See Understand API Profile Structure and Build a Custom API Profile to get started.

Once your source connection is ready, configure your destination connection to finish the setup.

Create the source connection in DataSync

  1. Log in to DataSync.
  2. From the welcome screen, select Connections.
  3. Next to Source Connections, click New.
  4. Select Custom API.
  5. Enter all required connection properties.
  6. (Optional) In the Additional Connection Properties panel, click Add property and enter any extra parameters you need.
  7. Configure the advanced settings to match your environment, including Tracking Type.
  8. Click Save.

Connection properties

PropertyWhat to enter
DescriptionUnique name for this API connection. For example: Custom API
Authentication TypeAuthentication method your API uses.
  • None for public APIs that require no authentication.
  • HTTP (Basic) for username and password authentication. Credentials are entered via ProfileSettings.
  • OAuth2 for OAuth 2.0 authentication. Supports the authorization code method when a callback URL is required, or the client credentials method for system-to-system connections with no callback.
VerbosityControls how much detail the connector writes to the log. Each level includes everything from the level below it, plus additional detail.

  • 1 logs queries, row counts, execution start and end times, and errors.
  • 2 adds cache queries and HTTP headers.
  • 3 adds request and response bodies.
  • 4 adds transport-level communication.
  • 5 adds all interface commands.
API ProfileUpload location for your API profile or table definition files. For client credentials setups, see the OAuth2 client credentials example.

HTTP Basic additional connection properties

PropertyWhat to enter
ProfileSettingsSettings required by your data source, entered as comma-separated name-value pairs. Example: ProfileSettings='User=EmailId;Password=key';'Other=Domain=YourDomain'.
OtherAdditional provider options as name-value pairs. Common values:
  • DefaultColumnSize=number sets the default string length when the API metadata does not specify one. Default is 2000.
  • ConvertDateTimeToGMT=true converts date and time values to GMT instead of local time.
  • RecordToFile=filename logs socket data transfers to the specified file.

HTTP Basic example setup

Custom API HTTP Basic source connection in DataSync
Completed Custom API source connection in DataSync using HTTP Basic authentication, with all properties and settings filled in.

OAuth2 authorization code additional connection properties

Use this method when a user authenticates through a browser and the authorization server redirects back to a callback URL.

PropertyWhat to enter
CallbackURLRedirect URL for OAuth2. Must match the callback URL configured in your OAuth app settings. Example: https://datasync.mycompany.com/OAuthCallback/CallbackUrl.
OAuthClientIdClient identifier assigned by your OAuth2 authorization server. Example: abc123clientid.
OAuthClientSecretSecret assigned by your OAuth2 authorization server. Set the type to Encrypted. Example: xK8mNpL7vRtYw2cDjHs9bEuFgAiZo3qB.
ScopePermission scope for your application. Example: Forms=Read.
OtherAdditional provider options as name-value pairs. Common values:
  • DefaultColumnSize=number sets the default string length when the API metadata does not specify one. Default is 2000.
  • ConvertDateTimeToGMT=true converts date and time values to GMT instead of local time.
  • RecordToFile=filename logs socket data transfers to the specified file.

OAuth2 authorization code example setup

Custom API OAuth2 authorization code source connection in DataSync
Completed Custom API source connection in DataSync using OAuth2 authorization code, with all properties and settings filled in.

OAuth2 client credentials additional connection properties

Use this method for system-to-system connections where no user sign-in is required and no callback URL is needed.

PropertyWhat to enter
AuthSchemeEnter OAuth.
OAuthClientIdClient identifier assigned by your OAuth2 authorization server.
OAuthClientSecretSecret assigned by your OAuth2 authorization server. Set the type to Encrypted.
ScopePermission scope required by the provider. Example: employees.readonly.
InitiateOAuthEnter GETANDREFRESH.
OtherEnter OAuthIncludedCallbackURL=False.

OAuth2 client credentials example setup

Custom API OAuth2 client credentials source connection in DataSync
Completed Custom API source connection in DataSync using OAuth2 client credentials, with all properties and settings filled in.

Advanced settings

These settings control how the connector tracks data changes, handles time and regional configuration, and processes records during extraction. Configure them to match your SAP HANA environment so that results stay accurate and consistent.

SettingWhat to select
Tracking TypeMethod for tracking data changes: None or Date.
RegionRegion setting for the connector, if required by your setup.
Time ZoneTime zone matching your SAP HANA environment.
Time OffsetRefresh offset in seconds to compensate for timing issues in record selection. Minimum 0, maximum 3600.
Batch SizeNumber of records processed per batch during extraction. Larger batches can improve performance but use more memory. Default is 2000, maximum is 10000. Adjust based on your network speed and disk performance. The default works well in most cases.