GET
/
api
/
v3
/
secrets
/
raw
curl --request GET \
  --url https://app.infisical.com/api/v3/secrets/raw \
  --header 'Authorization: Bearer <token>'
{
  "secrets": [
    {
      "id": "<string>",
      "_id": "<string>",
      "workspace": "<string>",
      "environment": "<string>",
      "version": 123,
      "type": "<string>",
      "secretKey": "<string>",
      "secretValue": "<string>",
      "secretComment": "<string>",
      "secretPath": "<string>"
    }
  ],
  "imports": [
    {
      "secretPath": "<string>",
      "environment": "<string>",
      "folderId": "<string>",
      "secrets": [
        {
          "id": "<string>",
          "_id": "<string>",
          "workspace": "<string>",
          "environment": "<string>",
          "version": 123,
          "type": "<string>",
          "secretKey": "<string>",
          "secretValue": "<string>",
          "secretComment": "<string>"
        }
      ]
    }
  ]
}

This endpoint requires you to disable end-to-end encryption. For more information, you should consult this note.

Authorizations

Authorization
string
headerrequired

An access token in Infisical

Query Parameters

workspaceId
string

The ID of the project to list secrets from.

workspaceSlug
string

The slug of the project to list secrets from. This parameter is only usable by machine identities.

environment
string

The slug of the environment to list secrets from.

secretPath
string
default: /

The secret path to list secrets from.

recursive
enum<string>
default: false

Whether or not to fetch all secrets from the specified base path, and all of its subdirectories. Note, the max depth is 20 deep.

Available options:
true,
false
include_imports
enum<string>
default: false

Weather to include imported secrets or not.

Available options:
true,
false

Response

200 - application/json
secrets
object[]
required
imports
object[]

Was this page helpful?