{
  "openapi": "3.0.1",
  "info": {
    "title": "Answer Drift Planner: Knowledge Base Change Review",
    "description": "See which linked answers and tests need review after knowledge-base updates. Compare prepared inventories and supplied retest results; no code or answer-quality review.",
    "version": "0.2",
    "x-build-id": "rsk8ftm8vr7UgdhCl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/critd~answer-drift-planner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-critd-answer-drift-planner",
        "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/critd~answer-drift-planner/runs": {
      "post": {
        "operationId": "runs-sync-critd-answer-drift-planner",
        "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/critd~answer-drift-planner/run-sync": {
      "post": {
        "operationId": "run-sync-critd-answer-drift-planner",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Choose your review",
            "enum": [
              "example",
              "review"
            ],
            "type": "string",
            "description": "$0.25 per completed report plus $0.00005 per start, including the example. Missing evidence is a billable completed review. Use Review my files for any changed content or controls.",
            "default": "example"
          },
          "format": {
            "title": "Prepared file format",
            "enum": [
              "mappedCsv",
              "strictJson"
            ],
            "type": "string",
            "description": "CSV uses before, after, items, links and mapping. Strict JSON uses before, after and dependencies; clear items, links and mapping when switching to it. No inferred conversion.",
            "default": "mappedCsv"
          },
          "before": {
            "title": "Earlier knowledge-source inventory",
            "type": "string",
            "description": "Paste prepared file contents. The fictional CSV prefill is a template. Keep exact document/section/product/version/locale/visibility IDs and explicit dependency links; no source text, credentials or private URLs. Combined input including controls and capture metadata is limited to 8 MiB."
          },
          "after": {
            "title": "Later knowledge-source inventory",
            "type": "string",
            "description": "Paste prepared file contents. The fictional CSV prefill is a template. Keep exact document/section/product/version/locale/visibility IDs and explicit dependency links; no source text, credentials or private URLs. Combined input including controls and capture metadata is limited to 8 MiB."
          },
          "items": {
            "title": "Answers, citations and tests",
            "type": "string",
            "description": "Paste prepared file contents. The fictional CSV prefill is a template. Keep exact document/section/product/version/locale/visibility IDs and explicit dependency links; no source text, credentials or private URLs. Combined input including controls and capture metadata is limited to 8 MiB."
          },
          "links": {
            "title": "Supplied dependency links",
            "type": "string",
            "description": "Paste prepared file contents. The fictional CSV prefill is a template. Keep exact document/section/product/version/locale/visibility IDs and explicit dependency links; no source text, credentials or private URLs. Combined input including controls and capture metadata is limited to 8 MiB."
          },
          "mapping": {
            "title": "CSV column mapping and capture metadata",
            "type": "object",
            "description": "Required for mapped CSV: explicitly select each source column and canonical target; declare null_token and both captures with capture_id, scope_id, captured_at and capture_state (complete, partial or failed). Maximum 64 KiB. Clear this object entirely for strict JSON. No inferred links or completeness."
          },
          "retestReview": {
            "title": "Retest evidence review (optional)",
            "type": "object",
            "description": "See which retest results belong to this change. Optional in Review my files: supply contract answer-retest-evidence-v1, expectedTests with exact scoped test keys and explicit definitionRevision, and receipts (empty to prepare a request). Download RETEST_REQUEST.json from the report; it is a request, not a submitted result. Returned receipts include receiptId, test, definitionRevision, contextFingerprint, declaredResult (pass, fail, inconclusive or not_run) and executedAt when known. Maximum 1,000 receipts and the existing 8 MiB combined input limit. This compares supplied records; it does not run tests or approve a release. A later run reviewing returned results is another paid report at the normal price."
          },
          "dependencies": {
            "title": "Strict JSON dependencies (JSON route only)",
            "type": "string",
            "description": "Strict JSON only: {\"items\":[scoped item keys],\"links\":[{\"from_source\":scoped source key or null,\"from_item\":scoped item key or null,\"to\":scoped item key}]}. Item keys: id,kind(citation/answer/test),product,version,locale,visibility. Source keys: document,section,product,version,locale,visibility. Exactly one from_source/from_item per link. Earlier/later inventory JSON requires capture_id,scope_id,captured_at,capture_state,records; each record requires key,content_hash,evidence_hash,source_revision,extractor_version,validity. Unknown hashes may be null. Clear CSV items, links and mapping."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}