Skip to content

SecretsApi

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

SecretsApi

All URIs are relative to http://localhost

Method HTTP request Description
createSecret POST /secrets/{account}/{kind}/{identifier} Creates a secret value within the specified variable.
getSecret GET /secrets/{account}/{kind}/{identifier} Fetches the value of a secret from the specified Secret.
getSecrets GET /secrets Fetch multiple secrets

createSecret

createSecret(account, kind, identifier, expirations, xRequestId, body)

Creates a secret value within the specified variable.

Creates a secret value within the specified Secret. Note: Conjur will allow you to add a secret to any resource, but the best practice is to store and retrieve secret data only using Secret resources.

Parameters

Name Type Description Notes
account String Organization account name [default to null]
kind String Type of resource - in almost all cases this should be variable [default to null]
identifier String URL-encoded variable ID [default to null]
expirations String Tells the server to reset the variables expiration date [optional] [default to null]
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]
body String Secret data [optional]

Return type

null (empty response body)

Authorization

conjurAuth

HTTP request headers

  • Content-Type: application/octet-stream
  • Accept: Not defined

getSecret

String getSecret(account, kind, identifier, version, xRequestId)

Fetches the value of a secret from the specified Secret.

Fetches the value of a secret from the specified Secret. The latest version will be retrieved unless the version parameter is specified. The twenty most recent secret versions are retained. The secret data is returned in the response body. Note: Conjur will allow you to add a secret to any resource, but the best practice is to store and retrieve secret data only using Secret resources.

Parameters

Name Type Description Notes
account String Organization account name [default to null]
kind String Type of resource - in almost all cases this should be variable [default to null]
identifier String URL-encoded variable ID [default to null]
version Integer (Optional) Version you want to retrieve (Conjur keeps the last 20 versions of a secret) [optional] [default to null]
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

String

Authorization

conjurAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

getSecrets

Object getSecrets(variableIds, acceptEncoding, xRequestId)

Fetch multiple secrets

Fetches multiple secret values in one invocation. It’s faster to fetch secrets in batches than to fetch them one at a time.

Parameters

Name Type Description Notes
variableIds String Comma-delimited, URL-encoded resource IDs of the variables. [default to null]
acceptEncoding String Set the encoding of the response object [optional] [default to null] [enum: base64]
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

Object

Authorization

conjurAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json