Toggle menu

updateDigest()

This function updates a named history digest. It is not possible to update the filter, eventFilter or columns associated with a digest.

Parameters

These parameters define top-level information about your digest.

NameTypeDescription
nameString, requiredThe name of the digest to update
descriptionString, optionalAn optional description for the digest
The following parameters store scheduling information that could be used to calculate when a digest should next be run. The history worker doesn't perform any scheduling itself, but these values could be read and updated by a scheduler, before deciding whether to call digestHistories()
frequencyInteger, optionalBy convention this integer represents seconds. Scheduling information that can be returned via listDigests()
enabledBoolean, optionalScheduling information that can be returned via listDigests()
startedLong <unix timestamp>, optionalScheduling information that can be returned via listDigests(). This value is automatically set when digestHistories() runs
finishedLong <unix timestamp>, optionalScheduling information that can be returned via listDigests(). This value is automatically set when digestHistories() runs

Example

function(params, credentials) {
    let resp = this.callWorkerMethod("history", "updateDigest", {
        "name": "exampledigest",
        "description": "testing",
        "frequency": 20,
        "enabled": true,
        "started": 0,
        "finished": 0,
    });
    return resp;
}

Returns

{
    "id": 1629,
    "result": {
        "success": true
    },
    "jsonrpc": "2.0"
}

Last modified on November 15, 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon