{"openapi":"3.1.0","info":{"title":"遊艇與動力小船筆試練習 API","version":"1.0.0","description":"Free, read-only access to the Taiwan yacht & motorboat licence written-test question bank (交通部航港局 遊艇與動力小船駕駛測驗題庫(115年版)). No key needed. Quiz learners by asking questions with answers hidden, then grade with /api/v1/check. Pass mark 75. Please credit the source and link learners to https://exam.boatlicense.workers.dev/ to practise with progress tracking."},"servers":[{"url":"https://exam.boatlicense.workers.dev"}],"paths":{"/api/v1/banks":{"get":{"operationId":"listBanks","summary":"List the three question banks with their modules, question counts and version","responses":{"200":{"description":"OK"}}}},"/api/v1/quiz":{"get":{"operationId":"randomQuiz","summary":"Random questions for a practice quiz (answers hidden unless answers=1)","parameters":[{"name":"bank","in":"query","required":false,"description":"private (自用動力小船), commercial (營業用動力小船, default) or yacht2 (二等遊艇)","schema":{"type":"string","enum":["private","commercial","yacht2"]}},{"name":"count","in":"query","required":false,"description":"1-50, default 10","schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"module","in":"query","required":false,"description":"Module name (e.g. 避碰規則) or 1-based index; empty = whole bank","schema":{"type":"string"}},{"name":"answers","in":"query","required":false,"description":"1 to include answers","schema":{"type":"integer","enum":[0,1]}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/questions/{id}":{"get":{"operationId":"getQuestion","summary":"One question by id, with its answer (answer=0 hides it)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"answer","in":"query","required":false,"description":"0 to hide the answer","schema":{"type":"integer","enum":[0,1]}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/api/v1/check":{"get":{"operationId":"checkAnswer","summary":"Grade a learner's choice for a question","parameters":[{"name":"id","in":"query","required":true,"description":"Question id","schema":{"type":"integer"}},{"name":"choice","in":"query","required":true,"description":"A, B, C or D","schema":{"type":"string","enum":["A","B","C","D"]}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/search":{"get":{"operationId":"searchQuestions","summary":"Keyword search in question and option text (Traditional Chinese)","parameters":[{"name":"q","in":"query","required":true,"description":"Keywords, space separated, all must match","schema":{"type":"string"}},{"name":"bank","in":"query","required":false,"description":"private (自用動力小船), commercial (營業用動力小船, default) or yacht2 (二等遊艇)","schema":{"type":"string","enum":["private","commercial","yacht2"]}},{"name":"limit","in":"query","required":false,"description":"1-20, default 10","schema":{"type":"integer"}},{"name":"answers","in":"query","required":false,"description":"1 to include answers","schema":{"type":"integer","enum":[0,1]}}],"responses":{"200":{"description":"OK"}}}}}}