Sandbox / API examples

Reference API examples

Every endpoint below is callable directly against this deployment and returns the same envelope shape a real PDPP reference server would. Route handlers use deterministic mock adapters and preserve live payload shapes. All responses are JSON; the sandbox marker is the x-pdpp-demo response header so an agent can swap origins without touching parsing code.

The full surface map lives at /reference.

Public-shaped APIs (/sandbox/v1)

Schema

GET /sandbox/v1/schema

Discover connectors, streams, and field schemas. Same shape as /v1/schema on a real reference server.

curl -s /sandbox/v1/schema

Live `schema` envelope: object='schema', bearer, connectors[].streams[] with stream_metadata.

List streams

GET /sandbox/v1/streams

Supports cursor pagination via `limit` and `cursor`. Optional `connector_id` filter.

curl -s '/sandbox/v1/streams?limit=10'

Live `list` envelope of `stream` rows: { name, record_count, last_updated, freshness }.

Stream metadata

GET /sandbox/v1/streams/pay_statements

Replace the path segment with any stream name from /sandbox/v1/schema.

curl -s /sandbox/v1/streams/pay_statements

Live `stream_metadata` envelope with schema, primary_key, cursor_field, freshness.

List records

GET /sandbox/v1/streams/pay_statements/records

Supports cursor pagination via `limit` and `cursor`.

curl -s '/sandbox/v1/streams/pay_statements/records?limit=2'

Live `list` envelope of `record` rows: { object:'record', id, stream, data, emitted_at }.

Record detail

GET /sandbox/v1/streams/pay_statements/records/rec_sb_paystmt_2026_03

Use the `id` returned in list responses (record_key in the underlying RS).

curl -s /sandbox/v1/streams/pay_statements/records/rec_sb_paystmt_2026_03

Single live `record` envelope: { id, stream, data, emitted_at }.

Lexical search

GET /sandbox/v1/search

Same shape as the public lexical retrieval extension. Try `payroll`, `Northwind`, `follow-up`.

curl -s '/sandbox/v1/search?q=payroll'

Live `list` of `search_result` rows: { stream, record_key, connector_id, record_url, emitted_at, matched_fields, snippet?, score? } with score.kind='bm25'.

Reference-only inspection APIs (/sandbox/_ref)

List grants

GET /sandbox/_ref/grants

Filter by `status` (issued, revoked, denied) or `client_id`.

curl -s '/sandbox/_ref/grants?status=revoked'

Live `list` of `grant_summary` rows with kinds[], failure?: { event_type, reason }.

Grant timeline

GET /sandbox/_ref/grants/grant_sb_quill_paystmt/timeline

See request → consent → grant → resource read events end-to-end.

curl -s /sandbox/_ref/grants/grant_sb_quill_paystmt/timeline

Live `grant_timeline` envelope: { object, grant_id, trace_id, event_count, data: events[] }.

Run timeline

GET /sandbox/_ref/runs/run_sb_acme_2026_04_22/timeline

Includes `started`, `records.synced`, and `succeeded`/`failed` events.

curl -s /sandbox/_ref/runs/run_sb_acme_2026_04_22/timeline

Live `run_timeline` envelope: { object, run_id, trace_id, event_count, data: events[] }.

Trace timeline

GET /sandbox/_ref/traces/trace_sb_quill_paystmt

Shows the full PDPP interaction across grant + resource read.

curl -s /sandbox/_ref/traces/trace_sb_quill_paystmt

Live `trace` envelope: { object, trace_id, event_count, data: events[] sorted by occurred_at }.

Dataset summary

GET /sandbox/_ref/dataset/summary

Same fields as the live reference deployment summary.

curl -s /sandbox/_ref/dataset/summary

Live `dataset_summary` envelope with retained-bytes, record-time bounds, top_connectors[].

OAuth-shaped metadata (/sandbox/.well-known)

Authorization server metadata

GET /sandbox/.well-known/oauth-authorization-server

Inspect the issuer, token/PAR/device endpoints, and provider-connect capabilities.

curl -s /sandbox/.well-known/oauth-authorization-server

RFC 8414 + PDPP `pdpp_provider_connect_capabilities`. Same shape as a real AS.

Protected resource metadata

GET /sandbox/.well-known/oauth-protected-resource

Drives discovery: schema_endpoint, query_base, search endpoint, blob indirection.

curl -s /sandbox/.well-known/oauth-protected-resource

Live RS metadata: resource, authorization_servers, pdpp_discovery_hints, capabilities.lexical_retrieval.