End every session of one account
const url = 'https://beta-api.plune.ai/v1/admin/revoke-sessions';const options = { method: 'POST', headers: { cookie: 'plune_session=<plune_session>', 'Content-Type': 'application/json' },};
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://beta-api.plune.ai/v1/admin/revoke-sessions \ --header 'Content-Type: application/json' \ --cookie plune_session=<plune_session> \For a session cookie that leaked (#1820): sets the account’s «sessions ended at» mark to now, so every cookie issued to it before this moment is refused with the 401 an expired one gets; a sign-in after the call works. Other accounts, API tokens and admin tokens are not touched. The call is a row of the admin journal (target: the account id) and the Slack channel is told when a webhook is set. The response carries no cookie or token. The owner’s session alone: an admin token is told 403, anyone else 404. Ten a minute.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
Example
{}Responses
Section titled “ Responses ”Ended
object
Always true
Example generated
{ "userId": "example", "email": "example", "ended": true}The body is not valid
object
Example generated
{ "error": "example"}An admin token was used (code: session_required)
object
Example generated
{ "error": "example"}Not found, or no such account
object
Example generated
{ "error": "example"}Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over