Collections
A collection groups requests. It can hold folders, and folders can hold more folders. Each level can have its own variables, authorization and scripts. These settings apply to every request below that level.
Each collection is one JSON file in the workspace.
Request types
A request is HTTP, gRPC or WebSocket. You choose the type when you create the request. You cannot change it later.
In the tree:
- An HTTP request shows its method:
GET,POST,PUT,PATCH,DEL,HEADorOPT. - The other types show
gRPCorWS.
Guides for each type:
- HTTP: HTTP requests
- gRPC: gRPC
- WebSocket: WebSocket
Create
| What | How |
|---|---|
| Collection | Sidebar + › New collection, or File › New › New collection. New collections are called New Collection. |
| Folder | Right-click a collection or folder › Add folder. Or use New folder in the ... menu of a collection's detail tab. |
| Request | Right-click a collection or folder › Add request (HTTP). Or select a collection or folder, then use sidebar + › New HTTP request, New gRPC request or New WebSocket request. |
| Quick request | Press Cmd/Ctrl+N. It creates New Request (HTTP) at the root of the first collection. If the workspace has no collection, it creates New Collection first. |
Organise
- Rename: press
F2on a row, or use the context menuRename. You can also use the name field at the top of a collection or folder tab. Rename a request from its builder tab. - Duplicate: context menu
Duplicatemakes a deep copy with fresh ids. The copy is named<name> Copy. Duplicating a collection also copies its assets. - Copy, cut, paste: use
Cmd/Ctrl+C,Cmd/Ctrl+X,Cmd/Ctrl+V, or the context menu.- A pasted item gets a unique name under its new parent:
Name,Name Copy,Name Copy 2, and so on. - Paste on a collection or folder pastes inside it.
- Paste on a request pastes into that request's collection.
- A pasted item gets a unique name under its new parent:
- Move: drag rows in the sidebar.
- Drop on a folder to nest the item. Drop between rows to reorder.
Cmd/Ctrl-drag copies instead of moving.- A drop into an item's own subtree is refused.
- A multi-selection (
Cmd/Ctrl-click, Shift-click) moves together.
- Delete: use context menu
Deleteor the Delete key. Collections and folders ask you to typedelete. Requests and environments go straight to the trash. - Undo:
Cmd/Ctrl+Zundoes the last rename or move.Cmd/Ctrl+Shift+Zredoes it. Deleting is not undone this way. - Other context-menu items:
Run(collection or folder),Export collection, and for requestsAdd example,Copy as cURLandOpen in new tab.
favourite and pinnedEnvironment fields, but nothing in the UI reads them. Several context-menu entries from the design are also missing: add to favourites, collapse all and reveal in file manager.Collection and folder tabs
Open a collection or folder to get a detail tab. A dot next to a tab name means the tab has content. Changes autosave shortly after you stop typing.
The tab header has:
- An editable name.
- A
...menu:New request,New folder(collections only),Duplicate,ExportandDelete. - A
Runbutton. It opens the collection runner for this collection or folder.
| Tab | Collection | Folder | Content |
|---|---|---|---|
Overview | yes | yes | Number of folders and requests, and a Markdown description. The Preview checkbox switches between editing and a plain-text view of the description. |
Authorization | yes | yes | Auth that requests below inherit. A collection defaults to No Auth. A folder defaults to Inherit. See Authorization. |
Variables | yes | yes | Variables scoped to this collection or folder, with a Secret switch per row. See Variables. |
Scripts | yes | yes | Pre-request and Post-response scripts that run for every HTTP request below. See Scripts and tests. |
Runs | yes | no | Stored runs of the collection, newest first: time, PASS/FAIL, passed and failed counts, iterations and duration. Click one to open it in the runner. The newest 20 runs are kept. |
Assets | yes | no | Files for scripts and body shortcodes. |
Inheritance
Variables, auth and scripts resolve from the outside in:
- Variables: a folder variable overrides a collection variable of the same name. The innermost folder wins. See the precedence table.
- Auth: a request set to
Inherituses the closest folder above it that sets its own auth. If no folder sets auth, it uses the collection's.No Authstops the search. - Scripts: run in this order:
- The collection script.
- Folder scripts, from the outermost to the innermost folder.
- The request's own script.
Assets
The Assets tab manages files stored in <workspace>/assets/<collection id>/. Scripts read them (pg.assets, require, fs). Request bodies embed them with shortcodes.
Import files…andImport folder…copy files in. A folder keeps its structure.- The search field filters the list. Columns are
Path,SizeandModified. - Each row has
Rename, delete (asksDeleteorCancel) andCopy shortcode.Copy shortcodecopies{{% base64(file('<path>')) %}}to the clipboard. - Limits:
- Depth: 16.
- Files: 10,000.
- File size: 100 MiB per file.
- Import size: 2 GiB per import.
- Paths: up to 1,024 bytes, and 255 bytes per component.
- Every path is checked to stay inside the collection's folder. Neither
..nor symbolic links can reach outside. - A replaced or deleted asset keeps one
<name>.bak. It is never listed. - Importing a Bruno folder copies its other files here with their relative paths. See Import and export.
collection_list, collection_get, collection_create, collection_rename, collection_duplicate, collection_delete, folder_create, folder_rename, folder_delete, request_create, request_get, request_update, request_move, request_duplicate and request_delete.asset_list,asset_import,asset_renameandasset_deletemanage assets.run_listlists stored runs.