Skip to content

PoliciesApi

Github Action edited this page Jun 13, 2021 · 7 revisions

PoliciesApi

All URIs are relative to http://localhost

Method HTTP request Description
loadPolicy POST /policies/{account}/policy/{identifier} Adds data to the existing Conjur policy.
replacePolicy PUT /policies/{account}/policy/{identifier} Loads or replaces a Conjur policy document.
updatePolicy PATCH /policies/{account}/policy/{identifier} Modifies an existing Conjur policy.

loadPolicy

LoadedPolicy loadPolicy(account, identifier, body, xRequestId)

Adds data to the existing Conjur policy.

Adds data to the existing Conjur policy. Deletions are not allowed. Any policy objects that exist on the server but are omitted from the policy file will not be deleted and any explicit deletions in the policy file will result in an error. ##### Permissions required create privilege on the policy."

Parameters

Name Type Description Notes
account String Organization account name [default to null]
identifier String ID of the policy to update [default to null]
body String Policy
xRequestId String Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. [optional] [default to null]

Return type

LoadedPolicy

Authorization

conjurAuth

HTTP request headers

  • Content-Type: application/x-yaml, text/plain, text/x-yaml, text/yaml
  • Accept: application/json

replacePolicy

LoadedPolicy replacePolicy(account, identifier, body, xRequestId)

Loads or replaces a Conjur policy document.

Loads or replaces a Conjur policy document. Any policy data which already exists on the server but is not explicitly specified in the new policy file will be deleted!.

Parameters

Name Type Description Notes
account String Organization account name [default to null]
identifier String ID of the policy to load (root if no root policy has been loaded yet) [default to null]
body String Policy
xRequestId String Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. [optional] [default to null]

Return type

LoadedPolicy

Authorization

conjurAuth

HTTP request headers

  • Content-Type: application/x-yaml, text/plain, text/x-yaml, text/yaml
  • Accept: application/json

updatePolicy

LoadedPolicy updatePolicy(account, identifier, body, xRequestId)

Modifies an existing Conjur policy.

Modifies an existing Conjur policy. Data may be explicitly deleted using the !delete, !revoke, and !deny statements. Unlike replace mode, no data is ever implicitly deleted. ##### Permissions required

Parameters

Name Type Description Notes
account String Organization account name [default to null]
identifier String ID of the policy to update [default to null]
body String Policy
xRequestId String Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. [optional] [default to null]

Return type

LoadedPolicy

Authorization

conjurAuth

HTTP request headers

  • Content-Type: application/x-yaml, text/plain, text/x-yaml, text/yaml
  • Accept: application/json