Querying the Triggers of a Function
Function
This API is used to query the triggers of a function.
URI
GET /v2/{project_id}/fgs/triggers/{function_urn}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
function_urn |
Yes |
String |
Function URN. |
|
project_id |
Yes |
String |
Tenant's project ID. |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
[items] |
Array of TriggersResponse objects |
Response body |
|
Parameter |
Type |
Description |
|---|---|---|
|
trigger_id |
String |
Trigger ID. |
|
trigger_type_code |
String |
Trigger type. Enumeration values:
|
|
trigger_status |
String |
Trigger status. ACTIVE: The trigger is enabled. DISABLE: The trigger is disabled. Enumeration values:
|
|
event_data |
Object |
Trigger source event. |
|
last_updated_time |
String |
Latest update time. |
|
created_time |
String |
Time when the trigger is created. |
Example Requests
GET https://{functiongraph_endpoint}/v2/7aad83af3e8d42e99ac194e8419e2c9b/fgs/triggers/urn:fss:xxxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test:latest
Example Responses
Status code: 200
OK
[ {
"trigger_id" : "1b3b264db3b849118d007884b9bc8a60",
"trigger_type_code" : "APIG",
"trigger_status" : "ACTIVE",
"event_data" : {
"api_id" : "4a59f6a7263c4d1dab3f69c34f98d949",
"api_name" : "API_test_triggers",
"auth" : "IAM",
"env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID",
"env_name" : "RELEASE",
"func_info" : {
"function_urn" : "urn:fss:cn-north-7:46b6f338fc3445b8846c71dfb1fbd9e8:function:default:test_triggers",
"invocation_type" : "sync",
"timeout" : 5000,
"version" : "latest"
},
"group_id" : "9205f83fe721481eb490870d380cf31d",
"group_name" : "APIGroup_2mbe",
"invoke_url" : "https://ed94ae9494ba4f70ac24224747202140.apigw.cn-north-7.myhuaweicloud.com/test_triggers",
"match_mode" : "SWA",
"name" : "API_test_triggers",
"path" : "/test_triggers",
"protocol" : "HTTPS",
"req_method" : "ANY",
"triggerid" : "1b3b264db3b849118d007884b9bc8a60",
"type" : 1
},
"last_updated_time" : "2019-08-09T10:42:07+08:00",
"created_time" : "2019-08-09T10:42:07+08:00"
} ]
Status code: 404
Not Found
{
"error_code" : "FSS.1051",
"error_msg" : "Error getting associated function"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
404 |
Not Found |
Error Codes
See Error Codes.
Last Article: Deleting All Triggers of a Function
Next Article: Creating a Trigger
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.