Docs
CLITools

API calls and opening the web

Call the CollabOps API with your saved login, open what you are looking at on the web (co api, co browse)

API calls (co api)

For features that do not have a command yet, call the CollabOps API directly with co api. It uses your saved login and workspace as is, so there is no need to copy cookies or tokens into curl.

co api /teams                                     # GET, paths are under /api/v2
co api /workspaces/{workspace}/members --paginate # {workspace} is replaced with the current workspace
co api -X PATCH /issues/123 -f status=done        # -f string field
co api /issues/123/labels -F label_ids=7          # -F typed field (number, true, null)
co api -X POST /projects/97/issues --input body.json

When you give fields, the default method becomes POST. If the response is not 2xx, co prints it to stderr and exits with 1. So that your login never leaks elsewhere, the Cookie, Authorization and Host headers cannot be changed, and absolute URLs are not accepted. All options are in co api --help.

Open on the web (co browse)

co browse                     # the repository in the current folder
co browse 2786                # CR-2786 (a number means a CR)
co browse issue/2084          # an issue (i/2084 also works)
co browse docs/369            # a doc (d/369 also works)
co browse --issues            # the issue list (--pulls, --docs)
co browse 2786 --no-browser   # print the URL without opening a browser

Do not build web URLs by hand. Get them with co browse --no-browser. Most view commands also have --web, which opens the same page.

Table of Contents

AI tools

Was this helpful?