Organizing requests into collections
Group requests into collections and folders, and move, copy and style them.
Overview
Collections hold the requests you want to keep. A collection usually covers one API or one service, and folders inside it group related requests, such as the endpoints for one resource. Folders can contain other folders, as deep as you need.
The sidebar shows the workspace's collections under the workspace's name, above Drafts and History. Most commands for a collection, folder or request are in its contextual menu: Control-click the item in the sidebar.
Create a collection
- In the sidebar, click the New Collection button next to the workspace's name.
- In the Create Collection popover, enter a name.
- Optionally, choose a color and an icon.
- Click Create.
You can also click New Collection at the end of the workspace's collections, or click the Add button (+) at the bottom of the sidebar and choose New Collection.
To create one without the popover, choose File > New Collection or press Shift-Command-C. Relay adds a collection named New Collection, which you can then rename.
Add folders and requests
Control-click a collection or folder in the sidebar and choose one of these:
- New Request: Adds an HTTP request at the end of the collection or folder and opens it in the request editor.
- New WebSocket Request: Adds a WebSocket request.
- New Folder: Adds a folder and starts renaming it. Enter a name and press Return.
To save a draft into a collection, Control-click the draft, choose Save to Collection and choose a collection or folder. For more ways to create requests, see Creating and managing requests.
Move and copy items
To move a request or folder, Control-click it, choose Move To and choose a collection or folder. A request can also move to Drafts. Collections and folders that can't take the item, such as the one it's already in, are dimmed.
You can also drag items in the sidebar:
- Drag a collection to reorder the workspace's collections.
- Drag a folder into another collection or folder. A folder can't move into itself or into Drafts.
- Drag a request or draft into any collection, folder or Drafts. Drop it on another request to place it right after that request.
To copy an item instead of moving it, hold the Option key while you drag a request, draft or folder. A copy placed in the same collection or folder as the original gets "(Copy)" added to its name.
Moving a request into Drafts turns it into a draft, and moving a draft into a collection saves it there. History items can't be dragged, and nothing can be dropped on History. You can't drag items while the Filter field has text in it.
Change a collection's appearance
- Control-click the collection and choose Edit Appearance.
- Choose a color and an icon, and change the name if you like.
- Click Save.
A collection's folders use its color in the sidebar.
Rename and delete items
To rename a collection, folder or request, Control-click it and choose Rename, then enter a name and press Return. To rename the selected request, press Return.
To delete an item, Control-click it and choose Delete. To delete the selected request, press Delete. Deleting a collection or folder also deletes every request inside it. Relay doesn't ask you to confirm; to bring the item back, choose Edit > Undo.
Filter the sidebar
Enter text in the Filter field at the bottom of the sidebar to show only matching items. Relay matches the letters you type in order, ignoring case, so lstu matches List Users. A collection or folder whose name matches shows everything inside it. Requests and drafts are matched by the name the sidebar shows, and history by URL.
To show everything again, clear the Filter field.
See Also
- Configuring collections and folders: Give a collection or folder variables, authentication, scripts and settings that its requests inherit.
- Creating and managing requests: Keep requests as drafts or save them in collections, and rename, duplicate and open them in their own windows.
- Understanding workspaces: Learn how workspaces, collections, folders and drafts fit together.