Prepare a safe shell
Load values through your runtime or secret storage. Do not paste a real token into a shared terminal log.Discover account and project context
List accounts before accepting an account ID from a user or configuration file:x-account-id.
Create a project without duplicate writes
Generate one UUID for the intended create operation and keep it for retries of that same operation.data.project_id. Retrying the same request with the same key returns the
same result. Reusing the key with a different name or description returns
idempotency_key_reused_with_different_params.
Project updates replace the editable values. Send every value you want to preserve:
Read record metadata before plaintext
Start with metadata. This request does not decrypt record fields:Change metadata without changing the value
Only supplied metadata fields change:Review record history and audit
Read value-version metadata:/v1/audit/record-anomalies, /record-activity, /record-alerts and
/record-access with scopeType=project, scopeId=$PROJECT_ID and the account header. Audit responses
describe events and actors; they do not contain plaintext records.
Create a Gateway control plane
List providers first, then create or select a provider credential. Provider secret values are write-only. For safer shell handling, use the SDK, CLI--api-key-env, or MCP apiKeyEnv instead of placing a key in
raw cURL JSON.
Create a gateway after you have the provider and credential IDs:
Create and replace a gateway token safely
Create a short-lived token with only the scopes and models the workload needs:data.plaintext. Store and deploy it before revoking the old token.
Then revoke the old token:
Diagnose a Gateway without reading bodies
Start with project metrics and gateway log metadata:usage:read-bodies. Never copy sensitive
bodies into general logs or support tickets.
Configure OpenTelemetry without reading secrets
Read the safe export state, then update only the intended fields:Work with Service Accounts without exposing lifecycle
The public API can list safe Service Account metadata and let an authorized human grant an encrypted record key. It cannot create, pause, provision, rotate, revoke or delete a Service Account credential.wrappedDek for /service-accounts/{id}/grants. Use
shareRecordWithServiceAccount(), airctrl record share-sa, or share_record_service_account; each uses
the shared crypto implementation to prepare the correct wrapper locally.
Handle failures without broadening access
Use--fail-with-body so cURL returns a non-zero status while preserving the error envelope.
- Keep
requestId. - Read
error.codeanderror.message. - Fix
400input errors locally. - Do not retry
403with other IDs or wider scopes. - Refresh resource state after
409. - Retry only
429,500and503, with a short bounded backoff.