An owner ends one of the tenant's sessions. The archive record lands through the driver like any other; nothing lands after it.
POST
/console/sessions/{id}/archive
const url = 'https://api.canopyhq.dev/console/sessions/000000000000000000000000000000000000000000000000000000000000000000000000/archive';const options = {method: 'POST', 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 POST \ --url https://api.canopyhq.dev/console/sessions/000000000000000000000000000000000000000000000000000000000000000000000000/archive \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
A stream id: 72 hex chars, the shard then the owner digest.
string
The session to end.
Responses
Section titled “Responses”The archive record landed; nothing lands on the session again.
No console token, or one that did not verify.
Only an owner of the tenant may end its sessions.
No such session under this tenant.
The session was already archived.