{
  "openapi": "3.0.1",
  "info": {
    "title": "Third-Party API Deprecation and Sunset Header Watch",
    "description": "Watch the third-party API endpoints that you call in production for RFC 9745 Deprecation and RFC 8594 Sunset response headers. The Actor compares each endpoint against a stored baseline, reports new deprecations and moved sunset dates, and fails a gate wh",
    "version": "0.2",
    "x-build-id": "xTWYP2uiaBwfIVlvL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kingii98~third-party-api-deprecation-and-sunset-header-watch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kingii98-third-party-api-deprecation-and-sunset-header-watch",
        "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~third-party-api-deprecation-and-sunset-header-watch/runs": {
      "post": {
        "operationId": "runs-sync-kingii98-third-party-api-deprecation-and-sunset-header-watch",
        "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~third-party-api-deprecation-and-sunset-header-watch/run-sync": {
      "post": {
        "operationId": "run-sync-kingii98-third-party-api-deprecation-and-sunset-header-watch",
        "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": [
          "endpoints"
        ],
        "properties": {
          "endpoints": {
            "title": "Endpoints",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "1 to 100 endpoints. Each record has a \"url\", a \"method\" (GET, HEAD or OPTIONS, default GET), optional static request \"headers\" (for example an API version header), and an optional \"use_auth_header\" (true sends the secret auth header to this endpoint only). A plain URL string is a GET request. The Actor reads the response headers, and on an error answer (HTTP 4xx) at most 64 KB of the body for a vendor deprecation notice. If you leave this field empty, the Actor watches the four public demo endpoints shown below.",
            "default": [
              {
                "url": "https://api.bitbucket.org/2.0/repositories",
                "method": "GET"
              },
              {
                "url": "https://postman-echo.com/response-headers?Deprecation=%401735689600&Sunset=Wed%2C%2031%20Dec%202031%2023%3A59%3A59%20GMT&Link=%3Chttps%3A%2F%2Fpostman-echo.com%2Fget%3E%3B%20rel%3D%22successor-version%22",
                "method": "GET"
              },
              {
                "url": "https://api.github.com/",
                "method": "GET",
                "headers": {
                  "X-GitHub-Api-Version": "2022-11-28"
                }
              },
              {
                "url": "https://gitlab.com/api/v3/projects",
                "method": "GET"
              }
            ]
          },
          "auth_header": {
            "title": "Secret auth header",
            "type": "string",
            "description": "Optional. One header that you own, in the form \"Name: secret\", for example \"X-Api-Key: abc123\". The Actor sends it only to the endpoints with \"use_auth_header\": true, and only to the origin of that endpoint URL: a redirect to a different origin does not get it. The Actor never writes the secret to the log, the dataset or the baseline."
          },
          "sunset_warning_days": {
            "title": "Sunset warning window (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "A Sunset date inside this many days from now, or a date in the past, sets gate_pass to false. A gone endpoint (HTTP 410, or 404 where the baseline answered) sets it to false too.",
            "default": 90
          },
          "alert_webhook_url": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "Optional. One public HTTPS URL. The Actor sends one JSON POST for each endpoint whose deprecation state changed since the baseline. Private and reserved addresses are refused, and a redirect is not followed. Leave it empty to read the changes in the dataset only.",
            "default": ""
          },
          "baseline_name": {
            "title": "Baseline name",
            "type": "string",
            "description": "The record key of the stored baseline inside the named key-value store \"api-sunset-header-baseline\". Use one name for each endpoint list. The first run writes the baseline and reports every present signal as new-deprecation.",
            "default": "DEFAULT"
          },
          "request_timeout_seconds": {
            "title": "Request timeout (seconds)",
            "minimum": 2,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout for each request and for each webhook POST. One endpoint gets one request and one retry, so it takes at most 2 x this value + 5 seconds.",
            "default": 15
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of endpoints requested at the same time.",
            "default": 5
          },
          "max_redirects": {
            "title": "Maximum redirects",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum redirect hops for each request. The Actor checks each hop again against the private-address rules.",
            "default": 3
          },
          "max_run_seconds": {
            "title": "Maximum seconds for the whole run",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Wall-clock deadline for the endpoint list. An endpoint that the run does not reach before this deadline gets the RUN_DEADLINE reason code and keeps its baseline. The run still succeeds.",
            "default": 240
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}