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/uploadRequest:
| Name | Position | Type | Required |
|---|---|---|---|
| file | formdata | file | required |
| tenantLocator | query | string | optional |
Response:
voidThis endpoint takes a zip file with a heirarchical 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/queryLogsRequest:
| Name | Position | Type | Required |
|---|---|---|---|
| query | body | QueryRequest | required |
| tenantLocator | query | string | optional |
Response:
QueryResponseQueryRequest¶
optionalmaxTimestamp timestampminTimestamp timestamplimit integeroldestComeFirst booleanposition stringrequestId stringsearchPhrase string
QueryResponse¶
requiredlogEvents [QueryResponseLineItem]nextPosition string
QueryResponseLineItem¶
requiredtimestamp timestampmessage stringrequestId string