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
- application/octet-stream
A policy jar file.
Root Schema : schema
Type:
string(binary)
Response
Supported Media Types
- application/json
200 Response
Policy successfully replaced.
201 Response
Policy successfully created.
403 Response
Forbidden.
Root Schema : Error
Type:
Show Source
object
-
detail(optional):
string
Detailed error message
-
errorCode(optional):
string
Application specific error code
-
errorDetails(optional):
array errorDetails
additional errors
-
errorPath(optional):
string
-
instance(optional):
string
URI to the link that provides more detail about the error
-
status(optional):
string
HTTP status code
-
title:
string
Summary error message
-
type:
string
Error type
500 Response
Unexpected error.
Root Schema : Error
Type:
Show Source
object
-
detail(optional):
string
Detailed error message
-
errorCode(optional):
string
Application specific error code
-
errorDetails(optional):
array errorDetails
additional errors
-
errorPath(optional):
string
-
instance(optional):
string
URI to the link that provides more detail about the error
-
status(optional):
string
HTTP status code
-
title:
string
Summary error message
-
type:
string
Error type
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