{
  "openapi": "3.0.1",
  "info": {
    "title": "Gerrit Code Review Extractor",
    "description": "Point at any Gerrit code-review server (Android, Chromium, OpenStack, Wikimedia, GerritHub, self-hosted) and get one structured row per change: subject, status, owner, review labels, insertions/deletions, comments and merge history. Also lists projects and server info.",
    "version": "0.1",
    "x-build-id": "jhgifUZzTzamTxXQ6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~gerrit-code-review-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-gerrit-code-review-extractor",
        "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/datamule~gerrit-code-review-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-gerrit-code-review-extractor",
        "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/datamule~gerrit-code-review-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-gerrit-code-review-extractor",
        "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": [
          "sources"
        ],
        "properties": {
          "sources": {
            "title": "Gerrit server URLs",
            "type": "array",
            "description": "One or more Gerrit code-review server base URLs. Every Gerrit server speaks the identical REST API, so one actor works against any of them: https://review.opendev.org (OpenStack), https://review.gerrithub.io (GerritHub), https://gerrit.onap.org , https://gerrit.osmocom.org , or any self-hosted / corporate / university instance. Some servers sit at a /r mount (e.g. https://gerrit.wikimedia.org) — paste either form, the /r path is auto-detected. Anonymous read is on for public servers, so no login is needed. NOTE: a few large Google-hosted servers (android-review / chromium-review / go-review .googlesource.com) and some others block datacenter IP ranges, so they answer locally but not from Apify's cloud — prefer an independent server like review.opendev.org.",
            "default": [
              "https://review.opendev.org"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Run mode",
            "enum": [
              "changes",
              "projects",
              "server"
            ],
            "type": "string",
            "description": "What to extract from each server. changes (default) = one row per code-review change matching the query. projects = the server's project/repository inventory, one row per project. server = one row per server describing its version and authentication model.",
            "default": "changes"
          },
          "query": {
            "title": "Gerrit search query (MODE: changes)",
            "type": "string",
            "description": "CHANGES MODE. The Gerrit search expression passed to /changes/?q=. Defaults to status:open. Supports the full Gerrit query grammar: status:merged, status:abandoned, project:platform/frameworks/base, owner:someone@example.com, branch:main, after:2026-01-01, is:wip, label:Code-Review=+2, and combinations (space = AND, OR for alternatives). Ignored in projects/server mode.",
            "default": "status:open"
          },
          "options": {
            "title": "Detail options (MODE: changes)",
            "type": "array",
            "description": "CHANGES MODE. Extra Gerrit detail options — each ADDS columns and all work anonymously. LABELS adds per-label review scores (Code-Review, Verified, ...) and a submitLabel summary. MESSAGES adds an inline-message count. DETAILED_ACCOUNTS populates the change owner's name. CURRENT_REVISION adds the current commit sha. SUBMITTABLE adds the submittable flag. Reviewer emails and message bodies are kept only inside the lossless _raw field, never as columns.",
            "items": {
              "type": "string",
              "enum": [
                "LABELS",
                "DETAILED_LABELS",
                "MESSAGES",
                "DETAILED_ACCOUNTS",
                "CURRENT_REVISION",
                "SUBMITTABLE",
                "SUBMIT_REQUIREMENTS",
                "WEB_LINKS"
              ],
              "enumTitles": [
                "LABELS (review scores)",
                "DETAILED_LABELS",
                "MESSAGES (count)",
                "DETAILED_ACCOUNTS (owner name)",
                "CURRENT_REVISION (commit sha)",
                "SUBMITTABLE",
                "SUBMIT_REQUIREMENTS",
                "WEB_LINKS"
              ]
            },
            "default": []
          },
          "maxRecords": {
            "title": "Max records (global cap)",
            "minimum": 1,
            "type": "integer",
            "description": "A GLOBAL cap on the number of rows to emit across all sources (each row is one change/project/server and one billable event). Pagination stops as soon as the cap is reached, so a small value is a cheap, deterministic sample. Defaults to 20 for a fast, bounded first run. Raise it deliberately for larger exports; broad queries on large servers can return many records.",
            "default": 20
          },
          "bearer": {
            "title": "Bearer token",
            "type": "string",
            "description": "Optional access token for a private / registration-required / rate-limited server (sent as Authorization: Bearer ***). Not required for public servers. Never logged."
          },
          "cookie": {
            "title": "Cookie header",
            "type": "string",
            "description": "Optional raw Cookie header value for a session-gated server. Not required for public servers. Never logged."
          },
          "extraHeaders": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Optional extra HTTP headers as a JSON object, e.g. {\"x-api-key\": \"...\"} for gated servers. Not required for public data. Header values are never logged."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}