{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/talend/json-schema/talend-download-request-schema.json",
  "title": "DownloadRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/talend-monitoring-api-openapi.yml#/components/schemas/DownloadRequest",
  "type": "object",
  "required": [
    "category",
    "environmentId"
  ],
  "properties": {
    "environmentId": {
      "type": "string",
      "description": "the ID that identifies the environment in which the execution targeted by the search took place"
    },
    "category": {
      "type": "string",
      "description": "group of execution types\n\n`ETL` includes types:\n- PLAN\n- STANDARD\n- PIPELINE\n- BIG_DATA_BATCH\n- BIG_DATA_STREAMING\n\n`ESB` includes types:\n- ROUTE\n- DATA_SERVICE",
      "enum": [
        "ETL",
        "ESB"
      ]
    },
    "filters": {
      "type": "array",
      "description": "Defined filters for record query",
      "items": {
        "$ref": "#/$defs/FieldFilter"
      }
    },
    "exclude": {
      "type": "string",
      "description": "Excluding certain execution types from the returned results\n\n\n\n`TASK_EXECUTIONS_TRIGGERED_BY_PLAN`: all task executions triggered by plans are excluded, that is to say, the returned executions include all plans and all individual execution tasks of the `ETL`  category that are not triggered by any plan.\n\n`PLAN_EXECUTIONS`: plans are excluded, in other words, the returned executions include all execution tasks of category `ETL`, triggered or not triggered by plans.",
      "default": "TASK_EXECUTIONS_TRIGGERED_BY_PLAN",
      "enum": [
        "PLAN_EXECUTIONS",
        "TASK_EXECUTIONS_TRIGGERED_BY_PLAN"
      ]
    },
    "limit": {
      "type": "number",
      "description": "This is the number of records to be returned on a single page (Page size)",
      "default": 1000,
      "minimum": 1,
      "maximum": 100000
    },
    "lastId": {
      "type": "string",
      "description": "the last execution id of the previous page"
    }
  },
  "$defs": {
    "FieldFilter": {
      "type": "object",
      "required": [
        "field",
        "operator",
        "value"
      ],
      "properties": {
        "field": {
          "type": "string",
          "description": "field names to be used as filtering criteria",
          "enum": [
            "status ( Status of the execution in interest. Sub-status is not taken in account )",
            "workspaceId ( Workspace ID where execution resides )",
            "name ( Execution name )",
            "taskId ( Task execution Identifier )",
            "planId ( Plan execution Identifier )",
            "artifactId ( Artifact Identifier )",
            "artifactVersion ( Artifact Identifier )",
            "tags ( Tag names that have been assigned to the task )",
            "runtime ( Composite search field that consists of following subfields: engineId, clusterId and destination )",
            "period ( Time cut determined by start and end date  within which execution took place )",
            "executeDurationMs ( Duration of execution in milliseconds )",
            "operator ( Operator's login name for `HUMAN` type or ID for `SERVICE` type, that has triggered the execution  )",
            "author (  Author's login name for `HUMAN` type or ID for `SERVICE` type, that owns the task )",
            "version ( Task execution version. `NOTE`: requires taskId filter to be used together with it )",
            "logLevel ( Log level that has been set with the execution. `NOTE`: requires taskId filter to be used together with it )",
            "id (Execution Run Identifier)",
            "runProfileId ( Execution run profile Identifier )",
            "apiVersion (the version of the API through which the execution was triggered)"
          ]
        },
        "operator": {
          "type": "string",
          "description": "Filter operators. They are used to specify criteria for filtering data based on field values, allowing you to narrow down your searches.\n\nThis table explains some specific cases for operators to be used in filters:\n\n| Case | Operator | Restrictions / Recommendations | Constraint |\n| -------- | -------- | -------- | --------- |\n | Search criteria must include or contain the value partially|  `match` / `not_match` | Strictly to be used only with `name` field filter |  The value cannot be less than 3 characters |\n| Search criteria for exact match of a given character sequence |  `in` / `not_in` | Should be always used to filter on IDs | |\n| Inclusive conditions |  `and` | Should be used when the sub-filters of the runtime filter uses inner operator `not_in`| |\n| Exclusive conditions | `or` | Should be used when the sub-filters of the runtime filter uses the inner operator `in` | |\n| Search criteria requires execution within time frame | `between` | Should be used only with the `period` field filter | |\n| Search criteria requires fetching execution duration within time boundaries | `greater_than` / `less_than` | Strictly for use only with field filter `executeDurationMs` | |\n| Searching for the API version of all executions triggered by API or not by API| `is_empty` | Strictly for use only with `apiVersion` field filter| |",
          "writeOnly": true,
          "enum": [
            "in",
            "not_in",
            "match",
            "not_match",
            "or",
            "and",
            "between",
            "greater_than",
            "less_than",
            "is_empty"
          ]
        },
        "value": {
          "type": "object",
          "description": "The table lists the possible values and their usage in filters:\n| Value type | operators |  Comment |\n| -------- | -------- | -------- |\n| Array of values | `in` / `not_in` | type could be string, integers, enum if allowed, and so on |\n| Single value | `match` / `not_match` | it is used only with `name` field filter |\n| Array of FieldFilter objects | `and` / `or` | it is used in `runtime` filed filter only |\n| Array of only 2 values of type  ISO-formatted date | `between` | it is used with `period` field filter and 1-st value represents the starting date, 2-nd value represents the ending date of that time cut |\n| Single boolean value | `is_empty` | `true` for execution that are not triggered by API, `false` for executions triggered by API |"
        }
      }
    }
  }
}