Updated on 2026-08-25 GMT+08:00

Querying Index Usage Details

Function

This API is used to query index usage details.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the permission listed below is required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    das::showCloudDBAInfo

    read

    -

    -

    -

    -

URI

POST /v3/{project_id}/instances/{instance_id}/index-usage/get-index-usage-detail-list

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

conditions

Yes

Array of objects in Table 3

Definition

Filter criteria.

Constraints

N/A

Range

N/A

Default Value

N/A

object_name

Yes

String

Definition

Table name.

Constraints

N/A

Range

N/A

Default Value

N/A

sort_field

No

String

Definition

Sorting field.

Constraints

N/A

Range

N/A

Default Value

N/A

sort_asc

No

Boolean

Definition

Whether to sort in ascending order.

Constraints

N/A

Range

N/A

Default Value

N/A

cur_page

No

Integer

Definition

Current page.

Constraints

N/A

Range

N/A

Default Value

N/A

per_page

No

Integer

Definition

Page size.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 Condition

Parameter

Mandatory

Type

Description

field

No

String

Definition

Filter field.

Constraints

N/A

Range

N/A

Default Value

N/A

min_value

No

Number

Definition

Minimum value.

Constraints

N/A

Range

N/A

Default Value

N/A

max_value

No

Number

Definition

Maximum value.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

detail_list

Array of objects

Definition

Details of missing indexes.

Range

N/A

total

Long

Definition

Total number.

Range

N/A

collect_time

Long

Definition

Collection time.

Range

N/A

Example Requests

POST https://das.cn-north-1.myhuaweicloud.com/v3/2cfb7eecd30f344f8e21f03106c7a607/instances/5eb0301017874d4b8d8e697ab8e7676ain04/index-usage/get-index-usage-detail-list 
 
{
    "conditions": [],
    "cur_page": 1,
    "per_page": 10,
    "sort_field": "",
    "sort_asc": null
}

Example Responses

Status code: 200

Success.

{
    "detail_list": [
        {
            "table_name": "[test].[dbo].[test]",
            "index_name": "TEST@ContactID_@TEST",
            "ix_type_desc": "NONCLUSTERED",
            "fragmentation_percentage": 99.75,
            "index_size_mb": 3.12,
            "maintenance_operation": "Rebuild",
            "page_count": 399,
            "ix_seek_count": 0,
            "ix_scan_count": 0,
            "ix_key_lookup_count": 0,
            "ix_update_count": 0,
            "seek_percentage": 0,
            "scan_percentage": 0,
            "key_lookup_percentage": 0,
            "update_percentage": 0,
            "is_primary_key": false,
            "is_disabled": false,
            "column_list": "ServiceSpaceID,[*inc*]ID,[*inc*]CustomerID",
            "fill_factor": "0",
            "create_date": 1709535480000,
            "stats_last_updated": 1716865020000
        }
    ],
    "total": 1,
    "collect_time": 1764204246000
}

Status Codes

Status Code

Description

200

Success.

400

Client error.

500

Server error.

Error Codes

See Error Codes.