Add Web Tier Policy to an Enterprise App
The following example shows how to update values for an application by submitting a PATCH request on the REST resource using cURL. For more information about cURL, see Use cURL.
cURL Command
Note:
The command in this example uses the URL structurehttps://tenant-base-url/resource-path,
where
tenant-base-url
represents the Identity Service URL, and the resource path represents the Identity Service API. See
Send Requests for the appropriate URL structure to use.
curl
-X PATCH
-H "Content-Type:application/scim+json"
-H "Authorization: Bearer <Access Token Value>"
https://tenant-base-url/admin/v1/Apps/<ID>?attributes=urn:ietf:params:scim:schemas:oracle:idcs:extension:webTierPolicy:App:webTierPolicyJson,urn:ietf:params:scim:schemas:oracle:idcs:extension:webTierPolicy:App:webTierPolicyAZControl,urn:ietf:params:scim:schemas:oracle:idcs:extension:webTierPolicy:App:resourceRef
Example of Request Body
The following shows an example of the request body in JSON format:
{
"schemas":[
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
],
"Operations":[
{
"op":"replace",
"path":"isWebTierPolicy",
"value":true
},
{
"op":"add",
"path":"urn:ietf:params:scim:schemas:oracle:idcs:extension:webTierPolicy:App:webTierPolicyAZControl",
"value":"server"
},
{
"op":"add",
"path":"urn:ietf:params:scim:schemas:oracle:idcs:extension:webTierPolicy:App:webTierPolicyJson",
"value":"{\"cloudgatePolicy\":{\"version\":\"2.6\",\"requireSecureCookies\":true,\"allowCors\":true,\"disableAuthorize\":true,\"webtierPolicy\":[{\"policyName\":\"WebtierTest policy\",\"comment\":\"Webtier policy\",\"resourceFilters\":[{\"filter\":\"<app resource id>\",\"comment\":\"\",\"type\":\"resource\",\"method\":\"http\"}]}]}}"
}
]
}
Example of Response Body
The following example shows the contents of the response body in JSON format:
{
"isAliasApp":false,
"displayName":"Enterprise App",
"id":"13f13b9893134eda987957a271eab748",
"urn:ietf:params:scim:schemas:oracle:idcs:extension:webTierPolicy:App":{
"webTierPolicyJson":"{\"cloudgatePolicy\":{\"allowCors\":true,\"requireSecureCookies\":true,\"webtierPolicy\":[{\"resourceFilters\":[{\"filter\":\"http://google.com\",\"method\":\"http\",\"resourceRefId\":\"83043a729d1040868aad6e0e93519cb4\",\"comment\":\"\",\"resourceRefName\":\"My Resource\",\"type\":\"text\"}],\"policyName\":\"WebtierTest policy\",\"comment\":\"Webtier policy\"}],\"version\":\"2.6\",\"disableAuthorize\":true}}",
"webTierPolicyAZControl":"server"
},
"basedOnTemplate":{
"value":"CustomEnterpriseAppTemplateId"
}
}