Querying Metrics of a Flow
Function
This API is used to query the metrics of a flow.
URI
GET /v2/{project_id}/fgs/workflow-statistic/{workflow_urn}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details, see Obtaining a Project ID. Minimum: 1 Maximum: 64 |
| workflow_urn | Yes | String | Flow URN. Format:urn:fss:<region_id>:<project_id>:workflow:<package>:<workflow_name>:<version>Currently, package and version can only be set to default and latest, respectively. Minimum: 1 Maximum: 128 |
| 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. |
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 the metrics of a function flow.
GET /v2/{project_id}/fgs/workflow-statistic/{workflow_urn} 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.