Help Center/ FunctionGraph/ FAQs/ Configuring Triggers/ How Do I Obtain the Request Path or Request Parameters in an APIG Trigger?
Updated on 2026-08-24 GMT+08:00

How Do I Obtain the Request Path or Request Parameters in 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 APIG Event Source.

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.huaweicloudapis.com/apig-demo/subpath

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

Table 1 Request path and parameters

Parameter

Description

queryStringParameters

Request parameters.

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.