Okta Admin Management API
/Authorization Servers
//
Create a policy
OAuth 2.0 scope:
- okta.authorizationServers.manage
Creates a policy
Indicates that the Policy is an authorization server Policy
Value:"OAUTH_AUTHORIZATION_POLICY"
Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server
- https://subdomain.okta.comhttps://subdomain.okta.com/api/v1/authorizationServers/{authServerId}/policies
curl -i -X POST \
https://subdomain.okta.com/api/v1/authorizationServers/GeGRTEr7f3yu2n7grw22/policies \
-H 'Content-Type: application/json' \
-d '{
"type": "OAUTH_AUTHORIZATION_POLICY",
"status": "ACTIVE",
"name": "Default Policy",
"description": "Default policy description",
"priority": 1,
"system": false,
"conditions": {
"clients\"": {
"include\"": [
"ALL_CLIENTS"
]
}
}
}'Created
Indicates that the Policy is an authorization server Policy
Value:"OAUTH_AUTHORIZATION_POLICY"
Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server
Specifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.
Response
{ "type": "OAUTH_AUTHORIZATION_POLICY", "id": "00palyaappA22DPkj0h7", "status": "ACTIVE", "name": "Vendor2 Policy", "description": "Vendor2 policy description", "priority": 1, "system": false, "conditions": { "clients": { … } }, "created": "2017-05-26T19:43:53.000Z", "lastUpdated": "2017-06-07T15:28:17.000Z", "_links": { "self": { … }, "deactivate": { … }, "rules": { … } } }