R4

Get Vault Detail

Returns detailed information about a specific vault, including metadata and item count.

GET /api/v1/machine/vault/:vaultId

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour API key

Path Parameters

ParameterTypeRequiredDescription
vaultIdstringYesThe unique identifier of the vault

Response

Success (200 OK)

{
  "id": "507f1f77bcf86cd799439011",
  "name": "Production Secrets",
  "isEncrypted": true,
  "encryptionKeyId": "507f1f77bcf86cd799439015",
  "dataClassification": "CONFIDENTIAL",
  "createdAt": "2026-01-15T10:30:00.000Z",
  "createdBy": "507f1f77bcf86cd799439017",
  "itemCount": 12
}

Response Fields

FieldTypeDescription
idstringVault ID
namestringVault name
isEncryptedboolean | nullWhether the vault uses client-side encryption
encryptionKeyIdstring | nullEncryption key ID for decrypting secret values
dataClassificationstring | nullData classification: PUBLIC, INTERNAL, CONFIDENTIAL, or CUI
createdAtstringISO 8601 creation timestamp
createdBystringAccount ID of the vault creator
itemCountnumberNumber of non-archived items in the vault

Error Responses

404 Not Found - Vault not found or not accessible

{
  "error": {
    "code": "vault_not_found",
    "message": "The vault with ID \"507f1f77bcf86cd799439011\" was not found or you do not have access to it."
  }
}

Example Request

curl -X GET "https://r4.dev/api/v1/machine/vault/507f1f77bcf86cd799439011" \
  -H "X-API-Key: rk_abc123def456.ghijklmnopqrstuvwxyz"

Use Cases

  • Vault inspection: Check vault metadata before reading or modifying items
  • Encryption setup: Retrieve the encryptionKeyId needed for client-side decryption
  • Compliance: Verify data classification and encryption status