The Policies API allows you to retrieve and manage the policies of your applications.
Lists all policies for a specific application in Access Gateway
Success
Bad Request
Unauthorized
Forbidden
Too Many Requests
{- "id": "9ef3103a-50a7-4517-92d6-442612b6d5c1",
- "name": "root",
- "description": "Protect all application resources",
- "resourcePath": "/",
- "active": true,
- "rule": "PROTECTED",
- "regexRule": null,
- "caseSensitive": true,
- "customDirective": null
}Creates a policy for an application in Access Gateway
Policies define access rules and conditions for the application. The application must have protected resources defined before you can create policies.
| name required | string Policy name | ||||||||||||
| resourcePath required | string The path to the resource that the policy manages | ||||||||||||
| rule required | string Policy type See Policy types
| ||||||||||||
| active | boolean Default: true Policy status | ||||||||||||
| caseSensitive | boolean Default: true Indicates whether the policy resource is case sensitive | ||||||||||||
| customDirective | string <multi-line string> Custom NGINX directives that handle special requirements not covered by the policy type. There is no limit to the number of directives you can add, but each directive must be on its own line. | ||||||||||||
| description | string Policy description | ||||||||||||
| regexRule | string Regular expression (regex) that can control authorization for the given resource |
Policy created successfully
Bad Request
Unauthorized
Forbidden
Too Many Requests
{- "name": "root",
- "description": "Protect all application resources",
- "resourcePath": "/",
- "rule": "PROTECTED"
}{- "id": "9ef3103a-50a7-4517-92d6-442612b6d5c1",
- "name": "root",
- "description": "Protect all application resources",
- "resourcePath": "/",
- "active": true,
- "rule": "PROTECTED",
- "regexRule": null,
- "caseSensitive": true,
- "customDirective": null
}Retrieves details of a specific policy for an application by applicationId and policyId
Success
Bad Request
Unauthorized
Forbidden
Not Found
Too Many Requests
{- "id": "9ef3103a-50a7-4517-92d6-442612b6d5c1",
- "name": "root",
- "description": "Protect all application resources",
- "resourcePath": "/",
- "active": true,
- "rule": "PROTECTED",
- "regexRule": null,
- "caseSensitive": true,
- "customDirective": null
}Replaces an existing policy configuration for an application
| active | boolean Default: true Policy status | ||||||||||||
| caseSensitive | boolean Default: true Indicates whether the policy resource is case sensitive | ||||||||||||
| customDirective | string <multi-line string> Custom NGINX directives that handle special requirements not covered by the policy type. There is no limit to the number of directives you can add, but each directive must be on its own line. | ||||||||||||
| description | string Policy description | ||||||||||||
| name | string Policy name | ||||||||||||
| regexRule | string Regular expression (regex) that can control authorization for the given resource | ||||||||||||
| resourcePath | string The path to the resource that the policy manages | ||||||||||||
| rule | string Policy type See Policy types
|
policy updated successfully
Bad Request
Unauthorized
Forbidden
Not Found
Too Many Requests
{- "name": "root",
- "description": "Protect all application resources",
- "resourcePath": "/",
- "rule": "PROTECTED"
}{- "id": "9ef3103a-50a7-4517-92d6-442612b6d5c1",
- "name": "root",
- "description": "Protect all application resources",
- "resourcePath": "/",
- "active": true,
- "rule": "PROTECTED",
- "regexRule": null,
- "caseSensitive": true,
- "customDirective": null
}Deletes a policy for an application by applicationId and policyId
Policy deleted successfully
Bad Request
Unauthorized
Forbidden
Not Found
Too Many Requests
{- "details": { },
- "errorCode": "BAD_REQUEST",
- "message": "Request validation failed"
}