Querying Flow Metrics
Function
This API is used to query flow metrics.
URI
GET /v2/{project_id}/fgs/workflow-statistic
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. Minimum: 1 Maximum: 64 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
period |
No |
String |
Time period, in minutes. |
start_time |
No |
String |
Timestamp of the start time, precise to milliseconds. |
end_time |
No |
String |
Timestamp of the end time, precise to milliseconds. |
metric_type |
No |
String |
Metric type. If this parameter is left blank or invalid, all metrics are queried. Options: totalCount (number of invocations), errorCount (number of errors), averageDuration (average duration), running (ongoing executions), and rejectCount (number of throttles). |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
count |
Array of SlaReportsValue objects |
Number of executions. |
duration |
Array of SlaReportsValue objects |
Average latency, in milliseconds. |
fail_count |
Array of SlaReportsValue objects |
Number of errors. |
running_count |
Array of SlaReportsValue objects |
Number of running flows. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Minimum: 1 Maximum: 36 |
error_msg |
String |
Error description. Minimum: 2 Maximum: 512 |
request_id |
String |
Request ID. Minimum: 2 Maximum: 512 |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Minimum: 1 Maximum: 36 |
error_msg |
String |
Error description. Minimum: 2 Maximum: 512 |
request_id |
String |
Request ID. Minimum: 2 Maximum: 512 |
Example Requests
Query function flow metrics.
GET /v2/{projectId}/fgs/workflow-statistic
Example Responses
Status code: 200
Function flow statistics.
{ "count" : [ { "timestamp" : 0, "value" : 0 } ], "duration" : [ { "timestamp" : 0, "value" : 0 } ], "fail_count" : [ { "timestamp" : 0, "value" : 0 } ], "running_count" : [ { "timestamp" : 0, "value" : 0 } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Function flow statistics. |
400 |
Bad Request |
500 |
Internal Server Error |
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