{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-appflow/refs/heads/main/json-schema/appflow-flow-execution-schema.json",
  "title": "FlowExecution",
  "description": "FlowExecution schema from Amazon AppFlow API",
  "type": "object",
  "properties": {
    "executionId": {
      "type": "string",
      "example": "exec-500123",
      "description": "Specifies the identifier of the given flow run."
    },
    "executionStatus": {
      "type": "string",
      "enum": [
        "InProgress",
        "Successful",
        "Error",
        "CancelStarted",
        "Canceled"
      ],
      "example": "Successful",
      "description": "Specifies the flow run status and whether it is in progress, has completed successfully, or has failed."
    },
    "executionResult": {
      "type": "object",
      "properties": {
        "errorInfo": {
          "type": "object",
          "description": "Provides any error message information related to the flow run."
        },
        "bytesProcessed": {
          "type": "integer",
          "format": "int64",
          "example": 204800,
          "description": "The total number of bytes processed by the flow run."
        },
        "bytesWritten": {
          "type": "integer",
          "format": "int64",
          "example": 204800,
          "description": "The total number of bytes written as a result of the flow run."
        },
        "recordsProcessed": {
          "type": "integer",
          "format": "int64",
          "example": 1500,
          "description": "The number of records processed in the flow run."
        },
        "numParallelProcesses": {
          "type": "integer",
          "format": "int64",
          "example": 1,
          "description": "The number of processes that Amazon AppFlow ran at the same time when it retrieved your data."
        }
      }
    },
    "startedAt": {
      "type": "integer",
      "format": "int64",
      "example": 1718153645993,
      "description": "Specifies the start timestamp for your flow run."
    },
    "lastUpdatedAt": {
      "type": "integer",
      "format": "int64",
      "example": 1718153700000,
      "description": "Specifies the time of the most recent update."
    },
    "dataPullStartTime": {
      "type": "integer",
      "format": "int64",
      "example": 1718153645993,
      "description": "The timestamp that determines the first new or updated record to be transferred in the flow run."
    },
    "dataPullEndTime": {
      "type": "integer",
      "format": "int64",
      "example": 1718153700000,
      "description": "The timestamp that determines the last new or updated record to be transferred in the flow run."
    }
  }
}