WayScript SDK
Your Lairs have exclusive access to the WayScript SDK, which offers a the following packages to help with tool development:
wayscript.context
- access process execution metadata, such as event payloadwayscript.triggers
- call trigger-specific methods
from wayscript import context
Method | Description | Parameters | Return Type |
context.get_event() | Get request event payload | None | dict |
context.get_workspace() | Get workspace name | None | dict |
context.get_lair() | Get Lair name | None | dict |
context.get_lair_trigger() | Get trigger name | None | dict |
context.get_process() | Get process id | None | dict |
context.get_user_by_application_key( <application_key>) | Get metadata for workspace member from application key | application_key: str | dict |
The
get_user_by_application_key
method requires fetching the application key from the header of the request made to your Lair. We provide an example on how to access the request header in your tool. import wayscript.triggers as triggers
Method | Description | Parameters | Return Type |
triggers.http_trigger.send_response(data, headers, status_code) |
| dict |
const wayscript = require("wayscript");
context.getWorkspace() | Get workspace name | None | obj |
context.getLair() | Get Lair name | None | obj |
context.getLairTrigger() | Get trigger name | None | obj |
context.getProcess() | Get process id | None | obj |
context.getEvent() | Get event payload | None | obj |
context.getUserByApplicationKey(application_key) | Get metadata for workspace member from application key | application_key: str | obj |
The
get_user_by_application_key
method requires fetching the application key from the header of the request made to your Lair. We provide an example on how to access the request header in your tool. wayscript.http_trigger
http_trigger.sendResponse(data, headers, status_code) |
| obj |
We are working on creating a Go SDK. In the meantime, code snippets for common WayScript methods can be found here: https://github.com/wayscript/wayscript-golang
Last modified 7mo ago