{
  "openapi": "3.1.0",
  "info": {
    "title": "Is Agentic public report API",
    "version": "1.0.0",
    "description": "Read the latest completed Is Agentic readiness report stored for a public URL. This API never starts a scan."
  },
  "externalDocs": {
    "description": "Is Agentic developer resources",
    "url": "https://is-agentic.com/developers"
  },
  "servers": [
    {
      "url": "https://is-agentic.com"
    }
  ],
  "paths": {
    "/api/report": {
      "get": {
        "operationId": "getIsAgenticReport",
        "summary": "Get a completed Is Agentic report",
        "description": "Returns the latest completed stored report for a public HTTP or HTTPS URL without launching a scan.",
        "parameters": [
          {
            "in": "query",
            "name": "url",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048
            },
            "example": "https://example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "Latest completed report",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicScanReport"
                }
              }
            }
          },
          "400": {
            "description": "The URL is missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No completed report is stored for the URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Stored report data is temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ScoreBucket": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "earned",
          "available",
          "passing",
          "total"
        ],
        "properties": {
          "earned": {
            "type": "number"
          },
          "available": {
            "type": "number"
          },
          "passing": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "PublicScanIssue": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "tier",
          "result",
          "details",
          "recommendation"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "tier": {
            "enum": [
              "essential",
              "recommended",
              "bonus"
            ]
          },
          "result": {
            "enum": [
              "failed",
              "partial"
            ]
          },
          "details": {
            "type": [
              "string",
              "null"
            ]
          },
          "recommendation": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PublicScanReport": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "target",
          "display_target",
          "report_url",
          "score",
          "score_label",
          "scanned_at",
          "eligible_checks",
          "score_breakdown",
          "issues"
        ],
        "properties": {
          "target": {
            "type": "string",
            "format": "uri"
          },
          "display_target": {
            "type": "string"
          },
          "report_url": {
            "type": "string",
            "format": "uri"
          },
          "score": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "score_label": {
            "type": "string"
          },
          "scanned_at": {
            "type": "string",
            "format": "date-time"
          },
          "eligible_checks": {
            "type": "integer"
          },
          "score_breakdown": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "essential",
              "recommended",
              "bonus"
            ],
            "properties": {
              "essential": {
                "$ref": "#/components/schemas/ScoreBucket"
              },
              "recommended": {
                "$ref": "#/components/schemas/ScoreBucket"
              },
              "bonus": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "points",
                  "positive_signals"
                ],
                "properties": {
                  "points": {
                    "type": "number"
                  },
                  "positive_signals": {
                    "type": "integer"
                  }
                }
              }
            }
          },
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicScanIssue"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "documentation_url": {
            "type": "string",
            "format": "uri"
          },
          "scan_url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  }
}
