Skip to main content

Update Data Source Owner

Use this API to update the Owner of a data source or its databases.

Request URL: /openapi/v1/datasource/owner/update

Request Method: POST

note

Each request can update only one Owner scope. Pass owner and type to update the data source Owner, or pass databaseOwners to update database Owners. Do not update both scopes in one request.

Request Parameters

ParameterTypeRequiredDescriptionExample
datasourceIdStringYesData source ID. Obtain it from List Data Sources.ds-example123
ownerStringNoData source Owner. Pass this field when updating the data source Owner.<Owner>
typeStringNoData source Owner type. Values: account and role.account
databaseOwnersArrayNoDatabase Owner list. This field uses replacement semantics. Pass an empty array to remove all database Owner bindings from the data source.[]
└nameStringNoDatabase name.app_db
└typeStringNoDatabase Owner type. Values: account and role.account
└ownerArrayNoDatabase Owner identifier array.[...]

Request Examples

Update the data source Owner:

{
"datasourceId": "ds-example123",
"owner": "<Owner>",
"type": "account"
}

Remove all database Owner bindings:

{
"datasourceId": "ds-example123",
"databaseOwners": []
}

Response Parameters

ParameterTypeDescriptionExample
successBoolWhether the API call succeeded.true
requestIdStringRequest ID.request-example
errorCodeStringError code. Returned when the call fails.INVALID_PARAMETER
messageStringError message. Returned when the call fails.Invalid parameter

Successful Response

{
"success": true,
"requestId": "request-example"
}

After the update, call Query Data Source Owner to verify the latest configuration.