Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Workload Diagnosis Report (WDR)/ Querying Collection Results for WDR Snapshot Reports
Updated on 2025-12-26 GMT+08:00

Querying Collection Results for WDR Snapshot Reports

Function

This API is used to query collection results for WDR snapshots reports. Before calling this API:

Debugging

You can debug this API in API Explorer.

URI

GET /v3/{project_id}/instances/{instance_id}/wdr-snapshots

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

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

Definition

Instance ID, which uniquely identifies an instance.

Constraints

N/A

Range

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

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

After a response is returned, the value of X-Subject-Token in the response header is the token.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Language.

Constraints

N/A

Range

  • zh-cn
  • en-us

Default Value

en-us

Table 3 Request query parameters

Parameter

Mandatory

Type

Description

offset

No

integer

Definition

Index offset.

Constraints

N/A

Range

The value must be a non-negative integer.

Default Value

0

limit

No

integer

Definition

Number of records returned by a query.

Constraints

The value cannot be a negative number.

Range

1–100

Default Value

10

start_time

No

String

Definition

Query start time. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. The plus sign (+) in the time zone must be URL-encoded to %2B, and the minus sign (-) in the time zone does not need to be encoded.

For example, in the Beijing time zone, the time zone offset is shown as +0800 and the value (2024-03-15T17:20:33+0800) of start_time needs to be encoded as 2024-03-15T17:20:33%2B0800.

Constraints

N/A

Range

N/A

Default Value

N/A

end_time

No

String

Definition

Query end time. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. The plus sign (+) in the time zone must be URL-encoded to %2B, and the minus sign (-) in the time zone does not need to be encoded.

For example, in the Beijing time zone, the time zone offset is shown as +0800 and the value (2024-03-16T17:20:33+0800) of end_time needs to be encoded as 2024-03-16T17:20:33%2B0800.

Constraints

N/A

Range

N/A

Default Value

N/A

job_id

No

String

Definition

Job ID. After setting this parameter, you can query the snapshot report collection result of the specified job.

Constraints

Fuzzy match is not supported. You need to enter the complete job ID.

Range

N/A

Default Value

N/A

status

No

String

Definition

Status of the collection job. After setting this parameter, you can query the status of the corresponding collection job.

Constraints

Fuzzy match is not supported. The value is case-sensitive. Enter a complete valid value.

Range

  • EXPORTING: The collection is in progress.
  • SUCCESS: The collection is successful.
  • FAILED: The collection failed.

Default Value

N/A

wdr_type

No

String

Definition

Collection type.

After setting this parameter, you can query the type of the corresponding collection job.

Constraints

Fuzzy match is not supported. The value is case-sensitive. Enter a complete valid value.

Range

  • cluster: instance-level
  • component: component-level
  • pdb: tenant-level

Default Value

N/A

job_start_time

No

String

Definition

Time when the creation of the collection job starts. Results of jobs created on or after the start time can be queried. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset.

The plus sign (+) in the time zone must be URL-encoded to %2B, and the minus sign (-) in the time zone does not need to be encoded.

For example, in the Beijing time zone, the time zone offset is shown as +0800 and the value (2024-03-15T17:20:33+0800) of job_start_time needs to be encoded as 2024-03-15T17:20:33%2B0800.

Constraints

N/A

Range

N/A

Default Value

N/A

job_end_time

No

String

Definition

Time when the creation of the collection job ends. Results of jobs created on or before the end time can be queried. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset.

The plus sign (+) in the time zone must be URL-encoded to %2B, and the minus sign (-) in the time zone does not need to be encoded.

For example, in the Beijing time zone, the time zone offset is shown as +0800 and the value (2024-03-16T17:20:33+0800) of job_end_time needs to be encoded as 2024-03-16T17:20:33%2B0800.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Table 4 Response body parameters

Parameter

Type

Description

wdr_snapshots

Array of objects

Definition

WDR snapshots in the list. For details, see Table 5.

total_count

Integer

Definition

Total number of records.

Range

N/A

Table 5 ListWdrSnapshotsResult

Parameter

Type

Description

job_id

String

Definition

Job ID.

Range

N/A

file_size

Integer

Definition

File size, in KB.

Range

When the value of status is SUCCESS, the value of this parameter cannot be left blank.

wdr_type

String

Definition

Collection type.

Range

  • cluster: instance-level
  • component: component-level
  • pdb: tenant-level

start_time

String

Definition

