Skip to content
中文

Quickstart

Put your API Key in the PRAXIS_API_KEY environment variable and run the three requests below in order. Each run creates a new vault. Install jq to extract its ID; optionally set VAULT_NAME to choose its display name.

Store one in the Console

  1. Open Console → 保险库 (Vaults) (/vault) and click “新建保险库” (New vault).
  2. Open the vault, click “添加 Secret” (Add secret), and enter a name and a value. Agents refer to the secret by name and never need to see the value.

1. Create a vault

终端窗口
VAULT_JSON=$(curl --fail-with-body -sS -X POST "https://api.deepraxis.com/vault/v1/vaults" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg name "${VAULT_NAME:-Agent credentials}" '{display_name: $name}')")
export VAULT_ID=$(printf '%s' "$VAULT_JSON" | jq -er '.id')
printf '%s\n' "$VAULT_JSON"

Expect HTTP 200 with an object whose type is vault, status is active and secret_count is 0. The command saves its vlt_ ID in VAULT_ID.

2. Add a secret

终端窗口
curl -X POST "https://api.deepraxis.com/vault/v1/vaults/$VAULT_ID/secrets" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "GITHUB_TOKEN", "value": "ghp_example", "allowed_hosts": ["api.github.com"]}'

Expect HTTP 200 with an object whose type is vault_secret, kind is static and version is 1. The response has no value: once written, a value is never returned. The platform releases its value only for a destination of api.github.com; reading plaintext by name does not check a host.

3. List secrets

终端窗口
curl "https://api.deepraxis.com/vault/v1/vaults/$VAULT_ID/secrets" \
-H "Authorization: Bearer $PRAXIS_API_KEY"

Expect HTTP 200 with one item in data named GITHUB_TOKEN, and next_cursor set to null.

Clean up

终端窗口
curl -X POST "https://api.deepraxis.com/vault/v1/vaults/$VAULT_ID/archive" \
-H "Authorization: Bearer $PRAXIS_API_KEY"
curl -X DELETE "https://api.deepraxis.com/vault/v1/vaults/$VAULT_ID" \
-H "Authorization: Bearer $PRAXIS_API_KEY"

Expect HTTP 200 with status: "archived" from archive, then HTTP 200 with {"id": "<VAULT_ID>", "type": "vault_deleted"}. Deleting a vault also deletes every secret in it and cannot be undone.

Templates, .env import and one-click authorization → · All requests and objects →