Create a new custom policy

post

/apiplatform/administration/v1/policies

Uploads a new custom policy or a new version of an existing policy.

Users requesting this resource must be assigned the Administrator role.

Request

Supported Media Types
Body ()
A policy jar file.
Root Schema : schema
Type: string(binary)
Back to Top

Response

Supported Media Types

200 Response

Policy successfully replaced.

201 Response

Policy successfully created.

403 Response

Forbidden.
Body ()
Root Schema : Error
Type: object
Show Source
Nested Schema : errorDetails
Type: array
additional errors
Show Source

500 Response

Unexpected error.
Body ()
Root Schema : Error
Type: object
Show Source
Nested Schema : errorDetails
Type: array
additional errors
Show Source
Back to Top

Examples

The following example shows how to upload a new policy (or a new version of an existing policy) by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

curl -i -X POST 
-u apicsadmin:password
-H "Content-Type:application/octet-stream"
--data-binary @oracle.apiplatform.policies.apiratelimiting.jar
https://example.com/apiplatform/administration/v1/policies

Example of Response Headers

The following shows an example of the response headers.

HTTP/1.1 204 No Content
Server: Oracle-Traffic-Director/12.2.1.0.0
Date: Mon, 02 Jan 2017 14:08:24 GMT
Content-length: 386
Content-type: application/json
X-oracle-dms-ecid: eD_kd0OmR00000000
X-oracle-dms-rid: 0:1
Via: 1.1 otd_opc
Proxy-agent: Oracle-Traffic-Director/12.2.1.0.0
Back to Top