APIG Events
FunctionGraph can create function-based API endpoints through APIG.
To create HTTP endpoints as event sources for FunctionGraph, use the HTTP event syntax.
HTTP Endpoint
In this setting, the first function should be run when someone accesses the API endpoint via a GET request. You can get the URL for the endpoint by running the serverless info command after deploying your service.
# serverless.yml
functions:
hello:
handler: index.hello
events:
- apigw:
env_id: DEFAULT_ENVIRONMENT_RELEASE_ID
env_name: RELEASE
req_method: GET
path: /test
name: API_test
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
