Querying All Triggers of a Function
Function
This API is used to query all triggers of a function.
URI
GET /v2/{project_id}/fgs/triggers/{function_urn}
Request
Table 1 describes the request parameters.
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Project ID. |
function_urn |
String |
Yes |
Function URN. See Function Model. |
Response
Parameter |
Type |
Description |
---|---|---|
trigger_id |
String |
Trigger ID. |
trigger_status |
String |
Trigger status. |
trigger_type_code |
String |
Trigger type code. |
event_data |
String |
Trigger data defined in JSON format.
NOTE:
|
last_updated_time |
String |
Time when the trigger was last updated. |
created_time |
String |
Time when the trigger was created. |
Example
Example request
GET /v2/7aad83af3e8d42e99ac194e8419e2c9b/fgs/triggers/urn:fss:xxxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test:latest HTTP/1.1
Example response
The format of the response for a successful request is as follows:
HTTP/1.1 200 OK [ { "trigger_id": "0586f1e2-8db2-4d2a-97bd-989f67d9fd8b", "trigger_type_code": "TIMER", "trigger_status": "ACTIVE", "event_data": { "name": "Timer-tg0q", "schedule": "3m", "schedule_type": "Rate" } "last_updated_time": "2020-04-23T15:02:17+08:00", "created_time": "2020-04-23T15:02:17+08:00" } ]
The format of the response for a failed request is as follows:
HTTP/1.1 404 Not Found { "error_code": "FSS.1051", "error_msg": "Error getting associated function" }
Status Code
See Status 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