Skip to main content
Because Superserve attaches credentials to outbound requests, every use of a secret is recorded. You get a full trail of what was sent where, with what result — without any cooperation from the code, and without trusting the sandbox.

Requests made with a secret

getAudit() returns the requests authenticated with a secret, across every sandbox that used it, newest first:
Each event carries the sandbox that made it, the request line, and both the status returned to the sandbox and the upstreamStatus from the real service: Python uses the snake_case names (sandbox_id, upstream_status, and so on).

Filtering

Narrow to a status class, or page back with the before cursor:
"errors" matches every request with a status of 400 or higher. This includes 4xx and 5xx responses from the upstream service, for example a 401 from a provider that rejected the credential. To find the requests the proxy refused or failed itself, keep the events that have an errorCode. Those events have no upstreamStatus. The audit log keeps the last 7 days. Older rows are dropped on a rolling basis; page the API if you want to keep a longer trail elsewhere.

Sandboxes using a secret

To see where a secret is bound, getSandboxes() lists the live bindings:
The audit log records only requests that carried a secret. A request the proxy refused before it attached a secret, for example a request to a host your network rules don’t allow, is not in the audit log. Look for it in the sandbox’s network log.
For the full picture of a single sandbox’s traffic — not just secret-bearing requests, but every HTTP and HTTPS connection it made to a public address on ports 80 and 443 — use the network log.