How Does a Function Obtain the Request Path or Parameters When Using an APIG Trigger?
By default, the request path or parameters are included in event. A function invokes APIG using its event template. You can obtain the request path or parameters from the function execution result.
Example:
- queryStringParameters: parameters following the question mark (?), separated with ampersands (&). These parameters are added in the URL of a GET request, and will be transferred in the URL string format when a GET request is initiated.
- path: API URL.
You can call an API using its request path. Example: https://464d86ec641d45a683c5919ac57f3823.apig.projectID.huaweicloudapis.com/apig-demo/subpath
Alternatively, you can call an API by adding request parameters. Example:
https://464d86ec641d45a683c5919ac57f3823.apig.projectID.huaweicloudapis.com/apig-demo/subpath?a=1&b=2
Trigger Management FAQs FAQs
- What Events Can Trigger a FunctionGraph Function?
- What If Error Code 500 Is Reported When Functions that Use APIG Triggers Return Strings?
- What Do LATEST and TRIM_HORIZON Mean in DIS Trigger Configuration?
- Why Can't I Enable or Disable OBS Triggers by Calling APIs?
- How Do I Use an APIG Trigger to Invoke a Function?
- How Does a Function Obtain the Request Path or Parameters When Using an APIG Trigger?
- Can I Create an OBS Trigger with an Existing Bucket?
- Can I Configure a Kafka Trigger in a Different Subnet from My Function?
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.
Chatbotmore