Start time for snapshot collection. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is +0800.

Range

N/A

end_time

String

Definition

End time for snapshot collection. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is +0800.

Range

N/A

job_create_time

String

Definition

Time when a WDR generation job was created. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. The current time is always in the +0 time zone. For example, 2025-07-08T10:57:59+0000.

Range

N/A

start_snapshot_id

String

Definition

ID of the first comparison snapshot used to generate a WDR, for example, 20024. This parameter is only valid for the collection job whose report generation mode is snapshot_id. This parameter is left blank if the report generation mode is time_range.

Range

N/A

end_snapshot_id

String

Definition

ID of the second comparison snapshot used to generate a WDR, for example, 20025. This parameter is only valid for the collection job whose report generation mode is snapshot_id. This parameter is left blank if the report generation mode is time_range.

Range

N/A

download_url

String

Definition

Link for downloading reports. The validity period is 30 minutes.

Range

When the value of status is SUCCESS, the value of this parameter cannot be left blank.

status

String

Definition

Collection status.

Range

  • SUCCESS: The collection is successful.
  • FAILED: The collection fails.
  • EXPORTING: The collection is in progress.

notes

string

Definition

Remarks. When the collection type is component-level, this parameter indicates the ID of the component from which data is collected.

Range

N/A

error_msg

String

Definition

Error information, which is used for O&M personnel to locate and analyze the fault.

Range

N/A

file_name

String

Definition

Name of a temporary WDR file.

Range

N/A

file_path

String

Definition

Path for storing a temporary WDR file.

Range

N/A

obs_bucket

Array of objects

Definition

Information about the OBS bucket that stores a temporary WDR file. For details, see Table 6.

Table 6 ObsBucket

Parameter

Type

Description

name

String

Definition

OBS bucket name.

Range

N/A

type

String

Definition

OBS bucket type.

Range

  • common: public bucket
  • aps: dedicated bucket for intelligent O&M

url

String

Definition

URL for accessing OBS

Range

N/A

port

Integer

Definition

OBS service port.

Range

N/A

domain_id

String

Definition

End tenant ID.

Range

N/A

Example Request

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0611f1bd8b00d5d32f17c017f15b599f/instances/d04686c6baae4f65a742771186f47b7ain14/wdr-snapshot?limit=10&offset=0

Example Response

Collection results for WDR snapshots queried.

{
     "wdr_snapshots": [{
       "job_id": "56c196275a9a59f6c4c047414d64a5a7",
       "file_size": 1024,
       "wdr_type": "component",
       "start_time": "2023-07-24T18:38:10+0000",
       "end_time": "2023-08-01T15:32:11+0000",
       "start_snapshot_id": "14",
       "end_snapshot_id": "15",
       "job_create_time": "2023-08-02T02:33:57+0000",
       "download_url": https://dbs-0-sa-fb-1-21a59c4449fd4ef4b20b7c13f5777f42-gaussdbaps.obsv3.sa-fb-1.guiyang-x86-3.com:443/48ca77871d43477db2a7190e2d8ea7a8_wdr_download_680caff6-0746-4c2b-b23f-fff54df4e9f2/48ca77871d43477db2a7190e2d8ea7a8_add63d531234421aadbe74a991eac6c6in14_20250712052202_20250712062210_metric_file_wdr.tar.gz?AccessKeyId=MQ7RUJKGCWLPQWA17S2C&Expires=1752289798&Signature=p3thVQrN12v7lfBDjnPKVotlR3g%3D",
       "status": "SUCCESS",
       "notes": "dn_6001,dn_6002"
       "error_msg": null,
       "file_path": "48ca77871d43477db2a7190e2d8ea7a8_wdr_download_680caff6-0746-4c2b-b23f-fff54df4e9f2/",
       "file_name": "48ca77871d43477db2a7190e2d8ea7a8_add63d531234421aadbe74a991eac6c6in14_20250712052202_20250712062210_metric_file_wdr.tar.gz",
       "obs_bucket": {
                "name": "dbs-0-sa-fb-1-21a59c4449fd4ef4b20b7c13f5777f42-gaussdbaps",
                "type": "aps",
                "url": "obsv3.sa-fb-1.guiyang-x86-3.com",
                "port": 443,
                "domain_id": "d0409f2f635a4a0d99227d6a8b6fb795"
        }
      }],
    "total_count": 10
}

Status Codes

Error Codes

For details, see Error Codes.