Toggle menu

updateSession

Description

Replaces the data object of a session.

Parameters

NameTypeDescription
dataObject, requiredThe new data object
sessionKeyString, requiredThe session to update

Example Request

function(params, credentials) {
    let result = this.callWorkerMethod('sitesessionstore', 'updateSession', {
        "sessionKey": "5cb4d890-2ea6-4deb-a09d-5ad8f78a2964_0",
        "data": {
            "completelyNew": "data"
        }
    });
    return result;
}

Response

NameTypeDescription
createdString, ISO datetimeThe create time of the session
platformStringThe platform set in the create request
platformVersionStringThe platform version set in the create request
sessionKeyStringThe session key with the update count appended 
updateCountIntegerNew sessions have a count of 0, the first update 1 etc
updatedString, ISO datetimeWhen the session was last updated

Example Response

{
    "id": 97,
    "result": {
        "updateCount": 1,
        "sessionKey": "5cb4d890-2ea6-4deb-a09d-5ad8f78a2964_1",
        "created": "2023-08-01T13:05:54Z",
        "platformVersion": "1",
        "updated": "2023-08-01T13:10:21Z",
        "platform": "APISERVER"
    },
    "jsonrpc": "2.0"
}

Last modified on 1 August 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon