Skip to content

Share a collection

Ann has a collection, Shop API, and wants Bob to use it too. Only one person does this, once.

On GitHub (other servers have the same steps with other names):

  1. Choose + › New repository.
  2. Repository name: for example shop-api.
  3. Choose Private, unless the whole world may see your requests.
  4. Leave Add a README file, .gitignore and license empty. The repository must be empty, or korAPI cannot share to it.
  5. Choose Create repository.
  6. Copy the URL at the top of the next page: https://github.com/your-team/shop-api.git (or the SSH one, git@github.com:your-team/shop-api.git, if you set up SSH keys).
  1. Open the collection.
  2. Click the Git bar at the bottom of the sidebar. It says Share with Git…, and the view says Share this collection with Git.
  3. Choose Share with Git….
  4. Paste the URL into URL of an empty repository and choose Share.
  5. If a request has changes that are not saved, korAPI offers Save first. Git only sends what is saved.
  6. The first time, enter Name and Email for the history.

korAPI sends the whole collection, with the note “First version of Shop API”. The Git view now shows the branch (usually main) and the repository’s address, and No changes.

Refresh the repository’s page in your browser: your requests are there, one file each.

On GitHub: in the repository, Settings › Collaborators › Add people, and add Bob. Bob gets an email to accept. Send Bob the repository’s URL.

Secret values were not sent. Tell Bob which secrets he needs (for example the API token for the test server), and give them to him another way, such as your password manager.

If the collection is in a folder that is already a Git repository

Section titled “If the collection is in a folder that is already a Git repository”

If you made the folder a repository yourself before, but it has no server yet, Share with Git… keeps its history and connects it to the new repository. If the collection is a folder inside a bigger repository, korAPI does not share it: use Git for that repository in a terminal, or move the collection out of it.