{
  "openapi": "3.0.1",
  "info": {
    "title": "Scheduled GitHub Actions Workflow Silence and Failure Report",
    "description": "Watches scheduled GitHub Actions workflows and reports the ones that stopped to fire, that fail again and again, or that GitHub disabled for inactivity. One dataset record for each workflow plus one summary record. HTTP only, no browser, no proxy.",
    "version": "0.1",
    "x-build-id": "qfpIdCSvjuiTMuVnC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kingii98~scheduled-github-actions-workflow-silence-and-failure-report/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kingii98-scheduled-github-actions-workflow-silence-and-failure-report",
        "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~scheduled-github-actions-workflow-silence-and-failure-report/runs": {
      "post": {
        "operationId": "runs-sync-kingii98-scheduled-github-actions-workflow-silence-and-failure-report",
        "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~scheduled-github-actions-workflow-silence-and-failure-report/run-sync": {
      "post": {
        "operationId": "run-sync-kingii98-scheduled-github-actions-workflow-silence-and-failure-report",
        "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": [
          "workflows"
        ],
        "properties": {
          "workflows": {
            "title": "Watched workflows",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "1 to 100 records. Each record holds owner_repo (for example \"python/cpython\"), workflow_file (the file name of the workflow, for example \"stale.yml\", or its numeric workflow id) and expected_max_interval_minutes (the longest silence that is still normal for this schedule). A workflow that did not run inside that interval is reported as overdue.",
            "default": [
              {
                "owner_repo": "python/cpython",
                "workflow_file": "stale.yml",
                "expected_max_interval_minutes": 1440
              },
              {
                "owner_repo": "home-assistant/core",
                "workflow_file": "stale.yml",
                "expected_max_interval_minutes": 1440
              },
              {
                "owner_repo": "rust-lang/rust",
                "workflow_file": "ghcr.yml",
                "expected_max_interval_minutes": 2880
              }
            ]
          },
          "githubToken": {
            "title": "GitHub token",
            "type": "string",
            "description": "Optional. Supply your own token to watch private repositories and to lift the rate limit of 60 requests for each hour that applies to anonymous calls. The Actor never buys a token and never sends the token anywhere except to api.github.com."
          },
          "failureStreakThreshold": {
            "title": "Failure streak threshold",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "The Actor raises a failure alert after this many failed runs in a row.",
            "default": 2
          },
          "alertWebhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "Optional. One public HTTPS URL. The Actor sends one JSON POST with every alert of the run. Private, loopback and reserved addresses are refused. Leave it empty to read the alerts in the dataset only.",
            "default": ""
          },
          "runEventFilter": {
            "title": "Run event filter",
            "enum": [
              "schedule",
              "any"
            ],
            "type": "string",
            "description": "Which runs count as a firing of the schedule. \"schedule\" reads only the runs that the cron trigger started, which is the correct choice for a nightly job. \"any\" reads every run of the workflow.",
            "default": "schedule"
          },
          "runsPerWorkflow": {
            "title": "Runs read for each workflow",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many recent runs are read for each workflow. The failure streak cannot become longer than this number.",
            "default": 10
          },
          "suppressRepeatAlerts": {
            "title": "Suppress repeated alerts",
            "type": "boolean",
            "description": "Keep one cursor for each workflow in the key-value store, so the same alert is not sent again on every schedule tick. A changed alert reason or a new run always sends a new alert.",
            "default": true
          },
          "stateStoreName": {
            "title": "State store name",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{1,61}[A-Za-z0-9]$",
            "type": "string",
            "description": "Name of the named key-value store that holds one alert cursor for each workflow. The store must be named, because the default store of an Actor belongs to one run only and would lose the cursor on every tick. Give two schedules two different names when they must alert on their own.",
            "default": "gha-schedule-monitor-state"
          },
          "confirmSilence": {
            "title": "Confirm a silence before it alerts",
            "type": "boolean",
            "description": "Read the run list a second time before a silence alert is raised. GitHub sometimes answers the run list from a replica that is weeks out of date, which reads exactly like a schedule that stopped to fire. This second read removes that false alert. It costs one extra API call, and only for a workflow that already looks silent.",
            "default": true
          },
          "silenceConfirmDelaySeconds": {
            "title": "Pause before the confirmation read (seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "How long the Actor waits before it reads the run list of the silent-looking workflows again. The GitHub run list is served with a cache lifetime of 60 seconds, so a second read without a pause can be answered from the same page as the first. The pause happens once for the whole run, and not once for each workflow.",
            "default": 3
          },
          "timeoutSeconds": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Timeout for one call to the GitHub REST API.",
            "default": 15
          },
          "requestsPerSecond": {
            "title": "Requests per second",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Rate limit for the calls to api.github.com. The calls are sent one after the other, so this Actor cannot act as a load generator.",
            "default": 5
          },
          "maxResponseBytes": {
            "title": "Maximum response bytes",
            "minimum": 65536,
            "maximum": 8000000,
            "type": "integer",
            "description": "Hard cap on the bytes read from one API answer. A larger answer is reported as an error for that workflow.",
            "default": 2000000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}