Script Endpoints
Complete API reference for script operations
This page documents all available operations for creating, deploying, executing, and managing scripts on the Mirra platform.
Create Script
Create a new script with code, runtime configuration, and metadata.
Endpoint
Request Body
Response
Execute Script
Execute a script manually with custom event data.
Endpoint
Request Body
Response
Create Script Version
Create a new version of a script. Versions are immutable once created.
Endpoint
Request Body
Response
Deploy Script Version
Deploy a specific version of a script to make it active.
Endpoint
Request Body
Response
Create Event Subscription
Subscribe a script to events so it executes automatically when events occur.
Endpoint
Request Body
Response
List Event Subscriptions
Get all event subscriptions for a script.
Endpoint
Response
Update Event Subscription
Update an event subscription's conditions or enabled status.
Endpoint
Request Body
Delete Event Subscription
Remove an event subscription to stop automatic execution.
Endpoint
Response
Get Execution History
Retrieve execution history with filtering and pagination.
Endpoint
Query Parameters
limit(number, optional) - Results per page (default: 10)offset(number, optional) - Pagination offset (default: 0)status(string, optional) - Filter by status:success,error,timeoutstartDate(string, optional) - Filter by start date (ISO 8601)endDate(string, optional) - Filter by end date (ISO 8601)
Response
Get Script Metrics
View aggregated metrics for script performance and usage.
Endpoint
Response
Update Script
Update script configuration, code, or metadata.
Endpoint
Request Body
Publish Script
Activate a script on your account and deploy it to Lambda. The endpoint keeps the
name publish for wire compatibility; it does not create a public listing.
Endpoint
Request Body
None required.
Publishing Requirements
- Script has a version with working code
- Complete metadata (name, description)
- Tested execution with no errors
If the script has not been deployed yet, publishing deploys it first and only marks it published when the deployment succeeds.
Unpublish Script
Deactivate a script. Flows that reference it will no longer be able to invoke it.
Endpoint
Response
Delete Script
Permanently delete a script. Scripts with active installations or subscriptions cannot be deleted.
Endpoint
Response
List User Scripts
Get all scripts created by the authenticated user.
Endpoint
Query Parameters
limit(number, optional) - Results per page (default: 10)offset(number, optional) - Pagination offset (default: 0)status(string, optional) - Filter by status:draft,deployed,published
Response
See Also
- Overview - Script concepts and runtimes
- Events - Event-driven execution
- Examples - Practical code examples
- Technical Notes - Configuration and best practices