{
  "openapi": "3.1.0",
  "info": {
    "title": "SkyFlow Manual Retrieval API",
    "version": "1.0.0",
    "description": "Public read-only manual search, edition catalog and complete source-cited sections. No authentication. Responses include model, edition and source references."
  },
  "servers": [
    {
      "url": "https://shop.skyflow.ca/api/learn/v1"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "discover",
        "summary": "API discovery",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Published content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "documentation": {
                      "type": "string",
                      "format": "uri"
                    },
                    "openapi": {
                      "type": "string",
                      "format": "uri"
                    },
                    "manuals": {
                      "type": "string",
                      "format": "uri"
                    },
                    "search": {
                      "type": "string",
                      "format": "uri"
                    },
                    "formats": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "guidance": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "version",
                    "documentation",
                    "openapi",
                    "manuals",
                    "search",
                    "formats",
                    "guidance"
                  ]
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid search parameters"
          },
          "404": {
            "description": "Unknown manual or section"
          }
        }
      }
    },
    "/search": {
      "get": {
        "operationId": "searchManuals",
        "summary": "Search full manual text and published answers",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "family",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "manual-section",
                "answer"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "guidance": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "manual-section",
                              "answer"
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "api_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "family": {
                            "type": "string"
                          },
                          "models": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "snippet": {
                            "type": "string"
                          },
                          "score": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "title",
                          "url",
                          "api_url",
                          "snippet",
                          "models"
                        ]
                      }
                    }
                  },
                  "required": [
                    "query",
                    "total",
                    "limit",
                    "offset",
                    "guidance",
                    "items"
                  ]
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid search parameters"
          },
          "404": {
            "description": "Unknown manual or section"
          }
        }
      }
    },
    "/answers/{answerId}": {
      "get": {
        "operationId": "getAnswer",
        "summary": "Fetch a published answer with scope, warnings and citations",
        "parameters": [
          {
            "name": "answerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "configuration_scope": {
                      "type": "string"
                    },
                    "answer": {
                      "type": "string"
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string"
                          },
                          "citations": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "text",
                          "citations"
                        ]
                      }
                    },
                    "answer_citations": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "url",
                    "models",
                    "configuration_scope",
                    "answer",
                    "warnings",
                    "answer_citations",
                    "steps",
                    "details",
                    "sources"
                  ]
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid search parameters"
          },
          "404": {
            "description": "Unknown manual or section"
          }
        }
      }
    },
    "/manuals": {
      "get": {
        "operationId": "listManuals",
        "summary": "List digital manuals and section links",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Published content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "manuals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "version": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "source_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "sections": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "start_page": {
                                  "type": "integer"
                                },
                                "end_page": {
                                  "type": "integer"
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "api_url": {
                                  "type": "string",
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "id",
                                "title",
                                "start_page",
                                "end_page",
                                "url",
                                "api_url"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "version",
                          "model",
                          "updated_at",
                          "url",
                          "source_url",
                          "sections"
                        ]
                      }
                    }
                  },
                  "required": [
                    "manuals"
                  ]
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid search parameters"
          },
          "404": {
            "description": "Unknown manual or section"
          }
        }
      }
    },
    "/manuals/{manualId}": {
      "get": {
        "operationId": "getManual",
        "summary": "Fetch edition and complete table of contents",
        "parameters": [
          {
            "name": "manualId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "source_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "sections": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "start_page": {
                            "type": "integer"
                          },
                          "end_page": {
                            "type": "integer"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "api_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "start_page",
                          "end_page",
                          "url",
                          "api_url"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "version",
                    "model",
                    "updated_at",
                    "url",
                    "source_url",
                    "sections"
                  ]
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid search parameters"
          },
          "404": {
            "description": "Unknown manual or section"
          }
        }
      }
    },
    "/manuals/{manualId}/sections/{sectionId}": {
      "get": {
        "operationId": "getManualSection",
        "summary": "Fetch complete section, figures, tables and physical PDF citations",
        "parameters": [
          {
            "name": "manualId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "markdown"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "manual_id": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "source_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "source_sha256": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string"
                    },
                    "blocks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "heading",
                              "text",
                              "figure",
                              "table"
                            ]
                          },
                          "source": {
                            "type": "object",
                            "properties": {
                              "page": {
                                "type": "integer"
                              },
                              "block": {
                                "type": "integer"
                              },
                              "sha256": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "page",
                              "block",
                              "sha256"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "text": {
                            "type": "string"
                          },
                          "html": {
                            "type": "string",
                            "description": "Sanitized source table or note HTML; retain rows and columns."
                          },
                          "image": {
                            "type": "string",
                            "format": "uri"
                          },
                          "caption": {
                            "type": "string"
                          },
                          "comparison_only": {
                            "type": "boolean",
                            "description": "True for EVO Lite 6K Enterprise camera specifications."
                          }
                        },
                        "required": [
                          "type",
                          "source",
                          "url"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "manual_id",
                    "model",
                    "version",
                    "url",
                    "source_url",
                    "source_sha256",
                    "updated_at",
                    "scope",
                    "blocks"
                  ]
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid search parameters"
          },
          "404": {
            "description": "Unknown manual or section"
          }
        }
      }
    }
  }
}