API Reference
Export tasks and/or job templates as NDJSON bundle
Streams a newline-delimited JSON bundle. Tasks are emitted before job templates. Requires admin or superadmin role.
GET /api/export
Streams a newline-delimited JSON bundle. Tasks are emitted before job templates. Requires admin or superadmin role.
Operation ID: exportBundle
Authentication
Option 1
- BearerAuth (
http bearer) API key token. Create via POST /api/api-keys. Format:envoy_<hex>
Option 2
- CookieAuth (
apiKey) Session cookie set after login + TOTP verification
Query parameters
include_tasks—booleanExample:true- Default:
true
- Default:
include_job_templates—booleanExample:false- Default:
false
- Default:
task_names—stringComma-separated task names to export (legacy; use repeated task_name for names that contain commas)task_name—array<string>Exact task name to export. May be repeated.- Items:
- Type:
string
- Type:
- Items:
job_template_names—stringComma-separated job template names to export (legacy; use repeated job_template_name for names that contain commas)job_template_name—array<string>Exact job template name to export. May be repeated.- Items:
- Type:
string
- Type:
- Items:
status—stringExample:active- Allowed values:
active,archived - Default:
active
- Allowed values:
include_archived—booleanExample:false- Default:
false
- Default:
include_versions—booleanExample:false- Default:
false
- Default:
Success responses
200
NDJSON export stream
Content type: application/x-ndjson
- Type:
string
Examples
cURL
curl --request GET \
--url 'https://your-envoy.example.com/api/export' \
--header 'Authorization: Bearer $API_KEY'JavaScript (fetch)
const response = await fetch('https://your-envoy.example.com/api/export', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);