tencent cloud

DescribeApmServiceMetric
Last updated: 2025-11-14 16:38:06
DescribeApmServiceMetric
Last updated: 2025-11-14 16:38:06

1. API Description

Domain name for API request: apm.intl.tencentcloudapi.com.

This API is used to obtain the list of APM application metrics.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeApmServiceMetric.
Version Yes String Common Params. The value used for this API: 2021-06-22.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String Business system ID
ServiceName No String Application name
ServiceID No String Application ID
StartTime No Integer Start time.
EndTime No Integer End time.
OrderBy No OrderBy Order.
Demo No Boolean Whether to use the demo mode.
ServiceStatus No String Application status filter criteria. valid values: health, warning, error. if multiple statuses are selected, separate them by commas, for example: "warning,error".
Tags.N No Array of ApmTag Tag list
Page No Integer Page number.
PageSize No Integer Page size.
Filters.N No Array of Filter Filter criteria.

3. Output Parameters

Parameter Name Type Description
ServiceMetricList Array of ApmServiceMetric List of application metrics.
TotalCount Integer Number of applications meeting the filtering conditions.
WarningErrorCount Integer Warning of the abnormal number of applications.
ApplicationCount Integer Total number of applications.
Page Integer Page number.
PageSize Integer Page size.
ErrorCount Integer Indicates the number of abnormal applications.
WarningCount Integer Warning of the number of applications.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Successfully Acquiring APM Application Metrics

This example shows you how to retrieve APM application metrics.

Input Example

POST / HTTP/1.1
Host: apm.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeApmServiceMetric
<Common request parameters>

{
    "InstanceId": "apm-eDyXpD6CD"
}

Output Example

{
    "Response": {
        "ApplicationCount": 1,
        "ErrorCount": 1,
        "Page": 0,
        "PageSize": 0,
        "RequestId": "84d35deb-232e-463e-b2ac-fe49338707a2",
        "ServiceMetricList": [
            {
                "Fields": [
                    {
                        "CompareVal": "0.9%",
                        "CompareVals": null,
                        "Key": "duration_avg",
                        "LastPeriodValue": [
                            {
                                "Key": "CompareByYesterday",
                                "Value": 681.7527368527665
                            }
                        ],
"Name": "Average response time"
                        "NameEN": "Average Response Time",
                        "Unit": "ms",
                        "Value": 688
                    },
                    {
                        "CompareVal": "-1.7%",
                        "CompareVals": null,
                        "Key": "qps",
                        "LastPeriodValue": [
                            {
                                "Key": "CompareByYesterday",
                                "Value": 0.40692708333333333
                            }
                        ],
Average request volume
                        "NameEN": "Average RPS",
                        "Unit": "qps",
                        "Value": 0.4
                    },
                    {
                        "CompareVal": "-0.3%",
                        "CompareVals": null,
                        "Key": "request_count_sum",
                        "LastPeriodValue": [
                            {
                                "Key": "CompareByYesterday",
                                "Value": 70317
                            }
                        ],
"NameEN": "Total number of requests"
                        "NameEN": "Total Requests",
                        "Unit": "",
                        "Value": 70129
                    },
                    {
                        "CompareVal": "0.0%",
                        "CompareVals": null,
                        "Key": "error_req_rate_avg",
                        "LastPeriodValue": [
                            {
                                "Key": "CompareByYesterday",
                                "Value": 62.81837962370408
                            }
                        ],
"NameEN": "Average error rate"
                        "NameEN": "Average Error Rate",
                        "Unit": "%",
                        "Value": 62.8
                    },
                    {
                        "CompareVal": "-4.4%",
                        "CompareVals": null,
                        "Key": "adpdex",
                        "LastPeriodValue": [
                            {
                                "Key": "CompareByYesterday",
                                "Value": 0.7325824480566577
                            }
                        ],
"NameEN": "Average Apdex"
                        "NameEN": "Average Apdex",
                        "Unit": "",
                        "Value": 0.7
                    },
                    {
                        "CompareVal": "0",
                        "CompareVals": null,
                        "Key": "alarm_count",
                        "LastPeriodValue": [
                            {
                                "Key": "CompareByYesterday",
                                "Value": 0
                            }
                        ],
"NameCN": "alarm count"
                        "NameEN": "Alarm Count",
"Unit": "Time"
                        "Value": 0
                    },
                    {
                        "CompareVal": "-0.4%",
                        "CompareVals": null,
                        "Key": "error_request_count",
                        "LastPeriodValue": [
                            {
                                "Key": "CompareByYesterday",
                                "Value": 44172
                            }
                        ],
"Name": "Number of Exceptions",
                        "NameEN": "Error Count",
"Unit": "Unit"
                        "Value": 44008
                    },
                    {
                        "CompareVal": "",
                        "CompareVals": null,
                        "Key": "instance_count",
                        "LastPeriodValue": null,
                        "NameCN": "",
                        "NameEN": "",
                        "Unit": "",
                        "Value": 1
                    },
                    {
                        "CompareVal": "",
                        "CompareVals": null,
                        "Key": "critical_vulnerability_count",
                        "LastPeriodValue": null,
                        "NameCN": "",
                        "NameEN": "",
                        "Unit": "",
                        "Value": 0
                    },
                    {
                        "CompareVal": "",
                        "CompareVals": null,
                        "Key": "important_vulnerability_count",
                        "LastPeriodValue": null,
                        "NameCN": "",
                        "NameEN": "",
                        "Unit": "",
                        "Value": 0
                    },
                    {
                        "CompareVal": "",
                        "CompareVals": null,
                        "Key": "vulnerability_count",
                        "LastPeriodValue": null,
                        "NameCN": "",
                        "NameEN": "",
                        "Unit": "",
                        "Value": 0
                    }
                ],
                "ServiceDetail": {
                    "AppID": 250015922,
                    "CreateUIN": "1511340626",
                    "InstanceKey": "apm-eDyXpD6CD",
                    "InstanceName": "",
                    "Region": "ap-guangzhou",
                    "ServiceDescription": "",
                    "ServiceID": "svc-ELHkoErzzc",
                    "ServiceName": "java-order-service",
                    "Tags": []
                },
                "Tags": [
                    {
                        "Key": "service.name",
                        "Value": "java-order-service"
                    },
                    {
                        "Key": "color",
                        "Value": "red"
                    }
                ]
            }
        ],
        "TotalCount": 1,
        "WarningCount": 0,
        "WarningErrorCount": 1
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
AuthFailure.AccessCAMFail CAM authentication fails.
AuthFailure.UnmarshalResponse CAM authentication parsing failed.
FailedOperation Operation failed.
FailedOperation.ServiceNotFound No application resources were found.
FailedOperation.ServiceNotMatchAppIdErr serviceId does not match appId.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback