{
  "openapi": "3.0.1",
  "info": {
    "title": "Container Registry Pull Reachability and Rate-Budget Ledger",
    "description": "Pulls the manifest of every pinned image reference over HTTPS and reports whether the pull works now, why it would fail, which platforms the manifest holds, the TLS name-match verdict, and how much anonymous rate budget the registry has left. HTTP only, n",
    "version": "0.2",
    "x-build-id": "3E1xaxdBuWv5jSkk9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kingii98~container-registry-pull-reachability-and-rate-budget-ledger/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kingii98-container-registry-pull-reachability-and-rate-budget-ledger",
        "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/kingii98~container-registry-pull-reachability-and-rate-budget-ledger/runs": {
      "post": {
        "operationId": "runs-sync-kingii98-container-registry-pull-reachability-and-rate-budget-ledger",
        "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/kingii98~container-registry-pull-reachability-and-rate-budget-ledger/run-sync": {
      "post": {
        "operationId": "run-sync-kingii98-container-registry-pull-reachability-and-rate-budget-ledger",
        "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": [
          "imageRefs",
          "failOn",
          "ledgerStoreName"
        ],
        "properties": {
          "imageRefs": {
            "title": "Image references",
            "minItems": 0,
            "maxItems": 100,
            "type": "array",
            "description": "1 to 100 pinned image references, for example \"node:22-alpine\", \"ghcr.io/org/app:1.4.2\" or \"alpine@sha256:...\". A reference without a registry host goes to Docker Hub. Paste your pipeline list here.",
            "default": [
              "alpine:3.20",
              "ghcr.io/astral-sh/uv:latest",
              "mcr.microsoft.com/dotnet/runtime:8.0"
            ],
            "items": {
              "type": "string"
            }
          },
          "dockerfile": {
            "title": "Dockerfile text",
            "type": "string",
            "description": "Optional. Paste a Dockerfile and the Actor reads the image of every FROM line. It skips \"scratch\", it skips a FROM line that points at an earlier build stage, and it skips a line that holds an unresolved ARG. The result joins the \"Image references\" list.",
            "default": ""
          },
          "expectedPlatform": {
            "title": "Expected platform",
            "type": "string",
            "description": "Optional, for example \"linux/amd64\" or \"linux/arm64/v8\". The Actor then checks that the manifest list of each reference holds this platform, and classifies a reference that misses it as \"platform_missing\". Leave it empty to skip the check.",
            "default": ""
          },
          "failOn": {
            "title": "Conditions that fail the run verdict",
            "uniqueItems": true,
            "type": "array",
            "description": "The run verdict is \"fail\" when any reference carries one of these failure classes. The verdict is a dataset record and a status message. The Actor run itself always ends SUCCEEDED, because a blocked pull is an answer and not a malfunction.",
            "items": {
              "type": "string",
              "enum": [
                "unreachable",
                "unauthorized",
                "rate_limited",
                "platform_missing",
                "tls_name_mismatch",
                "tls_error",
                "not_found",
                "server_error",
                "invalid_reference"
              ],
              "enumTitles": [
                "unreachable - the registry or the token endpoint does not answer",
                "unauthorized - the registry refuses the credentials",
                "rate_limited - the pull budget of the registry is spent",
                "platform_missing - the manifest list misses the expected platform",
                "tls_name_mismatch - the certificate is not valid for the host that was asked",
                "tls_error - another TLS or certificate chain fault",
                "not_found - the repository or the tag does not exist",
                "server_error - the registry answers 5xx",
                "invalid_reference - the reference text cannot be parsed or is a private target"
              ]
            },
            "default": [
              "unreachable",
              "unauthorized",
              "tls_name_mismatch",
              "tls_error",
              "not_found"
            ]
          },
          "registryToken": {
            "title": "Registry token",
            "type": "string",
            "description": "Optional. A bearer token or a personal access token for a private repository that you own. The Actor sends it to the token endpoint of the registry as HTTP basic credentials, and it never writes it into the dataset or the log."
          },
          "registryUsername": {
            "title": "Registry user name",
            "type": "string",
            "description": "Optional. The user name for a private repository that you own. Use it together with the registry password."
          },
          "registryPassword": {
            "title": "Registry password",
            "type": "string",
            "description": "Optional. The password or access token that belongs to the registry user name."
          },
          "credentialHosts": {
            "title": "Hosts that receive the credentials",
            "maxItems": 20,
            "type": "array",
            "description": "The registry hosts that may receive the credentials above, for example \"ghcr.io\". An empty list sends the credentials to every host in the reference list. Fill it in when your list mixes a private registry with public ones.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "ledgerStoreName": {
            "title": "Ledger key-value store name",
            "type": "string",
            "description": "The named Apify key-value store that holds the previous status and digest of each reference plus a short rate-budget history for each registry host. Every run that uses the same name compares against the same ledger.",
            "default": "registry-pull-ledger"
          },
          "concurrency": {
            "title": "Parallel references",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many references the Actor probes at the same time.",
            "default": 5
          },
          "timeoutSeconds": {
            "title": "Timeout for one HTTP call (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout in seconds for one registry request. 1 to 60.",
            "default": 20
          },
          "maxRedirects": {
            "title": "Maximum redirects",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "The Actor follows the redirects itself so that it can record the host chain. A chain that passes this bound is a failed pull.",
            "default": 5
          },
          "maxResponseBytes": {
            "title": "Maximum response bytes",
            "minimum": 4096,
            "maximum": 4194304,
            "type": "integer",
            "description": "Hard cap on the bytes that the Actor reads from one registry answer. A manifest is small, so the default is generous.",
            "default": 262144
          },
          "budgetHistoryLength": {
            "title": "Rate-budget history length",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many earlier rate-budget readings the ledger keeps for each registry host.",
            "default": 12
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}