Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ keyring; `posit connect api` and the deploy commands reuse those credentials
automatically (including token refresh). You can also point at a server ad hoc
with `--server`/`CONNECT_SERVER` and `--api-key`/`CONNECT_API_KEY`.

Other tools, such as the Connect SDKs or `curl`, can use the same login through
`posit connect token`, which prints the stored access token:

```console
$ curl -H "Authorization: Bearer $(posit connect token)" https://connect.example.com/__api__/v1/user
```

If the server rejects the token, run `posit connect token --refresh` to get a
new one. `--format json` prints machine-readable output. Exit status 4 means
there are no usable credentials and you need to run `posit connect login` again.

## `posit connect api`

A `gh api`-style raw REST client, authenticated with your saved credentials.
Expand Down
1 change: 1 addition & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def test_connect_mounts_api_command(runner):
"bootstrap",
"login",
"logout",
"token",
]


Expand Down
Loading