{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk SSL Certificate Expiry Monitor: Any Port & STARTTLS",
    "description": "Check SSL/TLS certificate expiry for thousands of hosts on any port: HTTPS, LDAPS, IMAPS, RDP, plus STARTTLS for IMAP, POP3, SMTP and FTP. Days left, issuer, SANs, chain trust, hostname match, key, TLS version. Check every IP behind a name and flag changed certs.",
    "version": "0.1",
    "x-build-id": "bLUYdL3heMxbdSwh0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sysadmin-toolbox~bulk-ssl-expiry-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sysadmin-toolbox-bulk-ssl-expiry-monitor",
        "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/sysadmin-toolbox~bulk-ssl-expiry-monitor/runs": {
      "post": {
        "operationId": "runs-sync-sysadmin-toolbox-bulk-ssl-expiry-monitor",
        "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/sysadmin-toolbox~bulk-ssl-expiry-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-sysadmin-toolbox-bulk-ssl-expiry-monitor",
        "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": [
          "hosts"
        ],
        "properties": {
          "hosts": {
            "title": "Hosts to check",
            "type": "array",
            "description": "Domains, host:port, IPs or URLs. One per line (you can also paste comma- or space-separated lists). Examples: example.com, example.com:8443, https://example.com/login, imaps://mail.example.com, 203.0.113.10:636, [2001:db8::1]:443. Duplicates are removed. Max 10,000 targets per run.",
            "items": {
              "type": "string"
            }
          },
          "port": {
            "title": "Default port",
            "minimum": 1,
            "maximum": 65535,
            "type": "integer",
            "description": "Used for entries without an explicit port or URL scheme.",
            "default": 443
          },
          "warnDays": {
            "title": "Warn when expiring within (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Certificates expiring within this many days get status WARN.",
            "default": 30
          },
          "criticalDays": {
            "title": "Critical when expiring within (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Certificates expiring within this many days get status CRITICAL. Already-expired certificates are EXPIRED.",
            "default": 7
          },
          "onlyProblems": {
            "title": "Only output problems",
            "type": "boolean",
            "description": "Write only non-OK rows (WARN, CRITICAL, EXPIRED, ERROR, or changed certificates) to the dataset. The SUMMARY record still counts every host.",
            "default": false
          },
          "trustIssues": {
            "title": "Untrusted chain / hostname mismatch severity",
            "enum": [
              "CRITICAL",
              "WARN",
              "IGNORE"
            ],
            "type": "string",
            "description": "How to rate a certificate that is in date but not trusted (self-signed, unknown CA, missing intermediate) or does not match the hostname. Use WARN or Ignore for internal hosts with a private CA, or add your CA below.",
            "default": "CRITICAL"
          },
          "checkAllIps": {
            "title": "Check every IP behind each hostname",
            "type": "boolean",
            "description": "Resolve all A/AAAA records and handshake with each address (same SNI). Finds the one load-balancer node or server still serving an old certificate. Each IP counts as one check.",
            "default": false
          },
          "includeIpv6": {
            "title": "Include IPv6 addresses (with 'check every IP')",
            "type": "boolean",
            "description": "By default 'check every IP' tests IPv4 addresses only (Apify's cloud has no IPv6 egress, so IPv6 checks there fail with 'network unreachable'). Names with only AAAA records are still tried over IPv6. Turn on when running somewhere with IPv6.",
            "default": false
          },
          "starttls": {
            "title": "STARTTLS",
            "enum": [
              "auto",
              "none",
              "smtp",
              "imap",
              "pop3",
              "ftp"
            ],
            "type": "string",
            "description": "Upgrade plaintext protocols before the TLS handshake. Implicit-TLS ports such as 443, 465, 636, 993, 995, 8443 and 3389 need no STARTTLS. Note: outbound port 25 is blocked on Apify's cloud; 587 (STARTTLS) and 465 work.",
            "default": "auto"
          },
          "servername": {
            "title": "SNI server name override",
            "type": "string",
            "description": "Optional. Send this name as SNI (and check the certificate against it) for every target. Useful when checking IP addresses or origin servers behind a CDN. By default each hostname is its own SNI and IP targets send none."
          },
          "timeoutSecs": {
            "title": "Timeout per host (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Covers connect, STARTTLS and the TLS handshake.",
            "default": 10
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Parallel handshakes.",
            "default": 10
          },
          "monitorKey": {
            "title": "Change-detection key (for scheduled runs)",
            "type": "string",
            "description": "Optional. Give a name such as 'prod-certs' and schedule the actor: each run stores certificate fingerprints in your named key-value store 'ssl-expiry-monitor-state' under this key and flags certificates that changed since the previous run (changedSinceLastRun)."
          },
          "extraCaPem": {
            "title": "Extra trusted CA certificates (PEM)",
            "type": "string",
            "description": "Optional. Paste one or more PEM CA certificates (private or corporate CA) to trust in addition to the standard Mozilla root store."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}