This site counts visits with analytics cookies only if you accept. Read the consent

Skip to content

StudioWhat Studio Keeps

What Studio Keeps

Where Studio keeps what it shows — the requests, the mocks' logs, the Playground's history, the saved sessions — how much room each part takes and how to clear it, which values it never writes down, and what happens to large bodies.

7 min readUpdated both modes

What Studio shows is kept in .courier/studio.db, a SQLite database built into Node, with nothing to install or set up, readable by your account alone, in a folder that keeps itself out of Git. The requests it captured are there, the latest 2000 of them, so a page that reloads, or a Studio that restarts, shows them again. A request still open when Studio stopped is shown as ended, since no runtime can say any more how it ended. The saved sessions are there too, and which one a page loaded: a page that reloads shows that session again, recording paused, until you go back to the live requests with the play button or Back to live requests in the command palette. A session shared as a session file opens in a colleague's Studio the same way. So are the requests each mock answered, the latest 500, which the Mocks view's log shows again, and the Playground's history of calls. So is what you set, and what you leave unfinished: the settings; the requests you pin, which the log keeps as it lets its oldest go; the Playground's drafts; Get started's progress; a mock wizard or an API import left midway, which opens again where it was; and the network conditions and the scenario set on each mock, which it has again when it starts again — unless the mocks file now declares other network conditions, the newer word. All of it is kept for the project, so another browser shows it too; a page opened without the token sees it but keeps its own changes to itself — and sees no API import left midway, which may hold an address as it was being typed. The browser keeps only the page's token, and a copy of the settings so the page opens in its theme before Studio answers. Studio creates the file readable and writable by its owner only.

The room it takes

Settings → Storage shows the room each part of .courier/ takes — the database on disk and the data in it, the captured requests, the mocks' logs, the Playground's history, the saved sessions, the mocks' stores, and the backups of the files imports replaced — and clears any of them, or all at once, after asking. A mock that runs resets its store to its seeds; the backups an undo still needs stay. The database gives the room its deleted rows took back to the disk as it goes, and is compacted after each clear, so it does not keep growing as the logs let their oldest requests go. Once it grows past the size set there, 500 MB to start with, a line under the header says so. To start empty, clear everything there — or delete the file with Studio stopped.

No credential is kept

No credential is written there. The value of Authorization, Proxy-Authorization, Cookie, Set-Cookie, and of any header whose name has a word such as auth, token, secret, password, session, csrf, xsrf, api-key or signature in it — a webhook's signature among them, which with its body would let anyone deliver it again — is kept as [redacted] in the request log, the mocks' logs, saved sessions and the Playground's history and drafts, and so is a header named as a field redact() hides, sid or x-otp. Studio holds the drafts as they were typed while it runs, so a page that reloads, or another browser, has the credential; a Studio that restarts has [redacted] in its place, to be typed again. A session exported as HAR, for Postman or as JSON carries them so, and replaces as well every value of the variables, the answers and the query strings that a session file replaces; the request log keeps those values, so a request can be sent again. The live view, which nothing writes down, shows the values whole to a page opened from Studio's link, and to any other with those values redacted, a stream message's preview too — and so is everything else Studio sends a page without the token: the requests it replays as the page loads, a saved session the pages show, a request's whole body or a mock's records the page asks for, the Playground's drafts and history; a request replayed after a reload carries [redacted] instead. The inspector hides those values until asked, and a request copied as cURL or fetch leaves them out.

The texts that could hold one are kept the same way. The page opened from Studio's link — the one that holds its token — shows each as your app was told it: an error's text and its cause, a stream's and a middleware's, what the Playground was answered, a request's address. What leaves that page has the credentials in them cut: what Studio writes in .courier/studio.db, a saved session and what it exports — a HAR, a Postman collection, a session file — what an agent is told, and what a page opened without the token is shown. Cut are an address's user and password, its secret parameters and a path segment that reads as a token; a user:password@ before a host; a header value the platform quoted; a JWT or a provider's key, such as ghp_…, sk_live_…, AKIA…, xox…, npm_… or SG.…; a credential after Bearer or Basic; and the value of a pair named as a token, a key, a secret or a password. A word is cut only when it reads as a credential, so Token expired and tokens: 3 of 5 used stay as they are; a user:password with no host after it and no word of signing in around it is not recognized. Only the start of a long text is read, so a text of any size costs the same. Your app cuts nothing and carries no code for it: it tells Studio what it was told, and Studio cuts what leaves.

Large bodies

A body larger than 16 KB, sent or answered, is kept and shown as a part of it: the first items of a list, the small fields of an object and a part of each large one, the start of a text, each part left out named where it was, as "… 45,800 more items", beside the size of the whole. Download whole in the request's Response or Request tab saves the whole body as a file, from the app or the mock that holds it: each keeps the whole bodies of its latest requests, up to 64 MB, a page in the browser up to 16 MB. A replay sends the whole variables, never the part, and is refused once they are gone; a snippet of a request whose body is too large to write out sends it from the file Download whole saves. A saved session keeps the parts, and its HAR and Postman exports say how large each whole was. A page that connects is sent each log's newest requests, each whole, as many as fit 16 MB. A page without the token is sent the same requests as each log cut them, each event once, the first time such a page was sent it: beside an event that held a value to cut, the log keeps the cut one, under the same limits, and lets it go with the event. Keeping an event cuts nothing, so a Studio no such page connects to keeps no cut copy and spends nothing on one. The cut one is about as large, and longer where a short value gives way to the longer [redacted]; the 16 MB is counted by the events themselves, so what such a page is sent can pass it by as much. It costs Studio about what a page with the token costs to connect, and the cutting of the events of its replay kept since such a page was last sent the log, which Studio cuts a part at a time, answering everything else meanwhile, and sends the replay once they are cut. What Studio sends such a page meanwhile, the requests that go on among it, waits and follows the replay, in the order it came, as for a page sent its replay at once.

When the database cannot be kept

When the database cannot be kept there — .courier is a link, the disk is read-only, a newer Studio made it — Studio keeps its data in memory for that run, and says so. A file there that is not a database is moved aside to studio.db.broken-<time>, and a new one is started.