Skip to content

Retrieve a policy

Request

Retrieves details of a specific policy for an application by applicationId and policyId

Path
applicationIdstring, (uuid)required

Identifier of the application

policyIdstring, (uuid)required

Identifier of the policy

curl -i -X GET \
  'https://oag.domain.tld/api/v2/apps/{applicationId}/policies/{policyId}'

Responses

Success

Bodyapplication/json
activeboolean

Policy status

Default:true
caseSensitiveboolean

Indicates whether the policy resource is case sensitive

Default:true
customDirectivestring, (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.

descriptionstring

Policy description

idstring, (uuid)read-only

Unique identifier of the policy

namestring

Policy name

regexRulestring

Regular expression (regex) that can control authorization for the given resource

resourcePathstring

The path to the resource that the policy manages

rulestring

Policy type

Enum ValueDescription
NO_AUTH

The resource is not protected by any policy

PROTECTED

This policy requires a valid session (authenticated user) to access the associated resource

PROTECTED_REGEX

This policy requires a valid session and an expression that determines who can access the resource

ADAPTIVE

This policy extends the Not Protected policy, but passes header information to the underlying app

CUSTOM

This policy extends the Protected Rule policy, but supports entering a regular expression as the URI

Response
{ "id": "9ef3103a-50a7-4517-92d6-442612b6d5c1", "name": "root", "description": "Protect all application resources", "resourcePath": "/", "active": true, "rule": "PROTECTED", "regexRule": null, "caseSensitive": true, "customDirective": null }