Querying DDM Accounts

Function

This API is used to query all DDM accounts of a DDM instance.

URI

GET /v1/{project_id}/instances/{instance_id}/users?offset={offset}&limit={limit}

If a compiler (such as Xshell) is used to invoke this API by running commands or scripts, special character ampersands (&) should be escaped.

Example:

GET /v1/{project_id}/instances/{instance_id}/users?offset={offset}\&limit={limit}

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Project ID of a tenant in a region

instance_id

Yes

DDM instance ID

offset

Yes

Offset for pagination query. The start value cannot be less than 0.

limit

Yes

Number of records returned on each page. The value is greater than 0 and less than or equal to 128.

Request

Request parameters

None

Response

Response parameters

Table 2 Parameter description

Parameter

Type

Mandatory

Description

users

Array

true

DDM account information

page_no

integer

true

Current page

page_size

integer

true

Number of data records on the current page

total_page

integer

true

Total number of pages

total_record

integer

true

Total number of data records

Table 3 Description of parameter users

Parameter

Type

Mandatory

Description

name

String

true

Name of the DDM account

status

String

true

Status of the DDM account

base_authority

array

true

Basic permissions of the DDM account.

The value can be CREATE, DROP, ALTER, INDEX, INSERT, DELETE, UPDATE, and SELECT.

extend_authority

array

true

Extended permissions of the DDM account.

The value can be fulltableDelete, fulltableSelect, and fulltableUpdate.

description

String

true

Description of the DDM account

created

String

true

Time when the DDM account is created

databases

array

true

Associated schemas.

Table 4 Description of parameter databases

Parameter

Type

Mandatory

Description

name

String

false

Name of the schema associated with the DDM account

description

String

false

Description of the associated schema

Example

  • Example request

    None

  • Example response
    {
        "users": [
            {
                "name": "ddmUser_test",
                "status": "RUNNING",
                "base_authority": [
                    "ALTER",
                    "CREATE",
                    "DELETE",
                    "DROP",
                    "INDEX",
                    "INSERT",
                    "SELECT",
                    "UPDATE"
                ],
                "extend_authority": [
                    "fulltableDelete",
                    "fulltableSelect",
                    "fulltableUpdate"
                ],
               
                "description": "",
                "created": 1589251767574,
                "databases": [
                    {
                        "name": "db_5683",
                        "description": ""
                    }
                ]
            }
        ]
    }

For failure responses, see Abnormal Request Results.

Status Code

For details, see Status Codes.