List every session across the tenant's installs
GET
/console/sessions
const url = 'https://api.canopyhq.dev/console/sessions';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.canopyhq.dev/console/sessions \ --header 'Authorization: Bearer <token>'Every session of every install the tenant has: the directory, one owner per install, read with one query each.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The tenant’s sessions, each with its install.
Media typeapplication/json
Array<object>
One of the tenant’s sessions, the install it was opened under, and when it opened, ended or went to rest, as the directory holds them.
object
archived
Unix milliseconds the session archived; absent while it is live.
integer | null format: int64
idled
Unix milliseconds the session last went to rest, as of its last checkpoint; absent while it lands and once it has ended. A resting session is not ended: its next message reopens it.
integer | null format: int64
install
required
Opaque; never the key, never anything the vendor chose.
string
opened
required
Unix milliseconds the session opened.
integer format: int64
session
required
A stream id: 72 hex chars, the shard then the owner digest.
string
Example
[ { "session": "000000000000000000000000000000000000000000000000000000000000000000000000" }]No console token, or one that did not verify.