Scripts API
Note
The Scripts API is used to implement Socotra plugins. See the Plugins topic for information about how to use this API.
Endpoint Index
Action | Endpoint |
---|---|
Deploy scripts | POST /scripts/upload |
Query scripting logs | POST /scripts/queryLogs |
Details
Deploy scripts¶
POST /scripts/upload
Name | Position | Type | Required |
---|---|---|---|
file | formdata | file | required |
tenantLocator | query | string | optional |
tenantName | query | string | optional |
void
This endpoint takes a zip
file with a hierarchical file structure containing folders and JavaScript files. This is the same structure that can be included in the /scripts
folder in a full configuration file.
This operation replaces the entire script set, so be sure to include all files in the payload even if they are unchanged.
Query scripting logs¶
POST /scripts/queryLogs
Name | Position | Type | Required |
---|---|---|---|
query | body | QueryRequest | required |
tenantLocator | query | string | optional |
QueryRequest¶
optionalmaxTimestamp timestampminTimestamp timestamplimit integeroldestComeFirst booleanposition stringrequestId stringsearchPhrase string
QueryResponse¶
requiredlogEvents [QueryResponseLineItem]nextPosition string
QueryResponseLineItem¶
requiredtimestamp timestampmessage stringrequestId string