Use the application. Sonda writes the API behind it.
Every API client can import a HAR file: three hundred requests, dumped into a folder, exactly as the browser made them — the ids baked into the paths, the token pasted in every header, the analytics calls mixed in with the real ones. That is a recording, not an API. Discover reads the traffic the way an engineer would: it separates the calls from the noise, works out the shape of each endpoint, finds where the credential came from, follows the values from one answer into the next request, and writes a project you would have written by hand — with a flow that replays the session and a mock that answers like the real thing.
Three ways in, one engine
The traffic comes in three ways. The API comes out one way.
A browser Sonda opens and reads over DevTools, a phone or an app pointed at Sonda's proxy, a HAR somebody sent you — whichever it is, the entries land in the same capture, go through the same engine and get the same review. The engine is conservative on purpose: it templates a path only when the evidence is plain, it folds what repeats, it traces the token to the answer that issued it, and it flags what it is not sure of rather than guessing.
What you end up with is a project with a folder per resource and its credentials in variables, a flow that replays the session with every value wired, an Echo that answers like the API did, and the session's cookies in Sonda's jar. Nothing of the capture touches your disk.
The Echo it buildsA recording is not an API.
Sonda has a plain HAR import too — one folder per host, under Import, like everyone else's. Discover is the other thing: what a HAR import leaves as it was captured, Discover works out.
One operation per endpoint, not one request per entry.
In a HAR import, /customers/621 and /customers/817 are two requests. In Discover they are /customers/{customerId} — templated only where a segment is plainly an id or sibling paths prove it. A lone /users/me stays as it is.
GraphQL and RPC split into what they are.
A hundred calls to /graphql are not one request a hundred times: they are split by operation — batches, GET queries and persisted queries included — and JSON-RPC by method. Preflights are folded into the call they precede; repeats into one, the richest sample kept.
The noise set apart.
Analytics, session replay, error reporting, fonts, images, scripts — a HAR import puts them all in the folder. Discover keeps the pages, the static files and the preflights apart, and leaves out thirty-four tracker patterns by default. The list is yours to edit.
The credential traced to where it came from.
Not a bearer token pasted into every header, expiring tomorrow: the token followed back to the answer that handed it out. That request gets the script that keeps it as {{accessToken}}, and every other request reads the variable. Basic, API keys in a header or the address, cookie sessions, a CSRF token copied from a cookie and an OAuth 2.0 sign-in through an identity provider are recognised — with the option to sign in from Sonda instead of reusing the captured token.
The journey, not just the stops.
A value one answer gave and a later request sent back — an id, a cursor, a tenant — is a wire by name. In a list of requests that is yours to notice; in the project Discover writes, it is already wired.
A project, a flow and an Echo. Nothing on your disk.
A folder per resource, the address and the credentials as variables, the answers kept as examples with credentials hidden; a flow that replays the session; an Echo that answers like the API did; the session's cookies in Sonda's jar. And where a HAR import leaves the file, Discover leaves nothing: a capture lives in memory until the next capture, Discard, an account switch or the app closing, and the browser's throwaway profile is shredded when the capture ends.
How the traffic gets in, and what comes out of it.
One capture at a time. Every request becomes an entry — what was asked and what came back, the bodies of the API calls kept, none for the pictures, styles and scripts. The window follows the rows live, three times a second: search, API calls, pages or everything, by status, the headers and bodies of any call on click, hosts outside the site flagged and left unticked. Then you pick the hosts and the operations, and build.
Beside it, what a few minutes in a shop's checkout became: three hundred entries, nine operations, one token kept as a variable, one wire from the cart to the order.
http://sonda.cert. A device that kept trusting it trusts nothing anyone can sign again. Keep it for the next capture only if you ask, sealed under the account's password, and Forget removes it.From traffic to a project, in five passes.
The engine is conservative on purpose: it templates a path only when the evidence is plain, and it flags what it is not sure of rather than guessing.
Separate the calls from the pages
The API calls are kept apart from the documents, the static files, the preflights and the trackers — analytics, session replay, error reporting, tag managers: thirty-four host patterns you can edit. Preflights are folded into the call they precede.
Template the paths, split the operations
A segment becomes a variable only where a value is plainly an id — digits, a UUID, an ObjectId, a long token, an email, a date — or where sibling paths prove it, named from the resource: /orders/{orderId}/lines/{lineId}. GraphQL by operation name, JSON-RPC by method; repeats folded into one, the other answers kept as examples.
Find the credentials, and where they came from
A Bearer token is followed back to the answer that issued it; that request gets a post-response script that keeps it as a variable, and every later request reads it. Basic, an API key in a header or the address, a cookie session, a CSRF token copied from a cookie, a sign-in through an identity provider — each kept as variables and auth, never as pasted values.
Wire the journey
A value one answer gave and a later request sent back — an id, a cursor, a page token, a tenant — is a wire by name. That is what makes the replay flow a replay and not a list.
Build
A project with a folder per resource and the address and credentials in its variables; up to four examples per operation, one per status, credentials hidden. A "Replay the session" flow, call by call, every wired value passed on by name. An Echo on a port that answers like the API did — point {{baseUrl}} at it and work without the real thing. The session's cookies in Sonda's jar.
Three boxes before every capture.
Reverse engineering is a thing you must be allowed to do. Sonda asks every time, and in an organization the owner decides who may ask at all.