Start typing to search.

API Reference

Export tasks and/or job templates as NDJSON bundle

View Markdown

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_tasksboolean Example: true
    • Default: true
  • include_job_templatesboolean Example: false
    • Default: false
  • task_namesstring Comma-separated task names to export (legacy; use repeated task_name for names that contain commas)
  • task_namearray<string> Exact task name to export. May be repeated.
    • Items:
      • Type: string
  • job_template_namesstring Comma-separated job template names to export (legacy; use repeated job_template_name for names that contain commas)
  • job_template_namearray<string> Exact job template name to export. May be repeated.
    • Items:
      • Type: string
  • statusstring Example: active
    • Allowed values: active, archived
    • Default: active
  • include_archivedboolean Example: false
    • Default: false
  • include_versionsboolean Example: false
    • Default: false

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);