{
  "openapi": "3.0.1",
  "info": {
    "title": "Harbor Registry Extractor",
    "description": "Point at any self-hosted Harbor container registry and extract its public projects, repositories, image artifacts (with vulnerability-scan severity) and instance fingerprint via the open /api/v2.0 REST API. One actor, any Harbor — no per-host scraper.",
    "version": "0.1",
    "x-build-id": "Q6PS2goKb2v4ksflU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~harbor-registry-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-harbor-registry-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~harbor-registry-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-harbor-registry-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~harbor-registry-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-harbor-registry-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": "Harbor instance URL(s)",
            "type": "array",
            "description": "One or more Harbor container-registry base URLs. Harbor exposes an /api/v2.0 REST API; public projects are anonymous-browsable by design and /systeminfo + /health are unauthenticated on every install, so ONE actor works against any instance: https://registry.cern.ch (CERN's public registry), https://demo.goharbor.io (the vendor demo), or any self-hosted install on your Kubernetes clusters. Paste the server root as given (the /api/v2.0/... path is appended for you). When several are listed, each is queried in turn and a source that is unreachable, behind an anti-bot wall, or fully auth-gated is skipped with a warning.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "projects",
              "repositories",
              "artifacts",
              "discovery"
            ],
            "type": "string",
            "description": "What to extract. projects (default): the public-project census from /api/v2.0/projects — one row per project (owner, repo count, public flag, auto-scan, severity, timestamps). repositories: the repos inside one Project — one row per repo (artifact count, pull count, timestamps). artifacts: the images inside a Project (and optionally one Repository) — one row per artifact (digest, tags, size, push time, vulnerability scan severity + counts). discovery: one fingerprint row per instance from /systeminfo + /health (Harbor version, auth mode, self-registration, component health).",
            "default": "projects"
          },
          "project": {
            "title": "Project (repositories / artifacts mode)",
            "type": "string",
            "description": "REQUIRED for repositories and artifacts modes: the Harbor project name to drill into (e.g. \"acc\" on registry.cern.ch). Ignored in projects and discovery modes."
          },
          "repository": {
            "title": "Repository (artifacts mode, optional)",
            "type": "string",
            "description": "ARTIFACTS MODE only. A single repository name RELATIVE to the project (the part after \"project/\"), e.g. \"gcr.io/knative-releases/.../webhook\". Leave empty to walk EVERY repository in the project (bounded by Max records)."
          },
          "q": {
            "title": "Query filter (projects / repositories mode)",
            "type": "string",
            "description": "Optional Harbor-native fuzzy filter passed as ?q= — e.g. \"name=~acc\" to match project/repo names containing \"acc\". Leave empty to list everything. See Harbor's API docs for the q syntax."
          },
          "name": {
            "title": "Exact project name (projects mode)",
            "type": "string",
            "description": "PROJECTS MODE only. Restrict to projects whose name exactly matches (passed as ?name=). Leave empty for no name filter."
          },
          "page": {
            "title": "Start page",
            "minimum": 1,
            "type": "integer",
            "description": "The Harbor page number to start from (1-based). Pagination then continues via Harbor's Link: rel=next header until the cap or the last page. Leave at 1 to start from the beginning.",
            "default": 1
          },
          "pageSize": {
            "title": "Page size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Rows requested per Harbor API page (1-100; Harbor caps these collections at 100). This is a fetch-batch tuning knob, not a total cap — use Max records for that. Leave empty for 100.",
            "default": 100
          },
          "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 project/repo/artifact/instance and one billable event). Pagination — and, in artifacts mode, the per-repo fan-out — stops as soon as the cap is reached, so a small value is a cheap, deterministic sample. Leave empty to fetch every matching record — a broad artifacts run on a large registry can return very many rows."
          },
          "bearer": {
            "title": "Bearer token / robot account",
            "type": "string",
            "description": "Optional Harbor bearer token or robot-account credential for reading a private instance (sent as Authorization: Bearer ***). NOT required for anonymous/public projects. Never logged."
          },
          "extraHeaders": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Optional extra HTTP headers as a JSON object, e.g. {\"X-Harbor-CSRF-Token\": \"...\"} for a gateway-fronted instance. Not required for the public servers. 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}