Skip to main content

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

ParameterTypeRequiredDescriptionExample
datasourceIdStringYesData source ID. You can query by calling the List Data Sources interface.ds-d92lj22cb03k
nameStringNoModify the name of the data source.Datasource-updated
usernameStringNoModify the login account of the data source.root
passwordStringNoModify the login password of the data source.root
hostStringNoModify the connection address of the data source.127.0.0.1
portIntegerNoModify the port of the data source.3306
envIdStringNoModify the environment of the data source. You can call the List Environments interface to get envId.aliyun-cn-hangzhou

Response Parameters

ParameterTypeDescriptionExample
successBoolWhether the interface call is successful. Return values: true, false.true
requestIdStringRequest ID.Iq0s6SPI-HNKKaLTnINGt1JEdOLc7DSH
dataArrayData 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
}
}