Help Center/ FunctionGraph/ User Guide (Ally Region)/ FAQs/ Trigger Management FAQs/ How Does a Function Obtain the Request Path or Parameters When Using an APIG Trigger?
Updated on 2026-01-09 GMT+08:00

How Does a Function Obtain the Request Path or Parameters When Using an APIG Trigger?

The request path or request parameters are carried in the input parameters of event by default. The input value of an APIG trigger is the event template of the function. For details about the event template, see Supported Event Sources.

How to obtain

The following are the formats for obtaining the request path and request parameters from the event object:

Format of the request path: event['path']

Format of the request parameter: event['queryStringParameters']['Parameter name']

How to call

You can call an API using its request path. Example: https://464d86ec641d45a683c5919ac57f3823.apig.projectID.com/apig-demo/subpath

You can also call the API by adding request parameters: https://464d86ec641d45a683c5919ac57f3823.apig.projectID.com/apig-demo/subpath?a=1&b=2

Table 1 Request path and parameters

Parameter

Description

queryStringParameters

Request parameter.

Parameters following the URL in a GET request. When a GET request is initiated, the parameters are transferred in the form of a URL string. That is, the character string after the question mark (?) are the request parameters and are separated by &.

path

Request path.

Access address of the API.