{
  "openapi": "3.0.1",
  "info": {
    "title": "CDN Cache and Compression Delivery Contract Gate",
    "description": "Proves that a deploy serves the delivery contract that you agreed. For every URL that you name, the Actor sends header-only transactions: one request for each required compression algorithm, an HTTP-scheme probe and a trailing-slash variant, so four trans",
    "version": "0.1",
    "x-build-id": "2D9sB7PSOYtB96rIR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kingii98~cdn-cache-and-compression-delivery-contract-gate/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kingii98-cdn-cache-and-compression-delivery-contract-gate",
        "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~cdn-cache-and-compression-delivery-contract-gate/runs": {
      "post": {
        "operationId": "runs-sync-kingii98-cdn-cache-and-compression-delivery-contract-gate",
        "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~cdn-cache-and-compression-delivery-contract-gate/run-sync": {
      "post": {
        "operationId": "run-sync-kingii98-cdn-cache-and-compression-delivery-contract-gate",
        "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": [
          "urls",
          "requiredEncodings",
          "minImmutableMaxAgeSeconds",
          "trailingSlashForm"
        ],
        "properties": {
          "urls": {
            "title": "URLs to check",
            "minItems": 1,
            "maxItems": 300,
            "type": "array",
            "description": "1 to 300 absolute URLs. The Actor does not crawl. It checks only the URLs that you give. Private, loopback and reserved addresses are refused.",
            "default": [
              "https://www.python.org/",
              "https://www.python.org/about/",
              "https://www.python.org/static/img/python-logo.png"
            ],
            "items": {
              "type": "string"
            }
          },
          "requiredEncodings": {
            "title": "Policy: required compression algorithms",
            "minItems": 1,
            "maxItems": 5,
            "type": "array",
            "description": "The algorithms that the CDN must offer for a compressible body. The Actor sends one request for each algorithm and reads Content-Encoding. An algorithm that the server does not use gives FAIL. Known values: br, gzip, zstd, deflate.",
            "default": [
              "br",
              "gzip"
            ],
            "items": {
              "type": "string"
            }
          },
          "minImmutableMaxAgeSeconds": {
            "title": "Policy: minimum immutable max-age in seconds",
            "minimum": 0,
            "maximum": 31536000,
            "type": "integer",
            "description": "The smallest max-age that a fingerprinted asset must carry. A shorter value gives FAIL. A long enough value without the immutable directive gives WARN.",
            "default": 31536000
          },
          "canonicalHost": {
            "title": "Policy: canonical host",
            "type": "string",
            "description": "The one host that every URL must end on, for example www.example.com. Leave this empty to take the host of the first URL. A final URL on another host gives FAIL.",
            "default": ""
          },
          "trailingSlashForm": {
            "title": "Policy: trailing-slash form",
            "enum": [
              "as-given",
              "slash",
              "no-slash"
            ],
            "type": "string",
            "description": "The form that every page URL must use. Choose as-given to report the other form without a policy, slash to require /about/, or no-slash to require /about. The Actor always requests the other form and reports what it answers.",
            "default": "as-given"
          },
          "checkHttpToHttps": {
            "title": "Check the HTTP-to-HTTPS redirect",
            "type": "boolean",
            "description": "Send one extra probe on the http scheme. A permanent redirect to https gives PASS, a temporary redirect gives WARN, and a plain 200 answer gives FAIL. Switch this off when port 80 is closed on purpose.",
            "default": true
          },
          "hashedAssetPattern": {
            "title": "Fingerprinted asset pattern",
            "type": "string",
            "description": "A regular expression that matches the path of a build asset that carries a content hash. Only a path that matches is graded by the immutable max-age rule.",
            "default": "[._-][A-Za-z0-9]{8,}\\.(?:js|mjs|cjs|css|map|woff2?|ttf|otf|eot|png|jpe?g|gif|svg|webp|avif|ico)$"
          },
          "trackBaseline": {
            "title": "Keep a baseline between runs",
            "type": "boolean",
            "description": "Store the verdict of each URL in the key-value store, and report every change in the next run. The first run writes the baseline and reports no delta.",
            "default": true
          },
          "baselineKey": {
            "title": "Baseline record key",
            "type": "string",
            "description": "Leave this empty to derive the record key from the canonical host. Set it to keep more than one baseline for the same host, for example one for staging and one for production.",
            "default": ""
          },
          "timeoutSeconds": {
            "title": "Request timeout in seconds",
            "minimum": 3,
            "maximum": 60,
            "type": "integer",
            "description": "The Actor stops one request after this time.",
            "default": 15
          },
          "maxConcurrency": {
            "title": "Maximum parallel URLs",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many URLs the Actor checks at the same time. The four transactions of one URL always run one after the other.",
            "default": 5
          },
          "maxRequests": {
            "title": "Maximum HTTP requests",
            "minimum": 10,
            "maximum": 2000,
            "type": "integer",
            "description": "A hard bound on the run. Each URL costs one request for each required algorithm, plus the HTTP-scheme probe and the trailing-slash variant, so four requests under the default policy. A URL above the bound is reported as skipped and is not charged.",
            "default": 1300
          },
          "maxRedirects": {
            "title": "Maximum redirects",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many redirect hops the compression requests follow to reach the final URL. Every hop must resolve to a public address, or the Actor stops the chain and reports it. The HTTP-scheme probe and the trailing-slash variant are never followed, because their status code is the result.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}