Toggle menu

deleteSessions

Description

Deletes sessions of supplied session keys. Note that sessions are deleted automatically by a task that, in its default configuration, runs every minute and deletes sessions that haven't been updated in the last hour. The schedule and lifetime can be set in the worker configuration.

Request Parameters

NameTypeDescription
sessionKeysArray, requiredAn array of session keys

Example Request

function(params, credentials) {
    let result = this.callWorkerMethod('sitesessionstore', 'deleteSessions', {
        "sessionKeys": ["5cb4d890-2ea6-4deb-a09d-5ad8f78a2964_0"]
    });
    return result;
}

Response

The response is a count of the sessions deleted. If no sessions were deleted the response will be successful, but have a count of 0.

{
    "id": 105,
    "result": {
        "sessionsDeleted": 1
    },
    "jsonrpc": "2.0"
}

Last modified on 1 August 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon