Script Endpoints
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
Publish a script to the marketplace to make it available for installation.
Endpoint
Request Body
Publishing Requirements
- Script successfully deployed with working code
- Complete metadata (name, description)
- Valid pricing configuration
- Tested execution with no errors
Unpublish Script
Remove a script from the marketplace. Unpublishing prevents new installations but does not affect existing installations.
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
List Marketplace Scripts
Browse available scripts in the marketplace.
Endpoint
Query Parameters
category(string, optional) - Filter by categorytags(string[], optional) - Filter by tagssearch(string, optional) - Search by name or descriptionlimit(number, optional) - Results per page (default: 10)offset(number, optional) - Pagination offset (default: 0)
Response
See Also
- Overview - Script concepts and runtimes
- Events - Event-driven execution
- Examples - Practical code examples
- Technical Notes - Configuration and best practices