{
  "openapi": "3.0.1",
  "info": {
    "title": "Terraform and OpenTofu Registry Deprecation and Staleness Gate",
    "description": "Resolve Terraform or OpenTofu provider and module sources against the public registry. Report deprecation, release age, and how many major versions each upgrade crosses.",
    "version": "0.1",
    "x-build-id": "jsxa6p6KGcxn9qzVd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kingii98~terraform-and-opentofu-registry-deprecation-and-staleness-gate/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kingii98-terraform-and-opentofu-registry-deprecation-and-staleness-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~terraform-and-opentofu-registry-deprecation-and-staleness-gate/runs": {
      "post": {
        "operationId": "runs-sync-kingii98-terraform-and-opentofu-registry-deprecation-and-staleness-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~terraform-and-opentofu-registry-deprecation-and-staleness-gate/run-sync": {
      "post": {
        "operationId": "run-sync-kingii98-terraform-and-opentofu-registry-deprecation-and-staleness-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": [
          "sources"
        ],
        "properties": {
          "sources": {
            "title": "Registry sources",
            "minItems": 1,
            "maxItems": 300,
            "type": "array",
            "description": "1 to 300 registry sources. Each item takes `source` (for example `hashicorp/aws` for a provider, or `terraform-aws-modules/vpc/aws` for a module), an optional `kind` (provider, module or auto) and an optional `constraint` (Terraform constraint syntax, for example `~> 5.0` or `>= 2.0, < 4.0`). A plain string item is also accepted and gets the auto kind with no constraint. Only public registry sources are read. A Git, HTTP or local source is reported as skipped.",
            "default": [
              {
                "source": "hashicorp/aws",
                "kind": "provider",
                "constraint": "~> 5.0"
              },
              {
                "source": "hashicorp/random",
                "kind": "provider",
                "constraint": "~> 3.6"
              },
              {
                "source": "hashicorp/template",
                "kind": "provider",
                "constraint": ">= 2.0"
              },
              {
                "source": "integrations/github",
                "kind": "provider",
                "constraint": "~> 5.0"
              },
              {
                "source": "terraform-aws-modules/vpc/aws",
                "kind": "module",
                "constraint": "~> 5.0"
              },
              {
                "source": "terraform-aws-modules/security-group/aws",
                "kind": "module",
                "constraint": "~> 5.1"
              }
            ]
          },
          "registry": {
            "title": "Registry",
            "enum": [
              "terraform",
              "opentofu"
            ],
            "type": "string",
            "description": "Which public registry answers the lookups. `terraform` reads registry.terraform.io. `opentofu` reads the public OpenTofu registry API.",
            "default": "terraform"
          },
          "staleDays": {
            "title": "Stale age in days",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "A source with no new release in this many days gets the stale flag, and counts for the deprecated-or-stale-source-flagged charge.",
            "default": 365
          },
          "failOnDeprecated": {
            "title": "A deprecated source fails the gate",
            "type": "boolean",
            "description": "Count a source that the registry marks deprecated, archived or blocked as a gate failure.",
            "default": true
          },
          "failOnStale": {
            "title": "A stale source fails the gate",
            "type": "boolean",
            "description": "Count a source with no release inside the stale age as a gate failure. Off by default, because a small provider often has a long and healthy release gap.",
            "default": false
          },
          "failOnMajorBehind": {
            "title": "Major versions behind that fail the gate",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Count a source as a gate failure when the upgrade to the latest release crosses this many major versions or more. 0 turns this rule off.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}