Batch secret retrieval

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

 
  • Entity IDs must be URL-encoded

URI

GET /secrets{?variable_ids}}

Example URI

GET /secrets?variable_ids=myorg:variable:secret1,myorg:variable:secret2

URI Parameters

Parameter

Type

Mandatory

Description

variable_ids

array

Yes

Comma-delimited resource IDs of the variables.

Example: myorg:variable:secret1,myorg:variable:secret2

Any identifier included in the URL must be URL-encoded to be recognized by the Conjur API.

Examples

Identifier

URL-Encoded

myapp-01

myapp-01(no change)

alice@devops

alice%40devops

prod/aws/db-password

prod%2Faws%2Fdb-password

research+development

research%2Bdevelopment

sales&marketing

sales%26marketing

Response

Code

Description

200

All secret values were retrieved successfully

401

The request lacks valid authentication credentials

403

The authenticated user lacks the necessary privilege

404

At least one variable does not exist, or at least one variable does not have any secret values

422

A request parameter was missing or invalid

Response 200

Headers

 
Content-Type: application/json

Body

 
{
  "myorg:variable:secret1": "c3c60d3f266074",
  "myorg:variable:secret2": "d8dc3565123941"
}