Deployments
Deploy patterns, manage their lifecycle, trigger executions, and monitor deployment health through the DRAGOPS API.
Deployments represent live instances of patterns running on the execution engine. When you deploy a pattern, the system transpiles the graph into executable code and registers it with the runtime.
Authentication required for all endpoints.
Deploy a pattern
POST /api/patterns/:id/deploy
Transpile and deploy a pattern to the execution engine. The deployment registers triggers (webhooks, schedules, or manual start) and makes the pattern ready to execute.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Pattern ID |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeDefinitions | object | Yes | Node definition map used for transpilation |
environmentId | string | No | Target environment ID |
{
"nodeDefinitions": { ... },
"environmentId": "env_abc123"
}Response
{
"success": true,
"data": {
"deploymentId": "dep_abc123",
"status": "active",
"triggers": [
{ "type": "OnWebhook", "nodeId": "node_1" }
]
}
}Undeploy a pattern
DELETE /api/patterns/:id/deploy
Remove a pattern from the execution engine. This stops all triggers and prevents new executions. Existing execution history is preserved.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Pattern ID |
Response
{
"success": true,
"data": {
"status": "undeployed"
}
}Get deployment status
GET /api/patterns/:id/deployment
Return the current deployment status for a pattern.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Pattern ID |
Response
{
"success": true,
"data": {
"deploymentId": "dep_abc123",
"status": "active",
"versionNumber": 3,
"confirmedAt": "2026-03-05T12:00:00.000Z",
"createdAt": "2026-03-01T10:00:00.000Z"
}
}List deployments
GET /api/deployments
Return a paginated list of all deployments for the authenticated user, including the most recent execution run for each.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | No | Filter by status: active, paused, or failed |
page | integer | No | Page number (default: 1) |
limit | integer | No | Items per page (default: 20, max: 100) |
Response
{
"success": true,
"data": [
{
"id": "dep_abc123",
"patternId": "pat_abc123",
"patternName": "Webhook Logger",
"status": "active",
"triggers": [
{ "type": "OnWebhook", "nodeId": "node_1" }
],
"totalRuns": 42,
"lastRun": {
"status": "completed",
"startedAt": "2026-03-05T11:45:00.000Z",
"durationMs": 320
},
"createdAt": "2026-03-01T10:00:00.000Z",
"updatedAt": "2026-03-05T11:45:00.000Z"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 5,
"totalPages": 1
}
}Get deployment
GET /api/deployments/:id
Return detailed information about a single deployment, including webhook endpoints and email endpoints.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
Response
{
"success": true,
"data": {
"id": "dep_abc123",
"patternId": "pat_abc123",
"patternName": "Webhook Logger",
"status": "active",
"triggers": [
{ "type": "OnWebhook", "nodeId": "node_1" }
],
"versionNumber": 3,
"confirmedAt": "2026-03-05T12:00:00.000Z",
"webhookEndpoints": [
{
"id": "wep_abc123",
"nodeId": "node_1",
"webhookAlias": "main-webhook",
"webhookId": "whk_abc123",
"webhookSecret": "a1b2c3d4e5..."
}
],
"emailEndpoints": [],
"pattern": {
"name": "Webhook Logger",
"description": "Logs incoming webhook payloads"
},
"createdAt": "2026-03-01T10:00:00.000Z",
"updatedAt": "2026-03-05T12:00:00.000Z"
}
}Delete deployment
DELETE /api/deployments/:id
Delete a deployment and all of its execution history. This also notifies the execution engine to unregister the deployment.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
Response
{
"success": true,
"data": {
"id": "dep_abc123",
"status": "deleted"
},
"timestamp": "2026-03-05T12:00:00.000Z"
}Trigger manual execution
POST /api/deployments/:id/execute
Trigger a manual execution of a deployed pattern. You can optionally include event data that the pattern receives as input.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
eventData | object | No | Input data passed to the pattern |
{
"eventData": {
"message": "Manual test run"
}
}Response
{
"success": true,
"data": {
"runId": "run_abc123",
"status": "completed"
}
}Errors
| Code | Status | Description |
|---|---|---|
PAUSED | 400 | The deployment is paused and cannot execute |
Pause deployment
POST /api/deployments/:id/pause
Pause a deployment. A paused deployment does not process any triggers or execute runs until resumed.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
Response
{
"success": true,
"data": {
"status": "paused"
}
}Errors
| Code | Status | Description |
|---|---|---|
ALREADY_PAUSED | 400 | The deployment is already paused |
Resume deployment
POST /api/deployments/:id/resume
Resume a paused deployment. The deployment returns to active status and begins processing triggers again.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
Response
{
"success": true,
"data": {
"status": "active"
}
}Errors
| Code | Status | Description |
|---|---|---|
NOT_PAUSED | 400 | The deployment is not in a paused state |
Redeploy
POST /api/deployments/:id/redeploy
Re-push the existing compiled code to the execution engine without recompiling. Use this to re-activate a deployment that has become unresponsive.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
Response
{
"success": true,
"data": {
"deploymentId": "dep_abc123",
"status": "active"
}
}Get webhook endpoints
GET /api/deployments/:id/webhook
Return all webhook endpoints associated with a deployment.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
Response
{
"success": true,
"data": [
{
"id": "wep_abc123",
"nodeId": "node_1",
"webhookAlias": "main-webhook",
"webhookId": "whk_abc123",
"webhookUrl": "https://your-domain/webhooks/whk_abc123",
"webhookSecret": "a1b2c3d4e5..."
}
]
}Regenerate webhook secret
POST /api/deployments/:id/webhook/regenerate
Generate a new HMAC signing secret for a specific webhook endpoint. After regeneration, all webhook senders must update their signing secret.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
endpointId | string | Yes | Webhook endpoint ID |
{
"endpointId": "wep_abc123"
}Response
{
"success": true,
"data": {
"webhookSecret": "f6g7h8i9j0..."
}
}Get webhook code snippets
GET /api/deployments/:id/webhook/snippets
Generate ready-to-use code snippets for sending signed webhook requests to a specific endpoint. Snippets are available in curl, Python, JavaScript, and PowerShell.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
endpointId | string | Yes | Webhook endpoint ID |
Response
{
"success": true,
"data": {
"curl": "curl -X POST 'https://your-domain/webhooks/whk_abc123' ...",
"python": "import hmac, hashlib, json ...",
"javascript": "import crypto from 'crypto' ...",
"pwsh": "$url = 'https://your-domain/webhooks/whk_abc123' ..."
}
}Update schedule
PUT /api/deployments/:id/schedule
Update the cron expression for a scheduled deployment.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
cronExpression | string | Yes | Cron expression (5-6 fields) |
timezone | string | No | IANA timezone (default: UTC) |
{
"cronExpression": "0 9 * * 1-5",
"timezone": "America/New_York"
}Response
{
"success": true,
"data": {
"cronExpression": "0 9 * * 1-5",
"timezone": "America/New_York"
}
}Errors
| Code | Status | Description |
|---|---|---|
VALIDATION | 400 | Invalid cron expression |
NO_SCHEDULE | 400 | The deployment does not have a schedule trigger |
Health summary
GET /api/deployments/health/summary
Return a system-wide health summary including deployment counts, recent execution metrics, and engine connectivity status.
Response
{
"success": true,
"data": {
"deployments": {
"active": 8,
"paused": 2,
"failed": 0
},
"runsLastHour": 134,
"failuresLastHour": 3,
"errorRate": 2.24,
"engineStatus": "connected"
}
}