Importing Relay collections and workspaces
Copy a collection or a whole workspace from a Relay workspace folder.
Overview
A Relay workspace folder, such as one a teammate keeps in a repository, holds a workspace's collections, environments and settings as JSON files. You can copy a single collection from it into the current workspace, or copy the whole workspace into Relay.
An import makes a copy once. Relay doesn't change the folder or keep it linked, and later changes on either side don't reach the other. To work on a workspace in its folder instead, so your edits are saved there, choose File > Open Workspace…. For more information, see Storing a workspace in a folder.
Import a collection
- Choose File > Import > Relay Collection…. You can also click the Add button (+) at the bottom of the sidebar and choose Import > Relay Collection….
- Choose the collection's folder. In a workspace folder, each collection is a folder inside
collections, with acollection.jsonfile at its top level.
The collection is added to the window's workspace, after its other collections, with its folders, requests, variables, auth, scripts and settings. If the workspace already has a collection with the same name, Relay adds "(Copy)" to the name. You can also drag a collection's folder onto a Relay window.
The collection's environments and workspace variables stay behind, because they belong to its workspace. If its requests use them, add them to your workspace or import the whole workspace instead.
Import a workspace
- Choose File > Import > Relay Workspace…. You can also click the Add button (+) at the bottom of the sidebar and choose Import > Relay Workspace….
- Choose the workspace's folder: the one with a
relay-workspace.jsonfile at its top level.
The copy opens in the current window and is stored in Relay. It brings the workspace's collections, environments, variables, auth, settings and trusted certificates. If you already have a workspace with the same name, Relay adds "(Copy)" to the name.
To remove an imported collection or workspace again, choose Edit > Undo.
Learn what comes with a copy
Secret values and credentials stay on the Mac they were entered on, not in the folder. If the workspace is open in Relay on this Mac, its secrets come with the copy. Otherwise, secret variables arrive without values for you to fill in. For more information, see Keeping secrets on your Mac.
Important
OAuth 2 tokens and the choice of active environment aren't copied.
Relay won't import a folder if any of its files can't be read, such as one with merge conflict markers. Fix the file, then import again.
See Also
- Storing a workspace in a folder: Keep a workspace's files in a folder you choose, such as a Git repository.
- Workspace file format: The folders and JSON documents that store a workspace.
- Organizing requests into collections: Group requests into collections and folders.