Querying Top Functions for a Specified Metric
Function
This API is used to query the top functions for a specified metric.
By default, the top ten functions with the most errors in the last day are queried.
URI
GET /v2/{project_id}/fgs/function/report
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
No |
String |
Metric type. Default value: failcount. |
start_time |
No |
String |
Start time. |
end_time |
No |
String |
End time. |
limit |
No |
String |
Metric type. Default value: failcount. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Content-Type |
Yes |
String |
Message body type (format). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
values |
Array of FunctionMetric objects |
Function URN and metrics. |
next_marker |
Long |
Next read location. |
count |
Long |
Total number of functions returned. |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Function URN. |
value |
Integer |
Metric value. |
Status code: 400
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/function/report
Example Responses
Status code: 200
Query successful.
{ "next_marker" : 2, "count" : 2, "values" : [ { "key" : "funcUrn1", "value" : 1 }, { "key" : "funcUrn2", "value" : 2 } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Query successful. |
400 |
Bad Request |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot