Retrieve a Secret
Fetches the value of a secret from the specified Variable. 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.
|
URI
|
Any identifier included in the URL must be URL-encoded to be recognized by the Conjur API.
Examples
Identifier |
URL-Encoded |
---|---|
|
|
|
|
|
|
|
|
|
|
Example with curl
|
Response
Code |
Description |
---|---|
200 |
The secret values was retrieved successfully. |
401 |
The request lacks valid authentication credentials. |
403 |
The authenticated user lacks the necessary privilege. |
404 |
The variable does not exist, or it does not have any secret values. |
422 |
A request parameter was missing or invalid. |
Example URI
|
URI Parameters
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
account |
String |
Yes |
Organization account name.
|
kind |
String |
Yes |
should be “variable” Example: |
identifier |
String |
Yes |
id of the variable |
version |
integer |
No |
version you want to retrieve (Conjur keeps the last 20 versions of a secret) Example: |
Response 200
Headers
|
The default setting for Content-type
is application/octet-stream
. If needed, you can overwrite the Content-type
setting. See Variable for more information.
Body
|