Update a data source
- Last Updated: April 11, 2025
- 2 minute read
- Hybrid Data Pipeline
- Version 4.6
- Documentation
Purpose
Updates the details of an existing data source.
- When using OData, you must refresh the OData data model after updating a data source.
- When using the Data Sources API to configure Snowflake for key-pair authentication, the multiline format of the private key must be modified for the JSON request payload. See Configuring Snowflake key-pair authentication using the API for details.
- 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.
- Permissions can only be set on a data source by an administrator when creating or updating the data source on behalf of a user.
- The "id", "dataStore", and "connectionType" properties of a data source cannot be changed. These properties can be passed in the payload to update the data source, but they must match the current values set in the data source.
URL
https://<myserver>:<port>/api/mgmt/datasources/{datasourceId}
Method
PUT
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.
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 Definition
{
"name": "datasource_name",
"dataStore": datastore_id,
"connectionType": "connection_type",
"description": "datasource_description",
"options": {
"option1": "option1_value",
"option2": "option2_value",
...
},
"permissions": [integer, integer, ...],
"members": ["datasource1", "datasource2", ...]
}
| Parameter | Description | Usage | Valid Values |
|---|---|---|---|
| "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. | Required | 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. |
Required | The integer ID of the data store For a group data source, this property is set
to 56 to specify the Data store IDs can be obtained with the Get data stores call. |
| "connectionType" | Specifies whether the data source is a cloud, hybrid, or group data source | Required | "Cloud" |
"Hybrid" | GroupIf set to
If set
to If set to |
| "description" | A description of the data source | Optional | A description of the data source provided by the user who created the data source |
| "options" | The list of option names and values to be set on the data source. The list of allowed options depends on the data store. Data store options can be retrieved with the Get options for a data store call. | Required | A comma separated list of options and their
values. The content of the options object is zero or more sets of option names and values. |
| "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. |
Optional | A comma separated list of permission IDs See Data source permissions for supported permissions. |
| "members" | The members object can be used to assign member data sources to a group data source. Member data sources can be assigned when a group data source is being created or added after the group data source has been created. | Optional | The members object includes an "id" property and
an "entityPrefix" property. The "id" specifies the ID of a member data source. The member data source cannot itself be a group data source. The "entityPrefix" is a user-defined prefix associated with a specific data source to resolve naming conflicts. The prefix must be 1 to 64 characters in length and must be unique. |
Sample Request Payload
{
"name":"SF2",
"dataStore":"1",
"connectionType":"Cloud",
"description":"Test",
"options":{
"User":"mySForceUserId",
"Password":"mySForcePassword",
"SecurityToken":"mySecurityToken",
"EnableBulkLoad": "true",
"StmtCallLimit":"60",
"MaxPooledStatements": "60"
},
"permissions": [
1,
2,
3,
4,
5
]
}
Sample Server Response
Status code: 200
Successful response
{
"id":"5039",
"name":"SF2",
"dataStore":1,
"connectionType":"Cloud",
"description":"Test",
"options":{
"User":"mySForceUserId",
"Password":"mySForcePassword",
"SecurityToken":"mySecurityToken",
"EnableBulkLoad": "true",
"StmtCallLimit":"60",
"MaxPooledStatements": "60"
},
"permissions": [
1,
2,
3,
4,
5
]
}
Authentication
Basic Authentication using Login ID and Password.
Authorization
The user must have the MgmtAPI (11) and ModifyDataSource (3) permissions.