skip to main content
Hybrid Data Pipeline API reference : Management API : Data Sources API : Get data sources
  

Try Now
Get data sources

Purpose

Retrieves a list of data sources with details for each including the data source ID. The data source ID can be used to retrieve further details for each data source, or carry out other operations on a given 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
Filter by a query parameter
The list of data sources can also be filtered by member, type, and isOData filters. Use a semicolon to separate query parameters when filtering by more than one parameter.
*URL with filter by the member parameter.
https://<myserver>:<port>/api/mgmt/datasources?member=<member_datasource_id>
*URL with filter by the type parameter.
https://<myserver>:<port>/api/mgmt/datasources?type=<datasource_type>
*URL with filter by the isOData parameter.
https://<myserver>:<port>/api/mgmt/datasources?isOData=<boolean>
The following table describes query parameters that can be used to filter the list of data sources.
Parameter
Description
Valid Values
"member"
Allows the list to be filtered to include only data source groups for which the specified data source is a member
A valid member data source ID
"type"
Allows the list to be filtered based on group status
all | simple | group
If set to all, all data sources are returned whether or not they are group data sources.
If set to simple, only data sources that are not group data sources are returned. However, the list will include data sources that are members of a data source group.
If set to group, only group data sources are returned.
"isOData"
Allows the list to be filtered by data sources that have been enabled for OData
true | false
If true, only data sources that are OData enabled are returned.
If false, only non-OData data sources are returned.

Method

GET

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.

Response Definition

The response takes the following format. The properties of the response are described in the table that follows.
{
"dataSources": [
{
"id": "datasource_id",
"name": "datasource_name",
"dataStore": datastore_id,
"isGroup": boolean,
"description": "datasource_description",
"sharedByAnotherUser": boolean,
"sharedWithAnotherUser": boolean,
"permissions": [integer, integer, ...]
}
]
}
Property
Description
Valid Values
"id"
The ID of the data source
The ID is auto-generated when the data source is created and cannot be changed.
"name"
The name of the data source. This name is passed as a database parameter when establishing a connection to the data source with the ODBC driver, the JDBC driver, or the OData API.
The first character of the name must be a letter, and the name can contain only alphanumeric characters, underscores and dashes.
"dataStore"
The ID of the data store on which the data source is being created. The data store defines the options that can be specified when creating the data source.
Group data sources must be created on the Hybrid Data Pipeline group data store. A group data source is comprised of multiple member data sources that connect to one or more back end data stores such as Salesforce or SQL Server.
The integer ID of the data store
Data store IDs can be obtained with the Get data stores call.
"isGroup"
Indicates whether the data source is a group data source. A group data source is comprised of member data sources.
true | false
If true, the data source is a group data source.
If false, the data source is not a group data source.
"description"
A description of the data source
A description of the data source provided by the user who created the data source
"sharedByAnotherUser"
Indicates whether the data source is being shared by another user. Provided only when the data source is shared by another user.
true when the data source is being shared by another user.
"sharedWithAnotherUser"
Indicates whether the data source is being shared with another user. Provided only when the data source is shared with another user.
true when the data source is being shared with another user.
"permissions"
A list of permissions associated explicitly with the data source. Permissions can only be set on a data source by an administrator when creating or updating the data source on behalf of a user.
Any permissions specified for this data source will override the permissions for the user or the user's role that own this data source. You must specify the exact set of permissions that you want to set for this data source as no permissions are inherited from the user or user's role if permissions are specified on a data source.
Permissions set on a group data source override permissions set on any of its member data sources.
A comma separated list of permission IDs
See Data source permissions for supported permissions.

Sample Server Success Response

Note: The response will not return settings for optional properties that were not set in a previous POST or PUT request.

Status code: 200
Successful response
{
"dataSources":[
{
"id": "18",
"name": "Oracle_Test",
"dataStore": 43,
"isGroup": false,
"description": "Oracle data source on test schema",
"permissions": [
1,
2,
3,
4,
5
]
},
...
]
}

Sample Server Failure Response

{
"error":{
"code":222207004,
"message":{
"lang":"en-US",
"value":"There is no DataSource with that id: 1234."
}
}
}

Authentication

Basic Authentication using Login ID and Password

Authorization

The user must have the MgmtAPI (11) and ViewDataSource (2) permissions.