{
  "openapi": "3.0.1",
  "info": {
    "title": "Evidence Review Workflow - Receipt-Bound Queue",
    "description": "Turn government-data evidence receipts into deterministic review cases with customer-owned dispositions, immutable history, priority handling, and tamper-evident queue receipts. No autonomous clearance or eligibility decision.",
    "version": "0.1",
    "x-build-id": "fsLLZ2MoVkqyYDwD9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/civicdataforge~evidence-review-workflow/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-civicdataforge-evidence-review-workflow",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/civicdataforge~evidence-review-workflow/runs": {
      "post": {
        "operationId": "runs-sync-civicdataforge-evidence-review-workflow",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/civicdataforge~evidence-review-workflow/run-sync": {
      "post": {
        "operationId": "run-sync-civicdataforge-evidence-review-workflow",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "cases"
        ],
        "properties": {
          "observedAt": {
            "title": "Queue observation time",
            "type": "string",
            "description": "Optional ISO-8601 time used to make the queue receipt reproducible."
          },
          "cases": {
            "title": "Evidence cases",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "One to 500 evidence cases. Every case must reference a canonical sha256 evidence receipt.",
            "items": {
              "type": "object",
              "required": [
                "reference",
                "productId",
                "subjectKey",
                "decision",
                "evidenceReceiptHash",
                "reasonCodes"
              ],
              "properties": {
                "reference": {
                  "title": "Case reference",
                  "description": "Non-sensitive caller reference used to apply later review actions.",
                  "type": "string",
                  "pattern": "^[A-Za-z0-9._:-]{1,100}$"
                },
                "productId": {
                  "title": "Evidence product",
                  "description": "CivicDataForge product that produced the evidence receipt.",
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]{1,79}$"
                },
                "subjectKey": {
                  "title": "Subject key",
                  "description": "Stable non-secret subject key from the upstream evidence record.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "decision": {
                  "title": "Evidence decision",
                  "description": "Upstream evidence state; this workflow never upgrades it into approval or clearance.",
                  "type": "string"
                },
                "evidenceReceiptHash": {
                  "title": "Evidence receipt hash",
                  "description": "Canonical sha256 receipt from the upstream evidence product.",
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "reasonCodes": {
                  "title": "Reason codes",
                  "description": "Structured upstream reasons preserved with the case.",
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 20,
                  "items": {
                    "type": "string",
                    "pattern": "^[A-Z0-9_:-]{1,80}$"
                  }
                },
                "priority": {
                  "title": "Priority",
                  "description": "Optional caller priority; safe defaults are applied when omitted.",
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high",
                    "critical"
                  ]
                },
                "sourceObservedAt": {
                  "title": "Source observation time",
                  "description": "Optional ISO-8601 time reported by the upstream evidence product.",
                  "type": "string"
                }
              }
            }
          },
          "actions": {
            "title": "Disposition actions",
            "maxItems": 1000,
            "type": "array",
            "description": "Optional review decisions. Terminal dispositions cannot be silently overwritten.",
            "items": {
              "type": "object",
              "required": [
                "reference",
                "disposition",
                "reviewerAlias",
                "at"
              ],
              "properties": {
                "reference": {
                  "title": "Case reference",
                  "description": "Reference of the case receiving this action.",
                  "type": "string",
                  "pattern": "^[A-Za-z0-9._:-]{1,100}$"
                },
                "disposition": {
                  "title": "Disposition",
                  "description": "Customer-owned review state; it does not alter the upstream evidence decision.",
                  "type": "string",
                  "enum": [
                    "confirmed_evidence",
                    "dismissed_candidate",
                    "escalated",
                    "insufficient_evidence"
                  ]
                },
                "reviewerAlias": {
                  "title": "Reviewer alias",
                  "description": "Non-personal reviewer or team alias. Do not include email addresses or names.",
                  "type": "string",
                  "pattern": "^[A-Za-z0-9._:-]{1,80}$"
                },
                "at": {
                  "title": "Disposition time",
                  "description": "ISO-8601 time when the customer-owned action occurred.",
                  "type": "string"
                },
                "note": {
                  "title": "Review note",
                  "description": "Short non-sensitive rationale. Do not include personal or confidential data.",
                  "type": "string",
                  "maxLength": 500
                }
              }
            },
            "default": []
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}