Skip to main content

Workflow Export & Import

Programmatic export and import of workflows as .strongly.json files. Export captures the full workflow definition; import is a two-phase flow — validate first to discover unresolved dependencies, then execute with resolved mappings.

All endpoints require authentication via X-API-Key header and the appropriate scope.


Export Object

{
"workflow": {
"_id": "wf_abc123",
"name": "PII Redaction Pipeline",
"description": "Multi-stage PII redaction workflow",
"nodes": [],
"edges": [],
"version": "1.0.0"
},
"dependencies": {
"models": [{ "id": "model_xyz", "name": "qwen-2-5-7b" }],
"datasources": [],
"addons": []
},
"exportedAt": "2026-05-16T10:30:00Z",
"exportedBy": "user_456"
}

GET /api/v1/workflows/:id/export

Export a workflow as a .strongly.json file. Sets Content-Disposition: attachment with a sanitized filename derived from the workflow name.

Scope: workflows:read

Path Parameters

ParameterTypeRequiredDescription
idstringYesWorkflow ID to export

Response 200 OK

Headers:

  • Content-Type: application/json
  • Content-Disposition: attachment; filename="<workflow-name>.strongly.json"

Returns the full Export object.


POST /api/v1/workflows/import

Import a workflow from .strongly.json data. This endpoint is a two-phase flow:

  1. Validate — call without resolvedDeps to validate the export and receive a list of dependency candidates that need to be mapped to local resources.
  2. Execute — call again with resolvedDeps to perform the import.

Scope: workflows:write

Request Body (validation phase)

{
"exportData": {
"workflow": { "name": "PII Redaction Pipeline" },
"dependencies": { "models": [{ "id": "model_xyz" }] }
}
}
FieldTypeRequiredDescription
exportDataobjectYesThe exported workflow JSON data
resolvedDepsobjectNoResolved dependency mappings — omit for validation-only

Response 200 OK (validation phase)

{
"valid": true,
"candidates": {
"models": [
{ "originalId": "model_xyz", "matches": [{ "id": "model_local_001", "name": "qwen-2-5-7b" }] }
],
"datasources": [],
"addons": []
}
}

Request Body (execution phase)

{
"exportData": {
"workflow": { "name": "PII Redaction Pipeline" },
"dependencies": { "models": [{ "id": "model_xyz" }] }
},
"resolvedDeps": {
"models": { "model_xyz": "model_local_001" }
}
}

Response 201 Created (execution phase)

{
"workflowId": "wf_new789",
"name": "PII Redaction Pipeline (imported)",
"imported": true
}