Help Center/ FunctionGraph/ API Reference/ APIs/ ServiceBridge metrics/ Querying Top Functions for a Specified Metric
Updated on 2026-10-27 GMT+08:00

Querying Top Functions for a Specified Metric

Function

List of bridges sorted by specified metrics.

By default, the top 10 bridges with the highest number of calls in the last day are collected.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

URI

GET /v2/{project_id}/fgs/servicebridge/report

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Parameter description:

Project ID. For details, see Obtaining a Project ID.

Constraints:

None

Value range:

32 characters, including letters and digits.

Default value:

None

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

type

No

String

Metric type. Default value: bridgeCount.

start_time

No

String

Start time.

end_time

No

String

End time.

limit

No

String

Number of bridges to be queried. The default value is 10.

period

No

String

Query interval. The default value is 5 minutes.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Parameter description:

User token.

The token can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token.

Constraints:

None

Value range:

None

Default value:

None

Content-Type

No

String

Parameter description:

Specifies the type (or format) of the message body.

Constraints:

None

Value range:

Only application/json is supported.

Default value:

application/json

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

values

Array of BridgeMetric objects

Bridge name and number of metrics

next_marker

Long

Next read position.

count

Long

Total number of returned bridges

Table 5 BridgeMetric

Parameter

Type

Description

key

String

Bridge name

value

Integer

Value

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

Query the top functions for a specified metric.

GET /v2/{project_id}/fgs/servicebridge/report

Example Responses

Status code: 200

{
  "next_marker" : 2,
  "count" : 2,
  "values" : [ {
    "key" : "bridge1",
    "value" : 1
  }, {
    "key" : "bridge2",
    "value" : 2
  } ]
}

Status Codes

Status Code

Description

200

Successful query

400

Bad Request

Error Codes

See Error Codes.