You can call this operation to set the Owner of a table or a database.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Required SetOwners

Required parameter. Value: SetOwners.

OwnerIds String Required 123, 456

The ID of the user to which the project belongs. Multiple user IDs are separated by using commas (,).

OwnerType String Required DATABASE

Owner. Valid values:

  • DATABASE: The Owner of a physical DATABASE
  • LOGIC_DATABASE: The Owner of a logical database.
  • TABLE: Owner of a physical TABLE
  • LOGIC_TABLE: Owner of a logical table
ResourceId String Required 123

The ID of a resource. Values of OwnerType and corresponding resource IDs are as follows:

  • DATABASE: the ID of the DATABASE.
  • LOGIC_DATABASE: indicates a logical database ID.
  • TABLE: the ID of the physical TABLE.
  • LOGIC_TABLE: ID of a logical table.
Tid Long Yes -1

The ID of the tenant.

Response parameters

Parameter Type Example Description
ErrorCode String UnknownError

The error code.

ErrorMessage String UnknownError

The error message.

RequestId String A99CD576-1E18-4E86-931E-C3CCE56DC030

The ID of the request.

Success Boolean true

Indicates whether the request is successful. Valid values:

  • true
  • false

Examples

Sample requests

http(s)://[Endpoint]/? Action=SetOwners
&OwnerIds=123, 456
&OwnerType=DATABASE
&ResourceId=123
&Tid=-1
&<Common request parameters>

Sample success responses

XML format

<RequestId>A99CD576-1E18-4E86-931E-C3CCE56DC030</RequestId>
<Success>true</Success>

JSON format

{
  "RequestId": "A99CD576-1E18-4E86-931E-C3CCE56DC030",
  "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.