REST

The platform over plain HTTP

इसे किसी भी HTTP API की तरह कॉल करें। पहले दिन से curl — कोई SDK नहीं।

A one-line curl command card with an OAuth key on the request line; its 200 response flows down through a row-level-security shield check and fans out into three JSON row cards labeled entries, devices and audit_log. $ curl api.busymate.net/rest/v1/entries 200 rls entries devices audit_log { } { } { }
अपनी नवीनतम एंट्रीज़ क्वेरी करें — curl
bash
curl 'https://api.busymate.net/rest/v1/entries?select=id,ts,host,path&order=id.desc&limit=20' \
  -H 'Authorization: Bearer <OAUTH_ACCESS_TOKEN>' \
  -H 'apikey: <OAUTH_ACCESS_TOKEN>'

REST क्यों

No SDK, no surprises

Bearer टोकन पर PostgREST — वही पहचान जो डैशबोर्ड, MCP और Realtime की है।

SDK कभी नहीं

नीचे PostgREST है: प्रेडिक्टेबल URL, स्टैंडर्ड फ़िल्टर, JSON अंदर-बाहर। अगर आपकी लैंग्वेज HTTP रिक्वेस्ट कर सकती है, तो इंटीग्रेशन पहले से हो चुका है।

जितना सोचते हैं उससे ज़्यादा व्यापक

सिर्फ़ कैप्चर किया ट्रैफ़िक नहीं। TestFlight एडमिन, बिलिंग, ऑडिट लेजर, यहाँ तक कि BusyBro के सेशन और मेमोरीज़ भी उसी REST सतह से उपलब्ध हैं।

एक टोकन, डेटाबेस द्वारा लागू

MCP और WebSockets वाला वही OAuth टोकन यहाँ भी चलता है, और Postgres रो-लेवल सिक्योरिटी हर रिस्पॉन्स को आपकी रोल तक सीमित रखती है। “API चेक करना भूल गया” जैसा कुछ नहीं — डेटाबेस खुद चेक है।

डॉक्स में आज़माइए

डैशबोर्ड के अंदर का REST एक्सप्लोरर आपकी अपनी अनुमतियों से असली रिक्वेस्ट बनाकर चलाता है और लाइव रिस्पॉन्स वहीं दिखाता है। जो आप देखते हैं, वही आपके कोड को मिलेगा।

How it works

One host, the whole platform

The API host is a custom domain onto the data plane itself — the dashboard has no private backend you're locked out of.

  1. 01

    One host, five services

    api.busymate.net fronts the whole platform: /rest/v1 (PostgREST over every table and RPC), /auth/v1, /realtime/v1, /functions/v1 and /storage/v1 — a custom domain straight onto the data plane.

  2. 02

    Authenticate with the same token

    The OAuth token from the MCP flow (or your dashboard session) goes in the Authorization header. One identity across every surface — there is no separate REST key.

  3. 03

    Query with URL operators

    PostgREST turns tables into endpoints: pick columns with select=, filter with eq/gte/like/in, then order, limit and offset — all in the query string.

  4. 04

    The database authorizes

    Row-level security scopes every response to your role and ownership. You can't forget a permission check in a client — the check lives in Postgres itself.

The surface

Tables, RPCs and Edge Functions

A sample of what's addressable — the in-dashboard REST explorer documents every endpoint with a runnable request.

/rest/v1/devicesGET

Your paired devices — identity, platform, last-seen, and the computed live online state (effective_online).

/rest/v1/entriesGET

Captured request/response rows — the same feed the dashboard renders, filterable by host, path, method and status class.

/rest/v1/breakpoint_eventsGET

Requests the proxy is holding at a breakpoint right now, with kind, timing and outcome.

/rest/v1/todosCRUD

The shared to-do board — full create/read/update/delete, the same rows every other surface shows.

/rest/v1/settings_global · settings_device · settings_userCRUD

The layered settings tiers the capture stack folds together — write any tier, devices pick it up live.

/rest/v1/rpc/effective_settings_for_deviceRPC

Postgres functions as POST endpoints: the server-folded settings union, filtered entry counts, device-control locks, egress-IP control and more.

/functions/v1/*Edge

Edge Functions — device pairing, capture ingest, the MCP server itself, and BusyBro's ask endpoint.

/auth/v1 · /realtime/v1 · /storage/v1platform

Sessions and refresh, the WebSocket upgrade for live channels, and file storage — the same host serves all of it.

Worked examples

Copy, paste, query

Real endpoints, real filters — a table query with PostgREST operators and an RPC call.

Filter captures — status class + host
bash
# Server errors on one host in your captures, newest first
curl 'https://api.busymate.net/rest/v1/entries?select=id,ts,host,path&host=eq.api.example.com&payload->>statusCode=like.5__&order=id.desc&limit=50' \
  -H 'Authorization: Bearer <OAUTH_ACCESS_TOKEN>' \
  -H 'apikey: <OAUTH_ACCESS_TOKEN>'
Call an RPC — effective device settings
bash
# The settings a device actually runs — the server-folded union of every tier
curl -X POST 'https://api.busymate.net/rest/v1/rpc/effective_settings_for_device' \
  -H 'Authorization: Bearer <OAUTH_ACCESS_TOKEN>' \
  -H 'apikey: <OAUTH_ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"target_uuid":"<device-uuid>"}'

What teams build

From capture to pipeline

Assert traffic in CI

Fail a pipeline when a test run's captured traffic contains server errors, an unexpected host, or a call that should have been cached.

Pull captures into your tools

It's JSON over HTTP — notebooks, BI dashboards and log pipelines ingest it directly, or export standard HAR for HAR-speaking tooling.

Automate the back office

Create to-dos, flip settings tiers, manage devices from scripts and cron jobs — the same writes the dashboard makes, callable from anywhere.

One platform, five surfaces

The same rows, every surface

Every capability aligns across the dashboard, MCP, REST, WebSockets and BusyBro — a standing rule, checked on every ship. Pick the surface that fits the job; the data and permissions are identical.

FAQ

Before you curl

Is there an SDK?

You don't need one — it's PostgREST, so any HTTP client works on day one. If you want a client library, supabase-js speaks the whole surface (REST, auth and realtime) out of the box.

How do I authenticate?

With the same OAuth 2.1 token the MCP flow issues: send it as Authorization: Bearer. One token authenticates MCP, REST, WebSockets and Edge Functions.

How do filtering and pagination work?

Standard PostgREST grammar: shape columns with select=, filter with operators like eq, neq, gte, like and in, then order=, limit= and offset= (or Range headers) for paging.

Can I export captured traffic?

Filter the entries table down to exactly the rows you want as JSON, or export a standard HAR file — from the dashboard or the export_har MCP tool — for Charles- and Proxyman-compatible tooling.

What stops me reading someone else's data?

Row-level security. Every table carries policies that scope rows to your ownership and role — the same rules the dashboard runs under, enforced by Postgres on every query.

Is api.busymate.net really the database?

It's a custom domain onto the platform's Supabase project — and that's the point: the dashboard is built on the same public primitives you can call directly. No private API you're locked out of.

Build on the API

ऑथ, टेबल और Edge Functions डॉक्स में — या डैशबोर्ड एक्सप्लोरर से रिक्वेस्ट भेजें।

Ask your mate