Set a secret
Sets a secret value for the specified variable.
|
URI
POST /secrets/{account}/{kind}/{identifier}
URI Parameters
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
account |
String |
Yes |
Organization account name. Example: |
kind |
String |
Yes |
Should be “variable” Example: |
identifier |
String |
Yes |
The ID of the variable
Any identifier included in the URL must be URL-encoded to be recognized by the Conjur API. |
Identifier examples
Identifier |
URL-Encoded |
---|---|
|
|
|
|
|
|
|
|
|
|
Example URI
|
Request Body
Description |
Required |
Type |
Example |
---|---|---|---|
Secret data |
Yes |
|
c3c60d3f266074 |
The maximum size for a secret value is 10MB. |
Example with curl
curl -H "$(conjur authn authenticate -H)" \
--data "c3c60d3f266074" \
https://eval.conjur.org/secrets/myorg/variable/prod/db/password
Response
Code |
Description |
---|---|
201 |
The secret value was set successfully |
401 |
The request lacks valid authentication credentials |
403 |
The authenticated user lacks the necessary privilege |
422 |
A request parameter was missing or invalid |
Response 201
|