GetMetrics

Updated at:

Retrieves the metrics of an instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET /api/v2/instance/{InstanceId}/cms/metrics HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

InstanceId

string

No

The ID of the DSW instance.

dsw-328d2bbf605*****

Request parameters

Parameter

Type

Required

Description

Example

Namespace

string

No

The namespace in CloudMonitor where the metrics are stored.

acs_pai_dsw

Dimensions

string

No

The request parameters.

{"userId":"16122852825*****","jobId":"dsw-328d2bbf605*****","regionId":"cn-wulanchabu","pod":"dsw-45680-76766f8778-95gxh"}

Length

string

No

The maximum number of entries to return per page. The value cannot exceed 1440.

10

EndTime

string

No

The end time. Default value: the current time.

2020-11-08T16:00:00Z

Period

string

No

The time interval.

60

NextToken

string

No

The pagination token.

15761485350009dd70bb64cff1f0fff750b08ffff073be5fb1e785e2b020f1a949d5ea14aea7fed82f01dd8****

MetricName

string

No

Required. The name of the monitoring metrics. For more information, see Metric names.

INSTANCE_SPEC_MEMORY_SWAP

StartTime

string

No

The start time. Default value: 1 hour ago.

2020-11-08T15:00:00Z

Response elements

Element

Type

Description

Example

object

Schema of Response

Code

string

The status code.

200

Datapoints

string

The metric data points.

[{'timestamp': 1740452220000, 'jobId': 'dsw-94ed9f9********', 'pod': 'dsw-871***-764fdf******', 'regionId': 'cn-hangzhou', 'userId': '1042612********', 'workspaceId': '1445***', 'Value': 0.0}]

Message

string

The response message.

Succeed

NextToken

string

The pagination token.

15761485350009dd70bb64cff1f0fff750b08ffff073be5fb1e785e2b020f1a949d5ea14aea7fed82f01dd8****

Period

string

The time interval.

60

RequestId

string

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Success

boolean

Indicates whether the request was successful.

true

Examples

Success response

JSON format

{
  "Code": "200",
  "Datapoints": "[{'timestamp': 1740452220000, 'jobId': 'dsw-94ed9f9********', 'pod': 'dsw-871***-764fdf******', 'regionId': 'cn-hangzhou', 'userId': '1042612********', 'workspaceId': '1445***', 'Value': 0.0}]",
  "Message": "Succeed",
  "NextToken": "15761485350009dd70bb64cff1f0fff750b08ffff073be5fb1e785e2b020f1a949d5ea14aea7fed82f01dd8****",
  "Period": "60",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.