{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-swf/json-schema/amazon-swf-list-closed-workflow-executions-input-schema.json",
  "title": "ListClosedWorkflowExecutionsInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-swf-amazon-simple-workflow-service-api-openapi.yml#/components/schemas/ListClosedWorkflowExecutionsInput",
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "description": "The name of the domain that contains the workflow executions to list."
    },
    "startTimeFilter": {
      "$ref": "#/$defs/ExecutionTimeFilter"
    },
    "closeTimeFilter": {
      "$ref": "#/$defs/ExecutionTimeFilter"
    },
    "executionFilter": {
      "$ref": "#/$defs/WorkflowExecutionFilter"
    },
    "closeStatusFilter": {
      "$ref": "#/$defs/CloseStatusFilter"
    },
    "typeFilter": {
      "$ref": "#/$defs/WorkflowTypeFilter"
    },
    "tagFilter": {
      "$ref": "#/$defs/TagFilter"
    },
    "nextPageToken": {
      "type": "string",
      "description": "If NextPageToken is returned there are more results available. The value of NextPageToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return a 400 error: \"Specified token has exceeded its maximum lifetime\". The configured maximumPageSize determines how many results can be returned in a single call."
    },
    "maximumPageSize": {
      "type": "integer",
      "description": "The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results."
    },
    "reverseOrder": {
      "type": "boolean",
      "description": "When set to true, returns the results in reverse order. By default the results are returned in descending order of the start or the close time of the executions."
    }
  },
  "required": [
    "domain"
  ],
  "$defs": {
    "CloseStatusFilter": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "COMPLETED",
            "FAILED",
            "CANCELED",
            "TERMINATED",
            "CONTINUED_AS_NEW",
            "TIMED_OUT"
          ],
          "description": "The close status that must match the close status of an execution for it to meet the criteria of this filter."
        }
      },
      "required": [
        "status"
      ]
    },
    "ExecutionTimeFilter": {
      "type": "object",
      "properties": {
        "oldestDate": {
          "type": "string",
          "format": "date-time",
          "description": "Specifies the oldest start or close date and time to return."
        },
        "latestDate": {
          "type": "string",
          "format": "date-time",
          "description": "Specifies the latest start or close date and time to return."
        }
      },
      "required": [
        "oldestDate"
      ]
    },
    "TagFilter": {
      "type": "object",
      "properties": {
        "tag": {
          "type": "string",
          "description": "Specifies the tag that must be associated with the execution for it to meet the filter criteria. Tags may only contain unicode letters, digits, whitespace, or these symbols: _ . : / = + - @."
        }
      },
      "required": [
        "tag"
      ]
    },
    "WorkflowExecutionFilter": {
      "type": "object",
      "properties": {
        "workflowId": {
          "type": "string",
          "description": "The workflowId to pass of match the criteria of this filter."
        }
      },
      "required": [
        "workflowId"
      ]
    },
    "WorkflowTypeFilter": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the workflow type."
        },
        "version": {
          "type": "string",
          "description": "Version of the workflow type."
        }
      },
      "required": [
        "name"
      ]
    }
  }
}