{
  "openapi": "3.1.0",
  "info": {
    "title": "Etlworks REST API",
    "version": "9.9.9",
    "description": "The Etlworks platform REST API: flows, runs, executions, schedules, connections, and the rest of\nwhat you can do in the application.\n\n**Base URL.** `https://app.etlworks.com/rest` for Etlworks Cloud; `https://<your-host>/rest` on-premise.\nEvery path below is relative to `/rest`.\n\n**Authentication.** Send `Authorization: Bearer <token>`, where the token is either an API key or a JWT\nfrom `POST /v1/token-auth/issue`. JWTs last 8 hours by default. A few download and export endpoints also\naccept the token as an `Authorization` query parameter so the URL can be opened directly.\n\n**Roles.** A caller has the role of the user the key or token belongs to. The API User role can call\nthe Messages and CLI endpoints and HTTP listeners, but not flows, schedules or connections; use an\nOperator, Editor or Administrator key for those. Each operation states the rights it needs.\n\n**Errors.** 400 returns the message as `text/plain` or as `{\"error\": \"...\"}`. 401 and 403 return an\nempty body. 500 returns the message as `text/plain`, or an empty body for database errors.\n\n**Timestamps** are Unix epoch milliseconds. **Lists are not paginated**; each list endpoint returns\neverything in scope, except execution history, which is capped and reports the rest in\n`X-Truncated-Count`.\n\n**Rate limits.** The platform API has no application-level rate limit. HTTP listener endpoints can be\nthrottled when `listeners.throttle.enabled` is on (off by default, 100 requests per minute): excess\nrequests are queued or rejected with 429.\n\n**Connector settings.** Connections, formats and flows carry a `properties` map whose keys depend on\nthe type. `GET /v1/di/metadata/{type}/{key}` describes the keys for any type.\n\nThis document covers the public automation surface and was checked against the source of release\n9.9.9. The AI Agent API has its own spec at /dev/ai/etlworks-ai-agent-api.openapi.yaml.\n",
    "contact": {
      "name": "Etlworks support",
      "email": "support@etlworks.com",
      "url": "https://etlworks.com/dev/api/"
    }
  },
  "externalDocs": {
    "description": "Developer guide",
    "url": "https://etlworks.com/dev/api/"
  },
  "servers": [
    {
      "url": "https://app.etlworks.com/rest",
      "description": "Etlworks Cloud"
    },
    {
      "url": "https://{host}/rest",
      "description": "On-premise",
      "variables": {
        "host": {
          "default": "etlworks.example.com",
          "description": "Your instance hostname."
        }
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Authentication",
      "description": "Tokens, refresh and tenant switching."
    },
    {
      "name": "API keys",
      "description": "Long-lived keys for scripts and CI."
    },
    {
      "name": "Flows",
      "description": "Create, edit, inspect, version, import and export flows."
    },
    {
      "name": "Runs",
      "description": "Start and stop flow executions."
    },
    {
      "name": "Executions",
      "description": "Status, history, logs and dbt results of executions."
    },
    {
      "name": "Schedules",
      "description": "Timers, cron schedules and their history."
    },
    {
      "name": "Connections",
      "description": "Database, storage, API and queue connections."
    },
    {
      "name": "Formats",
      "description": "File and message formats."
    },
    {
      "name": "Listeners",
      "description": "HTTP, queue and other inbound listeners."
    },
    {
      "name": "Import and export",
      "description": "Move connections and formats between tenants."
    },
    {
      "name": "SQL",
      "description": "Run SQL against a connection."
    },
    {
      "name": "Connector metadata",
      "description": "The parameter keys each connector, format and flow type accepts."
    },
    {
      "name": "Macros",
      "description": "Reusable parameterized snippets."
    },
    {
      "name": "Functions",
      "description": "Built-in transformation functions."
    },
    {
      "name": "Templates",
      "description": "Flow templates."
    },
    {
      "name": "Webhooks",
      "description": "Outbound notifications on flow events."
    },
    {
      "name": "Messages",
      "description": "Payloads received by listeners."
    },
    {
      "name": "CLI",
      "description": "The built-in command line."
    },
    {
      "name": "Tags and search",
      "description": "Tags and name search."
    },
    {
      "name": "Audit",
      "description": "Audit trail of API calls."
    },
    {
      "name": "Recycle bin",
      "description": "Deleted objects."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Access",
      "tags": [
        "Authentication",
        "API keys"
      ]
    },
    {
      "name": "Build and run",
      "tags": [
        "Flows",
        "Runs",
        "Executions",
        "Schedules"
      ]
    },
    {
      "name": "Data plumbing",
      "tags": [
        "Connections",
        "Formats",
        "Listeners",
        "Import and export",
        "SQL",
        "Connector metadata"
      ]
    },
    {
      "name": "Reuse",
      "tags": [
        "Macros",
        "Functions",
        "Templates"
      ]
    },
    {
      "name": "Operations",
      "tags": [
        "Webhooks",
        "Messages",
        "CLI",
        "Tags and search",
        "Audit",
        "Recycle bin"
      ]
    }
  ],
  "paths": {
    "/v1/token-auth/issue": {
      "post": {
        "operationId": "issueToken",
        "summary": "Exchange a login and password for a JWT",
        "tags": [
          "Authentication"
        ],
        "description": "The token lasts 8 hours by default (`integrator.jwt.exp.period`, configurable on-premise). When two-factor authentication is on, the first call returns `tfaToken`; repeat the call with `tfaToken` and `code` to get the JWT.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthenticationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [],
        "x-etlworks-permission": "none"
      }
    },
    "/v1/token-auth/refresh": {
      "post": {
        "operationId": "refreshToken",
        "summary": "Refresh a JWT that has not expired",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [],
        "x-etlworks-permission": "none"
      }
    },
    "/v1/token-auth/revoke": {
      "post": {
        "operationId": "revokeToken",
        "summary": "Revoke a JWT",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Revoked."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [],
        "x-etlworks-permission": "none"
      }
    },
    "/v1/token-auth/tenants": {
      "get": {
        "operationId": "listTokenTenants",
        "summary": "Tenants the caller can switch to",
        "tags": [
          "Authentication"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "none"
      }
    },
    "/v1/token-auth/tenants/{tenantId}": {
      "post": {
        "operationId": "switchTenant",
        "summary": "Switch tenant",
        "tags": [
          "Authentication"
        ],
        "description": "Returns a new JWT scoped to the tenant. Use it for subsequent calls.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "none"
      }
    },
    "/v1/users": {
      "get": {
        "operationId": "listUsers",
        "summary": "List users",
        "tags": [
          "API keys"
        ],
        "description": "Administrators only.",
        "parameters": [
          {
            "name": "nonAdminOnly",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      }
    },
    "/v1/users/{userId}/new-api-key": {
      "post": {
        "operationId": "createApiKey",
        "summary": "Generate or rotate a user's API key",
        "tags": [
          "API keys"
        ],
        "description": "Replaces any existing key for the user. The key works only if the user's role is API User or API-key authentication is allowed for the user or tenant.\n\nAdministrators only.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "expirationDays",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Days until the key expires. Omit for no expiry."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      }
    },
    "/v1/users/{userId}/get-api-key": {
      "get": {
        "operationId": "getApiKey",
        "summary": "Get a user's current API key",
        "tags": [
          "API keys"
        ],
        "description": "Administrators only.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      }
    },
    "/v1/users/{userId}/revoke-api-key": {
      "post": {
        "operationId": "revokeApiKey",
        "summary": "Revoke a user's API key",
        "tags": [
          "API keys"
        ],
        "description": "Administrators only.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      }
    },
    "/v1/flows": {
      "get": {
        "operationId": "listFlows",
        "summary": "List flows",
        "tags": [
          "Flows"
        ],
        "description": "Returns every flow in scope in one response; there is no pagination.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`all` lists flows across the tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Flow"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      },
      "post": {
        "operationId": "createFlow",
        "summary": "Create a flow",
        "tags": [
          "Flows"
        ],
        "description": "Requires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Flow"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved flow, with its new id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Flow"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/flows/recent": {
      "get": {
        "operationId": "listRecentFlows",
        "summary": "Recently opened flows",
        "tags": [
          "Flows"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Flow"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/flows/{flowId}": {
      "get": {
        "operationId": "getFlow",
        "summary": "Get a flow",
        "tags": [
          "Flows"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Flow"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      },
      "put": {
        "operationId": "updateFlow",
        "summary": "Update a flow",
        "tags": [
          "Flows"
        ],
        "description": "Replaces the whole flow. Read it, change it, and send the full object back.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Flow"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Flow"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      },
      "delete": {
        "operationId": "deleteFlow",
        "summary": "Delete a flow",
        "tags": [
          "Flows"
        ],
        "description": "Moves it to the recycle bin. Refused while another flow references it, and while a schedule references it unless `schedules=true`. The response reports what was deleted and what blocked it.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "connections",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Also delete the connections and formats it uses, where nothing else prevents it."
          },
          {
            "name": "schedules",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Also delete the schedules that run it."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Delete report: `status`, plus the referencing flows, schedules, connections and formats with a status for each.",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Refused: still referenced. The body lists what references it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "References that block the delete.",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/flows/{flowId}/usage": {
      "get": {
        "operationId": "getFlowUsage",
        "summary": "Where a flow is referenced",
        "tags": [
          "Flows"
        ],
        "description": "Schedules, parent flows and listeners that reference it.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FlowReference"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/flows/inspect": {
      "post": {
        "operationId": "inspectFlow",
        "summary": "Run Flow Findings on a flow definition",
        "tags": [
          "Flows"
        ],
        "description": "Checks a flow against the built-in heuristics without saving it.\n\nRequires view rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Flow"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/flows/{flowId}/documentation": {
      "get": {
        "operationId": "getFlowDocumentation",
        "summary": "Generated documentation for a flow",
        "tags": [
          "Flows"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowDocumentationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/flows/bulk": {
      "post": {
        "operationId": "bulkFlows",
        "summary": "Bulk-edit flows",
        "tags": [
          "Flows"
        ],
        "description": "Rename, retag, delete or run many flows in one call.\n\nRequires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlowBulkActionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowBulkActionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/flows/export": {
      "get": {
        "operationId": "exportFlows",
        "summary": "Export flows as a bundle",
        "tags": [
          "Flows"
        ],
        "description": "Returns a text bundle to pass to an import endpoint. Accepts the token in the `Authorization` query parameter so the URL can be opened directly.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "flows",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated flow ids.",
            "required": true
          },
          {
            "name": "excludeCredentials",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The export bundle.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "queryToken": []
          }
        ],
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/flows/import/preview": {
      "post": {
        "operationId": "previewFlowImport",
        "summary": "Preview a flow import",
        "tags": [
          "Flows"
        ],
        "description": "Requires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportPreview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/flows/import": {
      "post": {
        "operationId": "importFlows",
        "summary": "Import flows",
        "tags": [
          "Flows"
        ],
        "description": "Preview first. The report says whether the import `failed` and whether it was `rolledBack`.\n\nRequires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/flows/{flowId}/history": {
      "get": {
        "operationId": "listFlowHistory",
        "summary": "Version history of a flow",
        "tags": [
          "Flows"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HistoryRecord"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/flows/{flowId}/history/{uuid}": {
      "get": {
        "operationId": "getFlowVersion",
        "summary": "Get one saved version of a flow",
        "tags": [
          "Flows"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Flow"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/flows/{flowId}/history/{uuid}/message": {
      "put": {
        "operationId": "updateFlowVersionMessage",
        "summary": "Edit the save message of a flow version",
        "tags": [
          "Flows"
        ],
        "description": "Requires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HistoryMessageUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryRecord"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/flows/{flowId}/history/{uuidFrom}/diff/{uuidTo}": {
      "get": {
        "operationId": "diffFlowVersions",
        "summary": "Diff two versions of a flow",
        "tags": [
          "Flows"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "uuidFrom",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uuidTo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DiffLine"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/flows/{flowId}/run": {
      "post": {
        "operationId": "runFlow",
        "summary": "Run a flow",
        "tags": [
          "Runs"
        ],
        "description": "The body is a flat map of flow parameters, or `{}`. It is not wrapped in a `params` object. Returns immediately unless `sync=true`; poll `GET /v1/executions/{flowId}?auditId=` for progress.\n\nRequires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "sync",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Wait for the run to finish before responding."
          },
          {
            "name": "waitIfRunning",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "allowParallel",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "force",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "debug",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "logStep",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Log progress every N records; 0 or at least 100."
          },
          {
            "name": "returnErrorCode",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Respond 500 if the run fails or is canceled."
          },
          {
            "name": "checkAgentFlow",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "emailOnSuccess",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "emailOnFailure",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "emailOnLastFailure",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "emailMetrics",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "emails",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated recipients."
          },
          {
            "name": "expectedTime",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Notify if the run exceeds this many seconds."
          },
          {
            "name": "stopTime",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Stop the run after this many seconds."
          },
          {
            "name": "disableExecutionNotifications",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "repeatExpectedTimeNotifications",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "secureParameterNames",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated parameter names to mask in logs."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          },
          "description": "Flow parameters."
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowExecutionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      }
    },
    "/v1/flows/flow-name/{flowName}/run": {
      "post": {
        "operationId": "runFlowByName",
        "summary": "Run a flow by name",
        "tags": [
          "Runs"
        ],
        "description": "Every query parameter other than the ones listed is passed to the flow as a flow parameter. Responds 404 if no flow has that name.\n\nRequires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "flowName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenant",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sync",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "allowParallel",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "debug",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "logStep",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "returnErrorCode",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "emailOnSuccess",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "emailOnFailure",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "emailOnLastFailure",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "emailMetrics",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "emails",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated recipients."
          },
          {
            "name": "expectedTime",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Notify if the run exceeds this many seconds."
          },
          {
            "name": "stopTime",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Stop the run after this many seconds."
          },
          {
            "name": "disableExecutionNotifications",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "repeatExpectedTimeNotifications",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "secureParameterNames",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated parameter names to mask in logs."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowExecutionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      }
    },
    "/v1/flows/{flowId}/stop": {
      "post": {
        "operationId": "stopFlow",
        "summary": "Stop a running flow",
        "tags": [
          "Runs"
        ],
        "description": "Requires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "auditId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "The execution to stop."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowExecutionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      }
    },
    "/v1/executions/{flowId}": {
      "get": {
        "operationId": "getExecution",
        "summary": "Get one execution",
        "tags": [
          "Executions"
        ],
        "description": "Look up by `auditId`, or by `messageId` for listener-triggered runs.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "auditId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "messageId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowAuditRecord"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/executions/{flowId}/history": {
      "get": {
        "operationId": "listExecutions",
        "summary": "Execution history of a flow",
        "tags": [
          "Executions"
        ],
        "description": "Returns up to 100 records per call. `X-Truncated-Count` says how many more match; pass the oldest `auditId` you received as `lastAuditId` to get the next, older 100. Filters combine.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "lastAuditId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Return only executions with a lower audit id than this one."
          },
          {
            "name": "auditIdFilter",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "ISO-8601 date."
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "fromTime",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`HH:mm:ss`."
          },
          {
            "name": "toTime",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/FlowStatus"
            }
          },
          {
            "name": "triggerType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startedBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metrics",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FlowAuditRecordLight"
                  }
                }
              }
            },
            "headers": {
              "X-Truncated-Count": {
                "description": "Executions left out because the result was capped.",
                "schema": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/executions/{flowId}/statuses": {
      "get": {
        "operationId": "getExecutionStatusCounts",
        "summary": "Execution counts by status",
        "tags": [
          "Executions"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Status name to count.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "integer",
                    "format": "int64"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/executions/{flowId}/audit/{auditId}/console": {
      "get": {
        "operationId": "getExecutionLog",
        "summary": "The log of one execution",
        "tags": [
          "Executions"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "auditId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Return only up to this offset."
          }
        ],
        "responses": {
          "200": {
            "description": "The execution log.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/executions/{flowId}/audit/{auditId}/console/live": {
      "get": {
        "operationId": "tailExecutionLog",
        "summary": "Tail the log of a running execution",
        "tags": [
          "Executions"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "auditId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "start",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 0
            },
            "description": "Return from this offset."
          }
        ],
        "responses": {
          "200": {
            "description": "Log text from `start`.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/executions/{flowId}/audit/{auditId}/running-tasks": {
      "get": {
        "operationId": "listRunningTasks",
        "summary": "Transformations in flight",
        "tags": [
          "Executions"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "auditId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RunningTask"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/executions/console/download": {
      "get": {
        "operationId": "downloadExecutionLog",
        "summary": "Download an execution log",
        "tags": [
          "Executions"
        ],
        "description": "Accepts the token in the `Authorization` query parameter so the URL can be opened directly.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "required": true
          },
          {
            "name": "auditId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The execution log as a file.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "queryToken": []
          }
        ],
        "x-etlworks-permission": "view"
      }
    },
    "/v1/executions/{flowId}/audit/{auditId}/dbt": {
      "get": {
        "operationId": "getDbtResults",
        "summary": "dbt results of an execution",
        "tags": [
          "Executions"
        ],
        "description": "Model and test outcomes, timings, sources and freshness from a dbt flow run.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "auditId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "invocation",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nodeId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "dbt results for the selected invocation.",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/executions/{flowId}/audit/{auditId}/dbt/artifacts/{artifactName}": {
      "get": {
        "operationId": "getDbtArtifact",
        "summary": "Download a dbt artifact",
        "tags": [
          "Executions"
        ],
        "description": "Only the four artifact names listed are served; any other name returns 404.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "auditId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "artifactName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "manifest.json",
                "run_results.json",
                "catalog.json",
                "sources.json"
              ]
            }
          },
          {
            "name": "invocation",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The artifact.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "dbt artifact JSON.",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/schedules": {
      "get": {
        "operationId": "listSchedules",
        "summary": "List schedules",
        "tags": [
          "Schedules"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "light",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Return fewer fields."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FlowSchedule"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      },
      "post": {
        "operationId": "createSchedule",
        "summary": "Create a schedule",
        "tags": [
          "Schedules"
        ],
        "description": "Requires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlowSchedule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowSchedule"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/schedules/{scheduleId}": {
      "get": {
        "operationId": "getSchedule",
        "summary": "Get a schedule",
        "tags": [
          "Schedules"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowSchedule"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      },
      "put": {
        "operationId": "updateSchedule",
        "summary": "Update a schedule",
        "tags": [
          "Schedules"
        ],
        "description": "Send the full schedule.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlowSchedule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowSchedule"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      },
      "delete": {
        "operationId": "deleteSchedule",
        "summary": "Delete a schedule",
        "tags": [
          "Schedules"
        ],
        "description": "Moves it to the recycle bin.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/schedules/{scheduleId}/enable": {
      "post": {
        "operationId": "enableSchedule",
        "summary": "Enable a schedule",
        "tags": [
          "Schedules"
        ],
        "description": "Requires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/schedules/{scheduleId}/disable": {
      "post": {
        "operationId": "disableSchedule",
        "summary": "Disable a schedule",
        "tags": [
          "Schedules"
        ],
        "description": "Pauses it without deleting it.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/schedules/{scheduleId}/flows/{flowId}/run": {
      "post": {
        "operationId": "runScheduledFlow",
        "summary": "Run a scheduled flow now",
        "tags": [
          "Schedules"
        ],
        "description": "Runs the flow with the schedule's parameters and settings applied.\n\nRequires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowExecutionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      }
    },
    "/v1/schedules/bulk": {
      "post": {
        "operationId": "bulkSchedules",
        "summary": "Bulk-edit schedules",
        "tags": [
          "Schedules"
        ],
        "description": "Requires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleBulkActionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleBulkActionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/schedules/flows/{flowId}": {
      "get": {
        "operationId": "listSchedulesForFlow",
        "summary": "Schedules that run a flow",
        "tags": [
          "Schedules"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScheduleLight"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/schedules/{scheduleId}/history": {
      "get": {
        "operationId": "listScheduleHistory",
        "summary": "Version history of a schedule",
        "tags": [
          "Schedules"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HistoryRecord"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/schedules/{scheduleId}/history/{uuid}": {
      "get": {
        "operationId": "getScheduleVersion",
        "summary": "Get one saved version of a schedule",
        "tags": [
          "Schedules"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowSchedule"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/schedules/{scheduleId}/history/{uuidFrom}/diff/{uuidTo}": {
      "get": {
        "operationId": "diffScheduleVersions",
        "summary": "Diff two versions of a schedule",
        "tags": [
          "Schedules"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "uuidFrom",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uuidTo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DiffLine"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/connections": {
      "get": {
        "operationId": "listConnections",
        "summary": "List connections",
        "tags": [
          "Connections"
        ],
        "description": "Requires execute rights on this subsystem.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionObject"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      },
      "post": {
        "operationId": "createConnection",
        "summary": "Create a connection",
        "tags": [
          "Connections"
        ],
        "description": "Requires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved object, with its new id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/connections/recent": {
      "get": {
        "operationId": "listRecentConnections",
        "summary": "Recently opened connections",
        "tags": [
          "Connections"
        ],
        "description": "Recently opened by the calling user.\n\nRequires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Maximum number of items."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionObject"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      }
    },
    "/v1/connections/{connectionId}": {
      "get": {
        "operationId": "getConnection",
        "summary": "Get a connection",
        "tags": [
          "Connections"
        ],
        "description": "Requires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      },
      "put": {
        "operationId": "updateConnection",
        "summary": "Update a connection",
        "tags": [
          "Connections"
        ],
        "description": "The body replaces the stored object; send the full object, not a patch.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      },
      "delete": {
        "operationId": "deleteConnection",
        "summary": "Delete a connection",
        "tags": [
          "Connections"
        ],
        "description": "Moves it to the recycle bin; restore it with `POST /v1/recycle-bin/{type}/{id}/restore`. Refused with 409 while anything still references it.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Refused: still referenced. The body lists what references it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "References that block the delete.",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/connections/bulk": {
      "post": {
        "operationId": "bulkConnections",
        "summary": "Bulk-edit connections",
        "tags": [
          "Connections"
        ],
        "description": "Applies the listed actions to every id in the request, in order.\n\nRequires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IOBulkActionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IOBulkActionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/connections/{connectionId}/usage": {
      "get": {
        "operationId": "getConnectionUsage",
        "summary": "Where a connection is used",
        "tags": [
          "Connections"
        ],
        "description": "Requires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IOReference"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      }
    },
    "/v1/connections/test": {
      "post": {
        "operationId": "testConnection",
        "summary": "Test a connection",
        "tags": [
          "Connections"
        ],
        "description": "Tests the connection in the body without saving it.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Run on this Integration Agent instead of the server."
          },
          {
            "name": "agentActionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EtlServiceResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/connections/{connectionId}/objects": {
      "post": {
        "operationId": "listConnectionObjects",
        "summary": "List tables, files or endpoints",
        "tags": [
          "Connections"
        ],
        "description": "Lists the objects reachable through a connection. No request body.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "formatId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "cache",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Run on this Integration Agent instead of the server."
          },
          {
            "name": "agentActionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkDisableLookup",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/connections/{connectionId}/fields": {
      "post": {
        "operationId": "listConnectionFields",
        "summary": "List the fields of an object",
        "tags": [
          "Connections"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "formatId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "cache",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Run on this Integration Agent instead of the server."
          },
          {
            "name": "agentActionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkDisableLookup",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FieldsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/connections/{connectionId}/history": {
      "get": {
        "operationId": "listConnectionHistory",
        "summary": "Version history of a connection",
        "tags": [
          "Connections"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HistoryRecord"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/connections/{connectionId}/history/{uuid}": {
      "get": {
        "operationId": "getConnectionVersion",
        "summary": "Get one saved version of a connection",
        "tags": [
          "Connections"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/connections/{connectionId}/history/{uuid}/message": {
      "put": {
        "operationId": "updateConnectionVersionMessage",
        "summary": "Edit the save message of a connection version",
        "tags": [
          "Connections"
        ],
        "description": "Requires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HistoryMessageUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryRecord"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/connections/{connectionId}/history/{uuidFrom}/diff/{uuidTo}": {
      "get": {
        "operationId": "diffConnectionVersions",
        "summary": "Diff two versions of a connection",
        "tags": [
          "Connections"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "uuidFrom",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uuidTo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DiffLine"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/formats": {
      "get": {
        "operationId": "listFormats",
        "summary": "List formats",
        "tags": [
          "Formats"
        ],
        "description": "Requires execute rights on this subsystem.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FormatObject"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      },
      "post": {
        "operationId": "createFormat",
        "summary": "Create a format",
        "tags": [
          "Formats"
        ],
        "description": "Requires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FormatObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved object, with its new id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormatObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/formats/recent": {
      "get": {
        "operationId": "listRecentFormats",
        "summary": "Recently opened formats",
        "tags": [
          "Formats"
        ],
        "description": "Recently opened by the calling user.\n\nRequires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Maximum number of items."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FormatObject"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      }
    },
    "/v1/formats/{formatId}": {
      "get": {
        "operationId": "getFormat",
        "summary": "Get a format",
        "tags": [
          "Formats"
        ],
        "description": "Requires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "formatId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormatObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      },
      "put": {
        "operationId": "updateFormat",
        "summary": "Update a format",
        "tags": [
          "Formats"
        ],
        "description": "The body replaces the stored object; send the full object, not a patch.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "formatId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FormatObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormatObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      },
      "delete": {
        "operationId": "deleteFormat",
        "summary": "Delete a format",
        "tags": [
          "Formats"
        ],
        "description": "Moves it to the recycle bin; restore it with `POST /v1/recycle-bin/{type}/{id}/restore`. Refused with 409 while anything still references it.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "formatId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Refused: still referenced. The body lists what references it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "References that block the delete.",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/formats/bulk": {
      "post": {
        "operationId": "bulkFormats",
        "summary": "Bulk-edit formats",
        "tags": [
          "Formats"
        ],
        "description": "Applies the listed actions to every id in the request, in order.\n\nRequires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IOBulkActionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IOBulkActionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/formats/{formatId}/usage": {
      "get": {
        "operationId": "getFormatUsage",
        "summary": "Where a format is used",
        "tags": [
          "Formats"
        ],
        "description": "Requires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "formatId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IOReference"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      }
    },
    "/v1/formats/{formatId}/history": {
      "get": {
        "operationId": "listFormatHistory",
        "summary": "Version history of a format",
        "tags": [
          "Formats"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "formatId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HistoryRecord"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/formats/{formatId}/history/{uuid}": {
      "get": {
        "operationId": "getFormatVersion",
        "summary": "Get one saved version of a format",
        "tags": [
          "Formats"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "formatId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormatObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/formats/{formatId}/history/{uuid}/message": {
      "put": {
        "operationId": "updateFormatVersionMessage",
        "summary": "Edit the save message of a format version",
        "tags": [
          "Formats"
        ],
        "description": "Requires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "formatId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HistoryMessageUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryRecord"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/formats/{formatId}/history/{uuidFrom}/diff/{uuidTo}": {
      "get": {
        "operationId": "diffFormatVersions",
        "summary": "Diff two versions of a format",
        "tags": [
          "Formats"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "formatId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "uuidFrom",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uuidTo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DiffLine"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/listeners": {
      "get": {
        "operationId": "listListeners",
        "summary": "List listeners",
        "tags": [
          "Listeners"
        ],
        "description": "Requires execute rights on this subsystem.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionObject"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      },
      "post": {
        "operationId": "createListener",
        "summary": "Create a listener",
        "tags": [
          "Listeners"
        ],
        "description": "Requires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved object, with its new id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/listeners/recent": {
      "get": {
        "operationId": "listRecentListeners",
        "summary": "Recently opened listeners",
        "tags": [
          "Listeners"
        ],
        "description": "Recently opened by the calling user.\n\nRequires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Maximum number of items."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionObject"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      }
    },
    "/v1/listeners/{listenerId}": {
      "get": {
        "operationId": "getListener",
        "summary": "Get a listener",
        "tags": [
          "Listeners"
        ],
        "description": "Requires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "listenerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      },
      "put": {
        "operationId": "updateListener",
        "summary": "Update a listener",
        "tags": [
          "Listeners"
        ],
        "description": "The body replaces the stored object; send the full object, not a patch.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "listenerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      },
      "delete": {
        "operationId": "deleteListener",
        "summary": "Delete a listener",
        "tags": [
          "Listeners"
        ],
        "description": "Moves it to the recycle bin; restore it with `POST /v1/recycle-bin/{type}/{id}/restore`.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "listenerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/listeners/bulk": {
      "post": {
        "operationId": "bulkListeners",
        "summary": "Bulk-edit listeners",
        "tags": [
          "Listeners"
        ],
        "description": "Applies the listed actions to every id in the request, in order.\n\nRequires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IOBulkActionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IOBulkActionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/io/list": {
      "get": {
        "operationId": "listExportable",
        "summary": "Connections and formats available to export",
        "tags": [
          "Import and export"
        ],
        "description": "Requires edit rights on this subsystem.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExportItem"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/io/export": {
      "get": {
        "operationId": "exportConnections",
        "summary": "Export connections and formats as a bundle",
        "tags": [
          "Import and export"
        ],
        "description": "Returns a text bundle. Accepts the token in the `Authorization` query parameter.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "connections",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated connection ids."
          },
          {
            "name": "formats",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated format ids."
          },
          {
            "name": "excludeCredentials",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The export bundle.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "queryToken": []
          }
        ],
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/io/import/preview": {
      "post": {
        "operationId": "previewConnectionImport",
        "summary": "Preview a connection and format import",
        "tags": [
          "Import and export"
        ],
        "description": "Requires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportPreview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/io/import": {
      "post": {
        "operationId": "importConnections",
        "summary": "Import connections and formats",
        "tags": [
          "Import and export"
        ],
        "description": "Requires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/explorer/sql/data": {
      "post": {
        "operationId": "runSql",
        "summary": "Run SQL against a connection",
        "tags": [
          "SQL"
        ],
        "description": "Requires execute rights on this subsystem.",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Run on this Integration Agent instead of the server."
          },
          {
            "name": "agentActionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SqlRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      }
    },
    "/v1/explorer/sql/data/executions/{executionId}/console": {
      "get": {
        "operationId": "getSqlLog",
        "summary": "The log of a SQL execution",
        "tags": [
          "SQL"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "executionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The log.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/di/metadata/{type}": {
      "get": {
        "operationId": "listDescriptors",
        "summary": "List connector, format or flow types",
        "tags": [
          "Connector metadata"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "connections",
                "formats",
                "flows"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Descriptor catalog.",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/di/metadata/connections/{key}": {
      "get": {
        "operationId": "getConnectionDescriptor",
        "summary": "Describe one connection type",
        "tags": [
          "Connector metadata"
        ],
        "description": "Lists the parameter keys accepted in `properties`, with type, default and whether required.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Descriptor key, for example `connection.db.postgres`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Descriptor.",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/di/metadata/formats/{key}": {
      "get": {
        "operationId": "getFormatDescriptor",
        "summary": "Describe one format type",
        "tags": [
          "Connector metadata"
        ],
        "description": "Lists the parameter keys accepted in `properties`, with type, default and whether required.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Descriptor key, for example `format.text.csv`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Descriptor.",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/di/metadata/flows/{key}": {
      "get": {
        "operationId": "getFlowDescriptor",
        "summary": "Describe one flow type",
        "tags": [
          "Connector metadata"
        ],
        "description": "Lists the parameter keys accepted in `properties`, with type, default and whether required.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Descriptor key, for example `flow.api.api`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Descriptor.",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/macros": {
      "get": {
        "operationId": "listMacros",
        "summary": "List macros",
        "tags": [
          "Macros"
        ],
        "description": "Requires view rights on this subsystem.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MacroLight"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      },
      "post": {
        "operationId": "createMacro",
        "summary": "Create a macro",
        "tags": [
          "Macros"
        ],
        "description": "Requires edit rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Macro"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Macro"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/macros/{macroId}": {
      "get": {
        "operationId": "getMacro",
        "summary": "Get a macro",
        "tags": [
          "Macros"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "macroId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Macro"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      },
      "put": {
        "operationId": "updateMacro",
        "summary": "Update a macro",
        "tags": [
          "Macros"
        ],
        "description": "Requires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "macroId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Macro"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Macro"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      },
      "delete": {
        "operationId": "deleteMacro",
        "summary": "Delete a macro",
        "tags": [
          "Macros"
        ],
        "description": "Refused with 409 while a flow still uses it.\n\nRequires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "macroId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Refused: still referenced. The body lists what references it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "References that block the delete.",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    },
    "/v1/macros/{macroId}/usage": {
      "get": {
        "operationId": "getMacroUsage",
        "summary": "Where a macro is used",
        "tags": [
          "Macros"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "macroId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MacroUsage"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/functions": {
      "get": {
        "operationId": "listFunctions",
        "summary": "List transformation functions",
        "tags": [
          "Functions"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "includeDefault",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FunctionTemplate"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/templates": {
      "get": {
        "operationId": "listTemplates",
        "summary": "List flow templates",
        "tags": [
          "Templates"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "includeDefault",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Template"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/templates/search": {
      "post": {
        "operationId": "searchTemplates",
        "summary": "Search flow templates",
        "tags": [
          "Templates"
        ],
        "description": "Requires view rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Template"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/templates/{templateId}": {
      "get": {
        "operationId": "getTemplate",
        "summary": "Get a flow template",
        "tags": [
          "Templates"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeDump",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/webhooks": {
      "get": {
        "operationId": "listWebhooks",
        "summary": "List webhooks",
        "tags": [
          "Webhooks"
        ],
        "description": "Administrators only.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Webhook"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      },
      "post": {
        "operationId": "createWebhook",
        "summary": "Create a webhook",
        "tags": [
          "Webhooks"
        ],
        "description": "Deliveries carry `X-Etl-Webhook-Event`, `X-Etl-Webhook-Event-Id`, `X-Etl-Webhook-Id` and `X-Etl-Webhook-Entity-Id` headers, plus `X-Etl-Webhook-Signature` when a secret is set.\n\nAdministrators only.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Webhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      }
    },
    "/v1/webhooks/metadata": {
      "get": {
        "operationId": "getWebhookMetadata",
        "summary": "Webhook event types",
        "tags": [
          "Webhooks"
        ],
        "description": "Administrators only.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Event types and options.",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      }
    },
    "/v1/webhooks/{webhookId}": {
      "get": {
        "operationId": "getWebhook",
        "summary": "Get a webhook",
        "tags": [
          "Webhooks"
        ],
        "description": "Administrators only.",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      },
      "put": {
        "operationId": "updateWebhook",
        "summary": "Update a webhook",
        "tags": [
          "Webhooks"
        ],
        "description": "Administrators only.",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Webhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      },
      "delete": {
        "operationId": "deleteWebhook",
        "summary": "Delete a webhook",
        "tags": [
          "Webhooks"
        ],
        "description": "Administrators only.",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      }
    },
    "/v1/webhooks/{webhookId}/events": {
      "get": {
        "operationId": "listWebhookEvents",
        "summary": "Recent deliveries",
        "tags": [
          "Webhooks"
        ],
        "description": "Administrators only.",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookEventLight"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      }
    },
    "/v1/webhooks/{webhookId}/events/{eventId}": {
      "get": {
        "operationId": "getWebhookEvent",
        "summary": "One delivery, with payload and response",
        "tags": [
          "Webhooks"
        ],
        "description": "Administrators only.",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEvent"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      }
    },
    "/v1/messages": {
      "get": {
        "operationId": "listMessages",
        "summary": "List listener messages",
        "tags": [
          "Messages"
        ],
        "description": "Available to the API User role.\n\nRequires view rights on this subsystem.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Message"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      },
      "post": {
        "operationId": "searchMessages",
        "summary": "Search listener messages",
        "tags": [
          "Messages"
        ],
        "description": "Available to the API User role.\n\nRequires view rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagesFilter"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Message"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/messages/{messageId}": {
      "get": {
        "operationId": "getMessage",
        "summary": "Get a message body",
        "tags": [
          "Messages"
        ],
        "description": "Available to the API User role.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The message.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/cli": {
      "post": {
        "operationId": "runCli",
        "summary": "Run CLI commands",
        "tags": [
          "CLI"
        ],
        "description": "Runs one or more built-in CLI commands and returns their output. Available to the API User role.\n\nRequires execute rights on this subsystem.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CliRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CliResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "execute"
      }
    },
    "/v1/cli/commands": {
      "get": {
        "operationId": "listCliCommands",
        "summary": "List CLI commands",
        "tags": [
          "CLI"
        ],
        "description": "Requires view rights on this subsystem.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CliCommandInfo"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/tags": {
      "get": {
        "operationId": "listTags",
        "summary": "List tags in use",
        "tags": [
          "Tags and search"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "global",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "include",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/search": {
      "get": {
        "operationId": "search",
        "summary": "Search",
        "tags": [
          "Tags and search"
        ],
        "description": "Searches flows, connections, formats, schedules, webhooks, agents, macros and templates by name.\n\nRequires view rights on this subsystem.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SearchItem"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      },
      "post": {
        "operationId": "searchFiltered",
        "summary": "Search with filters",
        "tags": [
          "Tags and search"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "global",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SearchItem"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/audit": {
      "get": {
        "operationId": "listAudit",
        "summary": "Recent API audit records",
        "tags": [
          "Audit"
        ],
        "description": "Administrators only.",
        "parameters": [
          {
            "name": "exception",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Only failed calls."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AuditUiRecord"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      },
      "post": {
        "operationId": "searchAudit",
        "summary": "Search API audit records",
        "tags": [
          "Audit"
        ],
        "description": "Administrators only.",
        "parameters": [
          {
            "name": "exception",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditUiRecordsFilter"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AuditUiRecord"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      }
    },
    "/v1/audit/{auditId}": {
      "get": {
        "operationId": "getAuditDetails",
        "summary": "Details of one audit record",
        "tags": [
          "Audit"
        ],
        "description": "Administrators only.",
        "parameters": [
          {
            "name": "auditId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Details.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "admin"
      }
    },
    "/v1/recycle-bin": {
      "get": {
        "operationId": "listRecycleBin",
        "summary": "List deleted objects",
        "tags": [
          "Recycle bin"
        ],
        "description": "Requires view rights on this subsystem.",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Limit to one object type."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RecycleBinItem"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "view"
      }
    },
    "/v1/recycle-bin/{type}/{id}/restore": {
      "post": {
        "operationId": "restoreFromRecycleBin",
        "summary": "Restore a deleted object",
        "tags": [
          "Recycle bin"
        ],
        "description": "Requires edit rights on this subsystem.",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecycleBinRestoreResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-etlworks-permission": "edit"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key or a JWT from `POST /v1/token-auth/issue`, sent as `Authorization: Bearer <token>`."
      },
      "queryToken": {
        "type": "apiKey",
        "in": "query",
        "name": "Authorization",
        "description": "`Bearer <token>`, URL-encoded. Accepted only by the download and export endpoints that list it."
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid request.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing, invalid or expired token. Empty body."
      },
      "Forbidden": {
        "description": "The caller's role or rights do not allow this. Usually an empty body."
      },
      "NotFound": {
        "description": "Not found."
      },
      "ServerError": {
        "description": "Server error.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Returned on some 400 responses. Others return the message as `text/plain`.",
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable message."
          }
        }
      },
      "AuthenticationRequest": {
        "type": "object",
        "required": [
          "login",
          "password"
        ],
        "properties": {
          "login": {
            "type": "string",
            "description": "User login (usually the email address)."
          },
          "password": {
            "type": "string",
            "format": "password",
            "writeOnly": true,
            "description": "Password."
          },
          "tfaToken": {
            "type": "string",
            "description": "Token returned by the first call when two-factor authentication is on."
          },
          "code": {
            "type": "string",
            "description": "One-time code from the authenticator app, sent with `tfaToken`."
          },
          "deviceId": {
            "type": "string",
            "description": "Optional client device identifier."
          }
        }
      },
      "AuthenticationResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "JWT. Send it as `Authorization: Bearer <token>`."
          },
          "tfaToken": {
            "type": "string",
            "description": "Present instead of `token` when the user must complete two-factor authentication."
          }
        }
      },
      "TokenRequest": {
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "A still-valid JWT."
          }
        }
      },
      "ApiKey": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The API key. Send it as `Authorization: Bearer <key>`."
          },
          "issuedAt": {
            "type": "integer",
            "format": "int64",
            "description": "When the key was issued. Unix epoch milliseconds."
          },
          "expiresAt": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "When the key expires; null if it does not expire. Unix epoch milliseconds."
          }
        }
      },
      "User": {
        "type": "object",
        "description": "Summary of a user. The full object carries role, tenant and security settings.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "login": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "tenantId": {
            "type": "integer",
            "format": "int64"
          },
          "roleId": {
            "type": "integer",
            "format": "int64"
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "FlowStatus": {
        "type": "string",
        "enum": [
          "queued",
          "running",
          "success",
          "warning",
          "error",
          "canceled"
        ],
        "description": "Execution status. `success`, `warning`, `error` and `canceled` are terminal."
      },
      "FlowConnectionRef": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Logical name used inside the flow."
          },
          "connection": {
            "type": "integer",
            "format": "int64",
            "description": "Connection id."
          },
          "format": {
            "type": "integer",
            "format": "int64",
            "description": "Format id."
          }
        }
      },
      "Mapping": {
        "type": "object",
        "description": "One field mapping.",
        "properties": {
          "source": {
            "type": "string"
          },
          "fullyQualifiedSource": {
            "type": "string"
          },
          "destination": {
            "type": "string"
          },
          "exclude": {
            "type": "boolean"
          },
          "include": {
            "type": "boolean"
          },
          "formula": {
            "type": "string",
            "description": "Calculated-field expression."
          },
          "formulaType": {
            "type": "string"
          },
          "lookupDataSet": {
            "type": "boolean"
          },
          "level": {
            "type": "integer",
            "format": "int32"
          },
          "destinationLevel": {
            "type": "integer",
            "format": "int32"
          },
          "javaType": {
            "type": "string"
          },
          "sqlType": {
            "type": "string"
          },
          "nullable": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "xmlAttr": {
            "type": "boolean"
          },
          "xmlCdata": {
            "type": "boolean"
          },
          "xmlTagValue": {
            "type": "boolean"
          },
          "xmlHiddenNested": {
            "type": "boolean"
          },
          "xmlHideRowTag": {
            "type": "boolean"
          },
          "jsonArray": {
            "type": "boolean"
          },
          "jsonArrayNotStrings": {
            "type": "boolean"
          }
        }
      },
      "Transformation": {
        "type": "object",
        "description": "One source-to-destination transformation.",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "sourceConnection": {
            "type": "integer",
            "format": "int64"
          },
          "sourceFormat": {
            "type": "integer",
            "format": "int64"
          },
          "sourceName": {
            "type": "string"
          },
          "sourceQuery": {
            "type": "string"
          },
          "sourceSqlIsScript": {
            "type": "boolean"
          },
          "destinationConnection": {
            "type": "integer",
            "format": "int64"
          },
          "destinationFormat": {
            "type": "integer",
            "format": "int64"
          },
          "destinationName": {
            "type": "string"
          },
          "destinationQuery": {
            "type": "string"
          },
          "destinationSqlIsScript": {
            "type": "boolean"
          },
          "mappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Mapping"
            }
          },
          "properties": {
            "type": "object",
            "additionalProperties": true,
            "description": "Transformation settings keyed by descriptor parameter key."
          }
        }
      },
      "NestedFlow": {
        "type": "object",
        "description": "A step in a nested (workflow) flow.",
        "properties": {
          "flowId": {
            "type": "integer",
            "format": "int64"
          },
          "index": {
            "type": "integer",
            "format": "int64",
            "description": "Position in the parent flow."
          },
          "enabled": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "condition": {
            "type": "string"
          },
          "conditionLanguage": {
            "type": "string"
          },
          "controlAction": {
            "type": "string"
          },
          "controlCondition": {
            "type": "string"
          },
          "controlConditionLanguage": {
            "type": "string"
          },
          "controlTargetIndex": {
            "type": "integer",
            "format": "int64"
          },
          "loop": {
            "type": "string"
          },
          "loopType": {
            "type": "integer",
            "format": "int32"
          },
          "loopLanguage": {
            "type": "string"
          },
          "loopConnectionId": {
            "type": "integer",
            "format": "int64"
          },
          "loopSqlIsScript": {
            "type": "boolean"
          },
          "traverseSubfolders": {
            "type": "boolean"
          },
          "parallel": {
            "type": "boolean"
          },
          "maxIterations": {
            "type": "integer",
            "format": "int32"
          },
          "loopThreads": {
            "type": "integer",
            "format": "int32"
          },
          "retries": {
            "type": "integer",
            "format": "int64"
          },
          "retriesDelay": {
            "type": "integer",
            "format": "int64"
          },
          "timeout": {
            "type": "string"
          },
          "timeoutType": {
            "type": "string"
          },
          "uiCanvasX": {
            "type": "number",
            "format": "double"
          },
          "uiCanvasY": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "Flow": {
        "type": "object",
        "description": "A flow. `PUT` replaces the whole object, so read it, change it, and send it back.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "flowType": {
            "type": "string",
            "description": "Flow type descriptor key, for example `flow.api.api`. See `GET /v1/di/metadata/flows`."
          },
          "properties": {
            "type": "object",
            "additionalProperties": true,
            "description": "Connector-specific settings keyed by descriptor parameter key (for example `field.connection.template.host`). The valid keys for a given type are published by `GET /v1/di/metadata/{type}/{key}`."
          },
          "transformations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transformation"
            }
          },
          "mappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Mapping"
            }
          },
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowConnectionRef"
            }
          },
          "nestedFlows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NestedFlow"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form tags."
          },
          "enabledSchedules": {
            "type": "integer",
            "format": "int64",
            "readOnly": true,
            "description": "Number of enabled schedules for this flow."
          },
          "disabledSchedules": {
            "type": "integer",
            "format": "int64",
            "readOnly": true,
            "description": "Number of disabled schedules for this flow."
          },
          "executed": {
            "type": "string",
            "readOnly": true
          },
          "listener": {
            "type": "boolean",
            "readOnly": true
          },
          "childFlow": {
            "type": "boolean",
            "readOnly": true
          },
          "composerMeta": {
            "type": "object",
            "additionalProperties": true,
            "description": "Composer canvas metadata."
          },
          "compiledGraph": {
            "type": "object",
            "additionalProperties": true,
            "description": "Composer compiled graph."
          },
          "hasComposerConversation": {
            "type": "boolean",
            "readOnly": true
          },
          "uiCanvasVersion": {
            "type": "integer",
            "format": "int32"
          },
          "uiCanvasViewportX": {
            "type": "number",
            "format": "double"
          },
          "uiCanvasViewportY": {
            "type": "number",
            "format": "double"
          },
          "uiCanvasViewportZ": {
            "type": "number",
            "format": "double"
          },
          "createdBy": {
            "type": "string",
            "readOnly": true,
            "description": "Login of the user who created it."
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "description": "Creation time. Unix epoch milliseconds.",
            "readOnly": true
          },
          "modifiedBy": {
            "type": "string",
            "readOnly": true,
            "description": "Login of the user who last modified it."
          },
          "modified": {
            "type": "integer",
            "format": "int64",
            "description": "Last modification time. Unix epoch milliseconds.",
            "readOnly": true
          },
          "modifiedMessage": {
            "type": "string",
            "description": "Commit-style message saved with this version."
          }
        }
      },
      "FlowExecutionResponse": {
        "type": "object",
        "properties": {
          "flowId": {
            "type": "integer",
            "format": "int64"
          },
          "auditId": {
            "type": "integer",
            "format": "int64",
            "description": "Identifies this execution. Keep it to poll status."
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "Start outcome, not run progress: `0` started, `1` already running, `2` canceled, `3` was not running, `4` success, `5` error, `10` handed to an Integration Agent. Poll `GET /v1/executions/{flowId}?auditId=` for progress."
          },
          "exception": {
            "type": "string",
            "description": "Error text when the flow could not start."
          }
        }
      },
      "FlowAuditRecord": {
        "type": "object",
        "description": "One execution. Null fields are omitted.",
        "properties": {
          "auditId": {
            "type": "integer",
            "format": "int64"
          },
          "parentAuditId": {
            "type": "integer",
            "format": "int64",
            "description": "Set when run as a step of a nested flow."
          },
          "retries": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Audit ids of retry attempts."
          },
          "flowId": {
            "type": "integer",
            "format": "int64"
          },
          "flowName": {
            "type": "string"
          },
          "flowType": {
            "type": "string"
          },
          "eventId": {
            "type": "integer",
            "format": "int64"
          },
          "eventName": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "agentName": {
            "type": "string"
          },
          "agentVersion": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "messageId": {
            "type": "string"
          },
          "tenantId": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "$ref": "#/components/schemas/FlowStatus"
          },
          "triggerType": {
            "type": "string"
          },
          "startedBy": {
            "type": "string"
          },
          "started": {
            "type": "integer",
            "format": "int64",
            "description": "Start time. Unix epoch milliseconds."
          },
          "ended": {
            "type": "integer",
            "format": "int64",
            "description": "End time. Unix epoch milliseconds."
          },
          "duration": {
            "type": "string",
            "description": "Human-readable duration."
          },
          "code": {
            "type": "string"
          },
          "exception": {
            "type": "string"
          },
          "warnings": {
            "type": "string"
          },
          "metrics": {
            "type": "string",
            "description": "Per-transformation metrics, JSON-encoded."
          },
          "fileMetrics": {
            "type": "string",
            "description": "Per-file metrics, JSON-encoded."
          },
          "executionTrace": {
            "type": "string"
          },
          "failureExecutionPath": {
            "type": "string"
          },
          "errorLocationInSql": {
            "type": "string"
          },
          "hasDbtResults": {
            "type": "boolean"
          },
          "fileName": {
            "type": "string"
          },
          "records": {
            "type": "integer",
            "format": "int64"
          },
          "debug": {
            "type": "boolean"
          },
          "zombieProcessTimestamp": {
            "type": "integer",
            "format": "int64"
          },
          "retryPending": {
            "type": "boolean"
          }
        }
      },
      "FlowAuditRecordLight": {
        "type": "object",
        "properties": {
          "auditId": {
            "type": "integer",
            "format": "int64"
          },
          "parentAuditId": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "$ref": "#/components/schemas/FlowStatus"
          },
          "startedBy": {
            "type": "string"
          },
          "triggerType": {
            "type": "string"
          },
          "started": {
            "type": "integer",
            "format": "int64",
            "description": "Start time. Unix epoch milliseconds."
          },
          "description": {
            "type": "string"
          },
          "retryPending": {
            "type": "boolean"
          }
        }
      },
      "RunningTask": {
        "type": "object",
        "description": "A transformation in flight inside a running execution.",
        "properties": {
          "requestId": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "started": {
            "type": "integer",
            "format": "int64",
            "description": "Start time. Unix epoch milliseconds."
          },
          "duration": {
            "type": "integer",
            "format": "int64",
            "description": "Milliseconds."
          },
          "latency": {
            "type": "integer",
            "format": "int64"
          },
          "maxLatency": {
            "type": "integer",
            "format": "int64"
          },
          "minLatency": {
            "type": "integer",
            "format": "int64"
          },
          "avgLatency": {
            "type": "integer",
            "format": "int64"
          },
          "recordsProcessed": {
            "type": "integer",
            "format": "int64"
          },
          "recordsProcessedSinceLastCheck": {
            "type": "integer",
            "format": "int64"
          },
          "lastCheck": {
            "type": "integer",
            "format": "int64",
            "description": "Time of the last progress check. Unix epoch milliseconds."
          },
          "lastTimeRecordsReceivedDate": {
            "type": "integer",
            "format": "int64",
            "description": "Time records were last received. Unix epoch milliseconds."
          },
          "messagesPerSecond": {
            "type": "integer",
            "format": "int64"
          },
          "lag": {
            "type": "integer",
            "format": "int64"
          },
          "maxLag": {
            "type": "integer",
            "format": "int64"
          },
          "snapshot": {
            "type": "string"
          },
          "readerName": {
            "type": "string"
          },
          "previousReaderName": {
            "type": "string"
          }
        }
      },
      "FlowParameter": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "secure": {
            "type": "boolean",
            "description": "Masked in the UI and logs."
          }
        }
      },
      "FlowSchedule": {
        "type": "object",
        "description": "A schedule. Create requires `flowId`, `name` and `schedule`.",
        "required": [
          "flowId",
          "name",
          "schedule"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form tags."
          },
          "flowId": {
            "type": "integer",
            "format": "int64",
            "description": "The flow this schedule runs."
          },
          "flowName": {
            "type": "string",
            "readOnly": true
          },
          "flowDescription": {
            "type": "string",
            "readOnly": true
          },
          "flowType": {
            "type": "string",
            "readOnly": true
          },
          "flowTypeIcon": {
            "type": "string",
            "readOnly": true
          },
          "flowDashboard": {
            "type": "string",
            "readOnly": true
          },
          "enabled": {
            "type": "boolean"
          },
          "schedule": {
            "type": "string",
            "description": "A number of seconds runs on a timer; a cron expression runs on that schedule; `listener` and `realtime` are reserved values."
          },
          "delaySchedule": {
            "type": "boolean"
          },
          "scheduleExcludes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "enableAfter": {
            "type": "integer",
            "format": "int64",
            "description": "Do not run before this time. Unix epoch milliseconds."
          },
          "disableAfter": {
            "type": "integer",
            "format": "int64",
            "description": "Do not run after this time. Unix epoch milliseconds."
          },
          "serverTimezone": {
            "type": "string"
          },
          "disableOnException": {
            "type": "boolean"
          },
          "retries": {
            "type": "integer",
            "format": "int64"
          },
          "delayBetweenRetries": {
            "type": "integer",
            "format": "int64"
          },
          "retryExceptionInclude": {
            "type": "string"
          },
          "retryExceptionExclude": {
            "type": "string"
          },
          "expectedTime": {
            "type": "integer",
            "format": "int64"
          },
          "stopTime": {
            "type": "integer",
            "format": "int64"
          },
          "debug": {
            "type": "boolean"
          },
          "logStep": {
            "type": "integer",
            "format": "int64"
          },
          "force": {
            "type": "boolean"
          },
          "noRunningFlows": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Do not start while any of these flows is running."
          },
          "flowParameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowParameter"
            }
          },
          "emailSuccess": {
            "type": "boolean"
          },
          "emailFailure": {
            "type": "boolean"
          },
          "emailLastFailure": {
            "type": "boolean"
          },
          "emailMetrics": {
            "type": "boolean"
          },
          "emailParams": {
            "type": "boolean"
          },
          "emails": {
            "type": "string",
            "description": "Comma-separated recipients."
          },
          "disableExecutionNotifications": {
            "type": "boolean"
          },
          "repeatExpectedTimeNotifications": {
            "type": "boolean"
          },
          "additionalMessage": {
            "type": "string"
          },
          "keepMessage": {
            "type": "boolean"
          },
          "keepEmptyAudit": {
            "type": "boolean"
          },
          "scriptOnResponse": {
            "type": "string"
          },
          "started": {
            "type": "integer",
            "format": "int64",
            "description": "When the current run started. Unix epoch milliseconds.",
            "readOnly": true
          },
          "runStatus": {
            "type": "string",
            "readOnly": true
          },
          "flowSummaryStatus": {
            "type": "string",
            "readOnly": true
          },
          "statusAuditId": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "retryPending": {
            "type": "boolean",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "readOnly": true
          },
          "listener": {
            "type": "boolean",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "readOnly": true,
            "description": "Login of the user who created it."
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "description": "Creation time. Unix epoch milliseconds.",
            "readOnly": true
          },
          "modifiedBy": {
            "type": "string",
            "readOnly": true,
            "description": "Login of the user who last modified it."
          },
          "modified": {
            "type": "integer",
            "format": "int64",
            "description": "Last modification time. Unix epoch milliseconds.",
            "readOnly": true
          },
          "modifiedMessage": {
            "type": "string",
            "description": "Commit-style message saved with this version."
          }
        }
      },
      "ScheduleLight": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "schedule": {
            "type": "string"
          },
          "delaySchedule": {
            "type": "boolean"
          },
          "listener": {
            "type": "boolean"
          },
          "serverTimezone": {
            "type": "string"
          },
          "started": {
            "type": "integer",
            "format": "int64",
            "description": "When the current run started. Unix epoch milliseconds."
          },
          "runStatus": {
            "type": "string"
          },
          "flowSummaryStatus": {
            "type": "string"
          },
          "statusAuditId": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ConnectionObject": {
        "type": "object",
        "description": "A connection or a listener.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "connectionType": {
            "type": "string",
            "description": "Connection type descriptor key, for example `connection.db.postgres`. Listeners use keys that start with `listener`."
          },
          "properties": {
            "type": "object",
            "additionalProperties": true,
            "description": "Connector-specific settings keyed by descriptor parameter key (for example `field.connection.template.host`). The valid keys for a given type are published by `GET /v1/di/metadata/{type}/{key}`. Credentials are returned redacted."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form tags."
          },
          "expFormatId": {
            "type": "integer",
            "format": "int64"
          },
          "createdBy": {
            "type": "string",
            "readOnly": true,
            "description": "Login of the user who created it."
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "description": "Creation time. Unix epoch milliseconds.",
            "readOnly": true
          },
          "modifiedBy": {
            "type": "string",
            "readOnly": true,
            "description": "Login of the user who last modified it."
          },
          "modified": {
            "type": "integer",
            "format": "int64",
            "description": "Last modification time. Unix epoch milliseconds.",
            "readOnly": true
          },
          "modifiedMessage": {
            "type": "string",
            "description": "Commit-style message saved with this version."
          }
        }
      },
      "FormatObject": {
        "type": "object",
        "description": "A file or message format.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "formatType": {
            "type": "string",
            "description": "Format type descriptor key, for example `format.text.csv`."
          },
          "properties": {
            "type": "object",
            "additionalProperties": true,
            "description": "Connector-specific settings keyed by descriptor parameter key (for example `field.connection.template.host`). The valid keys for a given type are published by `GET /v1/di/metadata/{type}/{key}`."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form tags."
          },
          "createdBy": {
            "type": "string",
            "readOnly": true,
            "description": "Login of the user who created it."
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "description": "Creation time. Unix epoch milliseconds.",
            "readOnly": true
          },
          "modifiedBy": {
            "type": "string",
            "readOnly": true,
            "description": "Login of the user who last modified it."
          },
          "modified": {
            "type": "integer",
            "format": "int64",
            "description": "Last modification time. Unix epoch milliseconds.",
            "readOnly": true
          },
          "modifiedMessage": {
            "type": "string",
            "description": "Commit-style message saved with this version."
          }
        }
      },
      "BulkAction": {
        "type": "object",
        "description": "One bulk action. `delete` applies to flows, connections, formats and listeners; `execute` to flows only.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "name.prefix",
              "name.suffix",
              "name.regex",
              "tags.add",
              "tags.remove",
              "tags.set",
              "delete",
              "execute"
            ],
            "description": "What to do."
          },
          "value": {
            "type": "string",
            "description": "Prefix or suffix text for `name.prefix` / `name.suffix`."
          },
          "pattern": {
            "type": "string",
            "description": "Regular expression for `name.regex`."
          },
          "replacement": {
            "type": "string",
            "description": "Replacement for `name.regex`."
          },
          "ignoreCase": {
            "type": "boolean",
            "description": "Case-insensitive match for `name.regex`."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for the `tags.*` actions."
          }
        }
      },
      "FlowBulkActionRequest": {
        "type": "object",
        "required": [
          "flowIds",
          "actions"
        ],
        "properties": {
          "flowIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkAction"
            }
          },
          "modifiedMessage": {
            "type": "string"
          }
        }
      },
      "FlowBulkActionResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "totalFlows": {
            "type": "integer",
            "format": "int32"
          },
          "updatedFlows": {
            "type": "integer",
            "format": "int32"
          },
          "deletedFlows": {
            "type": "integer",
            "format": "int32"
          },
          "updatedFlowIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "deletedFlowIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          }
        }
      },
      "ScheduleBulkActionRequest": {
        "type": "object",
        "required": [
          "scheduleIds",
          "actions"
        ],
        "properties": {
          "scheduleIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkAction"
            }
          },
          "modifiedMessage": {
            "type": "string"
          }
        }
      },
      "ScheduleBulkActionResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "totalSchedules": {
            "type": "integer",
            "format": "int32"
          },
          "updatedSchedules": {
            "type": "integer",
            "format": "int32"
          },
          "updatedScheduleIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          }
        }
      },
      "IOBulkActionRequest": {
        "type": "object",
        "required": [
          "ioIds",
          "actions"
        ],
        "properties": {
          "ioIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Connection, format or listener ids."
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkAction"
            }
          },
          "modifiedMessage": {
            "type": "string"
          }
        }
      },
      "IOBulkActionResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "updatedItems": {
            "type": "integer",
            "format": "int32"
          },
          "deletedItems": {
            "type": "integer",
            "format": "int32"
          },
          "updatedItemIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "deletedItemIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          }
        }
      },
      "ImportRequest": {
        "type": "object",
        "required": [
          "dump"
        ],
        "properties": {
          "dump": {
            "type": "string",
            "writeOnly": true,
            "description": "The export bundle produced by an export endpoint."
          },
          "flowsToImport": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "connectionsToImport": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "formatsToImport": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "replacementMap": {
            "type": "object",
            "additionalProperties": true,
            "description": "Remaps ids in the bundle to existing objects."
          },
          "collisionPolicy": {
            "type": "string",
            "enum": [
              "Add",
              "Replace",
              "Keep",
              "Keep All, Replace Flows and Macros"
            ],
            "description": "What to do when an object already exists."
          },
          "extraTags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags added to every imported object."
          },
          "importSchedules": {
            "type": "boolean"
          },
          "importCredentials": {
            "type": "boolean"
          },
          "ignoreRequiredProperties": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ImportPreview": {
        "type": "object",
        "description": "What an import would create, replace or keep, with the dependency graph between flows, connections, formats, schedules and macros.",
        "additionalProperties": true
      },
      "ImportReport": {
        "type": "object",
        "properties": {
          "failed": {
            "type": "boolean"
          },
          "rolledBack": {
            "type": "boolean"
          },
          "nextStepFlowId": {
            "type": "integer",
            "format": "int64"
          },
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "exception": {
            "type": "string"
          }
        }
      },
      "ExportItem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form tags."
          },
          "typeName": {
            "type": "string"
          },
          "listener": {
            "type": "boolean"
          }
        }
      },
      "HistoryRecord": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string"
          },
          "modifiedBy": {
            "type": "string"
          },
          "modified": {
            "type": "integer",
            "format": "int64",
            "description": "Save time. Unix epoch milliseconds."
          },
          "message": {
            "type": "string"
          },
          "messageEditable": {
            "type": "boolean"
          }
        }
      },
      "HistoryMessageUpdateRequest": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "previousMessage": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "DiffLine": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "oldNum": {
            "type": "integer",
            "format": "int32"
          },
          "oldLine": {
            "type": "string"
          },
          "newNum": {
            "type": "integer",
            "format": "int32"
          },
          "newLine": {
            "type": "string"
          }
        }
      },
      "FlowReference": {
        "type": "object",
        "description": "Something that references a flow: a schedule, a parent flow or a listener.",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          }
        }
      },
      "IOReference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          }
        }
      },
      "InspectResponse": {
        "type": "object",
        "description": "Flow Findings for a flow definition.",
        "properties": {
          "severity": {
            "type": "string",
            "description": "Worst severity found."
          },
          "flowIssues": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One finding.",
              "additionalProperties": true
            }
          }
        }
      },
      "FlowDocumentationResponse": {
        "type": "object",
        "properties": {
          "documentation": {
            "type": "string",
            "description": "Markdown."
          },
          "diagram": {
            "type": "string"
          }
        }
      },
      "EtlServiceResponse": {
        "type": "object",
        "description": "Result of a connection test. Additional diagnostic fields may be present.",
        "properties": {
          "retCode": {
            "type": "integer",
            "format": "int32",
            "description": "0 on success."
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "exception": {
            "type": "string"
          },
          "warnings": {
            "type": "string"
          },
          "startTime": {
            "type": "integer",
            "format": "int64",
            "description": "Start time. Unix epoch milliseconds."
          },
          "endTime": {
            "type": "integer",
            "format": "int64",
            "description": "End time. Unix epoch milliseconds."
          },
          "response": {
            "type": "string"
          },
          "responseHttpCode": {
            "type": "integer",
            "format": "int32"
          },
          "responseHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ObjectsResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "boolean"
          },
          "objects": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "A table, view, file, endpoint or other object.",
              "additionalProperties": true
            }
          }
        }
      },
      "FieldsRequest": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "description": "Object name."
          },
          "sql": {
            "type": "string"
          },
          "explorerPath": {
            "type": "boolean"
          },
          "explorerParameters": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "FieldsResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "boolean"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "A column or field with its type.",
              "additionalProperties": true
            }
          }
        }
      },
      "SqlRequest": {
        "type": "object",
        "required": [
          "connectionId",
          "sql"
        ],
        "properties": {
          "connectionId": {
            "type": "integer",
            "format": "int64"
          },
          "formatId": {
            "type": "integer",
            "format": "int64"
          },
          "object": {
            "type": "string"
          },
          "sql": {
            "type": "string"
          },
          "script": {
            "type": "boolean",
            "description": "Run as a multi-statement script."
          },
          "parameters": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "DataElement": {
        "type": "object",
        "properties": {
          "json": {
            "type": "string",
            "description": "Result set, JSON-encoded."
          },
          "dataSet": {
            "type": "object",
            "description": "Result set.",
            "additionalProperties": true
          },
          "message": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          }
        }
      },
      "DataResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataElement"
            }
          },
          "executionId": {
            "type": "string"
          },
          "logAvailable": {
            "type": "boolean"
          }
        }
      },
      "Macro": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form tags."
          },
          "star": {
            "type": "boolean"
          },
          "createdBy": {
            "type": "string",
            "readOnly": true,
            "description": "Login of the user who created it."
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "description": "Creation time. Unix epoch milliseconds.",
            "readOnly": true
          },
          "modifiedBy": {
            "type": "string",
            "readOnly": true,
            "description": "Login of the user who last modified it."
          },
          "modified": {
            "type": "integer",
            "format": "int64",
            "description": "Last modification time. Unix epoch milliseconds.",
            "readOnly": true
          },
          "modifiedMessage": {
            "type": "string",
            "description": "Commit-style message saved with this version."
          }
        }
      },
      "MacroLight": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form tags."
          },
          "star": {
            "type": "boolean"
          }
        }
      },
      "MacroUsage": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          }
        }
      },
      "FunctionTemplate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "template": {
            "type": "string"
          },
          "defaultFunction": {
            "type": "boolean"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          },
          "star": {
            "type": "boolean"
          }
        }
      },
      "Template": {
        "type": "object",
        "description": "A flow template. Shape follows the template catalog and is not versioned.",
        "additionalProperties": true
      },
      "KeyValuePair": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "Webhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Event type names as displayed, for example `Flow.Failed`, `Flow.Executed`, `Flow.Warning`, `Connection.Updated`; or `*` for all. Unknown names are rejected with 400. `GET /v1/webhooks/metadata` lists the allowed values."
          },
          "url": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyValuePair"
            }
          },
          "emails": {
            "type": "string"
          },
          "includeEntity": {
            "type": "boolean"
          },
          "payloadTemplate": {
            "type": "string"
          },
          "secret": {
            "type": "string",
            "writeOnly": true,
            "description": "When set, each delivery carries an HMAC-SHA1 signature of the payload in the `X-Etl-Webhook-Signature` header. Treat as a credential."
          },
          "basicUser": {
            "type": "string"
          },
          "basicPass": {
            "type": "string",
            "writeOnly": true,
            "description": "Treat as a credential."
          },
          "flowIncludes": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "flowExcludes": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "WebhookEventLight": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "statusCode": {
            "type": "integer",
            "format": "int64"
          },
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "Delivery time. Unix epoch milliseconds."
          }
        }
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "entityId": {
            "type": "integer",
            "format": "int64"
          },
          "webhookId": {
            "type": "integer",
            "format": "int64"
          },
          "url": {
            "type": "string"
          },
          "emails": {
            "type": "string"
          },
          "payload": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "status": {
            "type": "string"
          },
          "exception": {
            "type": "string"
          },
          "responseStatus": {
            "type": "integer",
            "format": "int64"
          },
          "responseHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "createdDate": {
            "type": "integer",
            "format": "int64",
            "description": "Created. Unix epoch milliseconds."
          },
          "modifiedDate": {
            "type": "integer",
            "format": "int64",
            "description": "Last updated. Unix epoch milliseconds."
          }
        }
      },
      "Message": {
        "type": "object",
        "description": "A message received by a listener. Keys are abbreviated on the wire.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Message id."
          },
          "st": {
            "type": "string",
            "description": "Status."
          },
          "usr": {
            "type": "string",
            "description": "User name."
          },
          "rcd": {
            "type": "string",
            "description": "Received timestamp."
          },
          "upd": {
            "type": "string",
            "description": "Updated timestamp."
          },
          "ip": {
            "type": "string",
            "description": "Sender IP."
          },
          "sz": {
            "type": "integer",
            "format": "int64",
            "description": "Size in bytes."
          },
          "ft": {
            "type": "string",
            "description": "Format."
          },
          "sn": {
            "type": "string",
            "description": "Schedule name."
          },
          "fi": {
            "type": "integer",
            "format": "int64",
            "description": "Flow id."
          },
          "ai": {
            "type": "integer",
            "format": "int64",
            "description": "Audit id."
          }
        }
      },
      "MessagesFilter": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "sender": {
            "type": "string"
          },
          "format": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "scheduleName": {
            "type": "string"
          },
          "fromDate": {
            "type": "string"
          },
          "toDate": {
            "type": "string"
          },
          "comparator": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "sizeType": {
            "type": "string"
          }
        }
      },
      "CliRequest": {
        "type": "object",
        "required": [
          "command"
        ],
        "properties": {
          "command": {
            "type": "string",
            "description": "One or more CLI commands."
          },
          "vars": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Variables available to the commands."
          },
          "tenant": {
            "type": "string",
            "description": "Tenant to run in, for multi-tenant accounts."
          }
        }
      },
      "CliResponse": {
        "type": "object",
        "properties": {
          "command": {
            "type": "string"
          },
          "stdout": {
            "type": "string"
          },
          "stderr": {
            "type": "string"
          },
          "exitCode": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CliCommandInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "usage": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "requiresConfirmation": {
            "type": "boolean"
          }
        }
      },
      "SearchItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "integer",
            "format": "int64"
          },
          "type": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "score": {
            "type": "number",
            "format": "float"
          }
        }
      },
      "SearchRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "connection",
              "format",
              "flow",
              "schedule",
              "webhook",
              "agent",
              "macro",
              "template"
            ],
            "description": "Object type to search."
          },
          "includeTags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excludeTags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AuditUiRecord": {
        "type": "object",
        "description": "One API audit record. Keys are abbreviated on the wire.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "md": {
            "type": "string",
            "description": "Method."
          },
          "ur": {
            "type": "string",
            "description": "User login."
          },
          "tn": {
            "type": "string",
            "description": "Tenant name."
          },
          "rt": {
            "type": "boolean",
            "description": "Result flag."
          },
          "in": {
            "type": "boolean",
            "description": "Has info."
          },
          "pr": {
            "type": "boolean",
            "description": "Has parameters."
          },
          "ex": {
            "type": "string",
            "description": "Exception details."
          },
          "hip": {
            "type": "string",
            "description": "Host IP."
          },
          "cip": {
            "type": "string",
            "description": "Client IP."
          },
          "dn": {
            "type": "integer",
            "format": "int64",
            "description": "Duration in milliseconds."
          },
          "dt": {
            "type": "string",
            "description": "Date."
          }
        }
      },
      "AuditUiRecordsFilter": {
        "type": "object",
        "properties": {
          "fromDate": {
            "type": "string",
            "format": "date",
            "description": "ISO-8601 date, for example `2026-09-15`."
          },
          "toDate": {
            "type": "string",
            "format": "date",
            "description": "ISO-8601 date."
          },
          "fromTime": {
            "type": "string",
            "description": "`HH:mm:ss` or `hh:mm:ss a`."
          },
          "toTime": {
            "type": "string",
            "description": "`HH:mm:ss` or `hh:mm:ss a`."
          },
          "method": {
            "type": "string"
          },
          "parameters": {
            "type": "string"
          },
          "exception": {
            "type": "string"
          },
          "user": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "duration": {
            "type": "integer",
            "format": "int64"
          },
          "clientIp": {
            "type": "string"
          }
        }
      },
      "RecycleBinItem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "subType": {
            "type": "string"
          },
          "deleted": {
            "type": "integer",
            "format": "int64",
            "description": "Deletion time. Unix epoch milliseconds."
          },
          "deletedBy": {
            "type": "string"
          },
          "canRestore": {
            "type": "boolean"
          },
          "restoreBlockedReason": {
            "type": "string"
          }
        }
      },
      "RecycleBinRestoreResult": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "restored": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reused": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "blocked": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
