skip to main content
Hybrid Data Pipeline API reference : Management API : Data Sources API : Test a connection to a data source
  

Try Now
Test a connection to a data source

Purpose

Test whether a connection can be made to a specified data source.
Note: This API cannot be used on a group data source. If the test API is used on a group data source, an error is returned. To check connectivity on a group data source, test each member of the group data source.
Note: An administrator can execute this operation on behalf of a user by appending the user query parameter to the request and specifying a user name. See also Managing resources on behalf of users.

URL

https://<myserver>:<port>/api/mgmt/datasources/{datasourceId}/test

Method

POST

URL Parameters

<myserver> is the hostname or IP address of the machine hosting the Hybrid Data Pipeline server for a standalone installation, or the machine hosting the load balancer for a load balancer installation. For a standalone installation, <port> is the port number specified as the Server Access Port during installation. For a load balancer installation, <port> must be either 80 for http or 443 for https. Whenever port 80 or 443 are used, it is not necessary to include the port number in the URL.
The {datasourceId} parameter must also be specified in the URL.
Parameter
Description
Valid Values
{datasourceId}
The ID of the data source.
The ID is auto-generated when the data source is created and cannot be changed.

Request Payload Definition

If the user ID and password of the back end data store (for example, Oracle Database or Salesforce) are stored in the data source, then an empty JSON payload is required.
{ }
If the user ID and password of the back end data store are not stored in the data source, then they must be specified in the request payload. The payload has the following format.
{
"user": "data_store_user_id",
"password": "data_store_user_password"
}
Parameter
Description
Valid Values
"user"
The user ID needed to connect to the back end data store (for example, Oracle Database or Salesforce)
A valid user ID for the back end data store
"password"
The user password needed to connect to the back end data store (for example, Oracle Database or Salesforce)
A valid user password for the back end data store

Sample Request Payload


{
"user": "MyDbId",
"password": "MyDbSecret"
}

Sample Server Response


Status code: 200
Successful response

{
"success":true
}

Sample Server Failure Response


{
"error":{
"code":222207028,
"message":{
"lang":"en-US",
"value":"Missing 'userId' in payload."
}
}
}

Authentication

Basic Authentication using Login ID and Password.

Authorization

The user must have the MgmtAPI (11) permission, the ViewDataSource (2) permission, and at least one query permission such as UseDataSourceWithJDBC (5), UseDataSourceWithODBC (6) or UseDataSourceWithOData (7).