API gateway path parameters
The inbound-base-path
property value can include parameters. If parameters are found and matched, they are included in policy requests as fields of the Gateway
policy request attribute.
Gateway API Endpoint configuration properties that affect policy requests identifies additional configuration properties that can use these parameters.
You must introduce parameters by the inbound-base-path
property. Other configuration properties cannot introduce new parameters.
Basic example
The following example configuration demonstrates how request URIs are mapped to the outbound path to alter policy requests.
Gateway API Endpoint property | Example value |
---|---|
|
|
|
|
|
|
A request URI with the path /accounts/XYZ/transactions/1234
matches the inbound base path and is mapped to the outbound path /api/v1/accounts/XYZ/transactions/1234
.
The following properties are added to the policy request:
-
HttpRequest.ResourcePath : 1234
-
Gateway.accountId : XYZ
-
Gateway.foo : bar
Advanced example
Request URIs are mapped to the outbound path to alter policy requests.
Consider the following example configuration.
Gateway API Endpoint property | Example value |
---|---|
|
|
|
|
|
|
|
|
A request URI with the path /health/OmniCorp/patients/1234
matches the inbound base path and is mapped to the outbound path /api/v1/health/OmniCorp/patients/1234
.
The following properties are added to the policy request:
-
service : HealthAPI.patients
-
HttpRequest.ResourcePath : patients/1234
-
Gateway.tenant : OmniCorp
-
Gateway.resourceType : patients