Scripts API

Note

The Scripts API is used to implement Socotra plugins. See the Plugins topic for information about how to use this API.

Deploy scripts

POST /scripts/upload
  • Request:

    Name

    Position

    Type

    Required

    file

    formdata

    file

    required

    tenantLocator

    query

    string

    optional

  • Response:void

This endpoint takes a zip file with a structure like this:

  • Branch Name 1/

    • underwriter.js

  • Branch Name 2/

    • underwriter.js

Query scripting logs

POST /scripts/queryLogs

QueryRequest

{
  // Optional
  limit : integer
  maxTimestamp : timestamp
  minTimestamp : timestamp
  oldestComeFirst : boolean
  position : string
  requestId : string
  searchPhrase : string
}

QueryResponse

{
  // Required
  logEvents : [QueryResponseLineItem]
  nextPosition : string
}

QueryResponseLineItem

{
  // Required
  message : string
  requestId : string
  timestamp : timestamp
}