{
  "openapi": "3.0.1",
  "info": {
    "title": "Shadow Outage Ledger: Vendor-Claimed Status",
    "description": "Run this on a short schedule. Each run reads what the vendor status page claims and measures a public endpoint of the same service from outside. Each check writes one typed event: MATCH, SHADOW_OUTAGE when the endpoint fails and the vendor still claims th",
    "version": "0.1",
    "x-build-id": "qI9v7CnfWIQ4SzJyO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kingii98~shadow-outage-ledger-vendor-claimed-status/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kingii98-shadow-outage-ledger-vendor-claimed-status",
        "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~shadow-outage-ledger-vendor-claimed-status/runs": {
      "post": {
        "operationId": "runs-sync-kingii98-shadow-outage-ledger-vendor-claimed-status",
        "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~shadow-outage-ledger-vendor-claimed-status/run-sync": {
      "post": {
        "operationId": "run-sync-kingii98-shadow-outage-ledger-vendor-claimed-status",
        "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": [
          "vendors"
        ],
        "properties": {
          "vendors": {
            "title": "Vendors",
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "description": "1 to 25 vendors. Each entry is an object with 'name', 'status_json_url', 'probe_url', 'probe_method' and 'expect_status'. 'status_json_url' must be a public Statuspage v2 status document, normally https://status.<vendor>.com/api/v2/status.json, or an Instatus summary document. 'probe_url' must be a public endpoint of the service that needs no credentials; the run measures this URL and compares the result with the vendor claim. 'probe_method' is GET or HEAD, and it defaults to GET. 'expect_status' lists the HTTP status codes that count as a healthy answer, and it defaults to [200]. An entry this Actor cannot read gets its own row and does not stop the run.",
            "default": [
              {
                "name": "GitHub",
                "status_json_url": "https://www.githubstatus.com/api/v2/status.json",
                "probe_url": "https://github.com/robots.txt",
                "probe_method": "GET",
                "expect_status": [
                  200
                ]
              },
              {
                "name": "Cloudflare",
                "status_json_url": "https://www.cloudflarestatus.com/api/v2/status.json",
                "probe_url": "https://www.cloudflare.com/cdn-cgi/trace",
                "probe_method": "GET",
                "expect_status": [
                  200
                ]
              },
              {
                "name": "npm",
                "status_json_url": "https://status.npmjs.org/api/v2/status.json",
                "probe_url": "https://registry.npmjs.org/-/ping",
                "probe_method": "GET",
                "expect_status": [
                  200
                ]
              }
            ]
          },
          "checkIntervalMinutes": {
            "title": "Schedule interval (minutes)",
            "minimum": 5,
            "maximum": 1440,
            "type": "integer",
            "description": "The interval of the schedule that runs this Actor. The run does not wait; it uses this number to measure the gap since the last check. A gap of more than two intervals means that the schedule missed a run, and each event then says that the ledger has a hole. Set this to the same value as your schedule.",
            "default": 15
          },
          "maxProbeAttempts": {
            "title": "Probes for each vendor",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "The largest number of probes of one target in one run. A probe that answers as expected ends the repeats, so a healthy vendor costs one request. One short failure is noise, and a repeat keeps the ledger free of a window that opens on it.",
            "default": 3
          },
          "requestTimeoutSeconds": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for the status read and for each probe. A probe that reaches this timeout counts as a failure, because a user waits the same time.",
            "default": 20
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "The largest number of vendors checked at the same time. A public status page refuses a burst, so a small number is safer.",
            "default": 5
          },
          "maxRedirects": {
            "title": "Redirects",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "The largest number of redirects followed for one read or one probe. Every hop is checked again against the private-address rule. A probe stops at the first status code that your 'expect_status' list names, so a buyer who expects 301 measures the redirect itself.",
            "default": 5
          },
          "maxResponseBytes": {
            "title": "Response size cap (bytes)",
            "minimum": 10000,
            "maximum": 10000000,
            "type": "integer",
            "description": "The largest body this Actor reads. A status document larger than the cap is refused. A probe keeps its status code and its latency, because the cap stops the body only.",
            "default": 2000000
          },
          "stateStoreName": {
            "title": "Ledger store name",
            "type": "string",
            "description": "The named key-value store that carries the ledger between runs. Each run gets its own default store, so the ledger cannot live there. Keep one name for one schedule. Give a second schedule a second name, or the two schedules write over each other. The name must be 3 to 63 characters, and it must use letters, numbers and inner dashes only.",
            "default": "shadow-outage-ledger-state"
          },
          "stateRetentionHours": {
            "title": "State retention (hours)",
            "minimum": 1,
            "maximum": 8760,
            "type": "integer",
            "description": "The ledger keeps the open windows and the last vendor claim in the key-value store between runs. A vendor that the input no longer names is kept for this many hours and is then dropped, so the stored state does not grow without a bound. The record never holds more than 200 vendors.",
            "default": 720
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}