Get data sources
- Last Updated: February 2, 2024
- 2 minute read
- Hybrid Data Pipeline
- Version 5.0
- Documentation
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.
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
memberparameter.https://<myserver>:<port>/api/mgmt/datasources?member=<member_datasource_id>
- URL with filter by the
typeparameter.https://<myserver>:<port>/api/mgmt/datasources?type=<datasource_type>
- URL with filter by the
isODataparameter.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 If set to If set to
|
| "isOData" | Allows the list to be filtered by data sources that have been enabled for OData | true | false
If If
|
Method
GET
URL Parameters
<myserver> is the hostname or IP address of the machine hosting the Hybrid Data Pipeline server for a non-load balancer deployment, or the machine hosting the load balancer for a load balancer deployment. For a non-load balancer deployment, <port> is the port number specified as the Server Access Port during deployment. For a load balancer deployment, <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 If
|
| "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
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.