gateway
List policies
Changed onRetrieve an environment's gateway policies in evaluation order: the gateway evaluates them top to bottom and the first rejection short-circuits the request.
The full policy list is returned in a single response.
Required Permissions
Your root key must have one of the following permissions:
- environment.*.read_policies (for any environment)
- environment.<environment_id>.read_policies (for a specific environment)
post/v2/gateway.listPolicies
Request
- Base URLhttps://api.unkey.com
- URLhttps://api.unkey.com/v2/gateway.listPolicies
- AuthHTTP bearer
Request body
Example request
{
"project": "proj_1234abcd",
"app": "proj_1234abcd",
"environment": "proj_1234abcd"
}Response
Policies retrieved successfully
Example response
{
"meta": {
"requestId": "req_123"
},
"data": [
{
"id": "pol_2gJbXhAr4",
"name": "Block internal paths",
"enabled": true,
"match": [
{
"path": {
"path": {
"prefix": "/internal/"
}
}
}
],
"firewall": {
"action": "ACTION_DENY"
}
}
]
}Changes
- info
removed the
trueenum value from the/////response property for the response status - info
removed the
trueenum value from the/////response property for the response status
- info
- info
added the optional property
////to the response with the status
- info