Modify Data Source
Update the connection information of the data sources already entered in NineData. You can modify the name, account, password, connection address, port, and environment of the data source.
Request URL: /openapi/v1/datasource/update
Request Method: POST
Request Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
datasourceId | String | Yes | Data source ID. You can query by calling the List Data Sources interface. | ds-d92lj22cb03k |
name | String | No | Modify the name of the data source. | Datasource-updated |
username | String | No | Modify the login account of the data source. | root |
password | String | No | Modify the login password of the data source. | root |
host | String | No | Modify the connection address of the data source. | 127.0.0.1 |
port | Integer | No | Modify the port of the data source. | 3306 |
envId | String | No | Modify the environment of the data source. You can call the List Environments interface to get envId . | aliyun-cn-hangzhou |
Response Parameters
Parameter | Type | Description | Example |
---|---|---|---|
success | Bool | Whether the interface call is successful. Return values: true , false . | true |
requestId | String | Request ID. | Iq0s6SPI-HNKKaLTnINGt1JEdOLc7DSH |
data | Array | Data source update details, including whether the update is successful (success). Return values: true , false . | { "success": true } |
Successful Call Example
{
"success": true,
"requestId": "Iq0s6SPI-HNKKaLTnINGt1JEdOLc7DSH",
"data": {
"success": true
}
}