{"openapi":"3.0.3","info":{"title":"Kubuno API","version":"1.0","description":"API REST publique et **en lecture seule** de Kubuno : marketplace (modules, catégories, avis), manifeste signé des artefacts.\n\nAucune authentification requise. Seules les méthodes `GET`/`HEAD`/`OPTIONS` sont acceptées. Réponses en cache 5 minutes.","license":{"name":"AGPL-3.0-or-later"}},"servers":[{"url":"https://api.kubuno.com/v1","description":"Kubuno"}],"tags":[{"name":"Modules","description":"La marketplace : modules officiels et communautaires"},{"name":"Catégories","description":"Les catégories de la marketplace"},{"name":"Manifeste","description":"Le manifeste signé des artefacts vérifiés"}],"paths":{"/modules":{"get":{"tags":["Modules"],"summary":"Liste des modules","operationId":"listModules","description":"Liste paginée des modules publiés (officiels + communautaires). Avec `os`/`arch`, la réponse est adaptée à la plateforme appelante : `artifacts` est restreint et `artifact` désigne l'artefact à installer.","parameters":[{"name":"page","in":"query","description":"Numéro de page (défaut 1).","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","description":"Éléments par page (défaut 20, max 100).","required":false,"schema":{"type":"integer"}},{"name":"category","in":"query","description":"Filtrer par catégorie (ex. Productivité).","required":false,"schema":{"type":"string"}},{"name":"official","in":"query","description":"1 = officiels, 0 = communauté.","schema":{"type":"string","enum":["1","0"]}},{"name":"featured","in":"query","description":"1 = uniquement les mis en avant.","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Recherche (nom, auteur, tags).","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"Tri.","schema":{"type":"string","enum":["popular","rating","name","downloads"],"default":"popular"}},{"name":"os","in":"query","description":"Système de l'appelant.","schema":{"type":"string","enum":["linux","windows","macos"]}},{"name":"arch","in":"query","description":"Architecture de l'appelant.","schema":{"type":"string","enum":["x86_64","aarch64","amd64","arm64"]}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleCollection"}}}}}}},"/modules/{id}":{"get":{"tags":["Modules"],"summary":"Détail d'un module","operationId":"getModule","parameters":[{"name":"id","in":"path","required":true,"description":"Identifiant du module (ex. p2pnas).","schema":{"type":"string"}},{"name":"os","in":"query","description":"Système de l'appelant.","required":false,"schema":{"type":"string"}},{"name":"arch","in":"query","description":"Architecture de l'appelant.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleResource"}}}},"404":{"description":"Ressource introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/modules/{id}/reviews":{"get":{"tags":["Modules"],"summary":"Avis publiés d'un module","operationId":"listModuleReviews","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Nombre d'avis (défaut 20, max 200).","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewCollection"}}}},"404":{"description":"Ressource introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/categories":{"get":{"tags":["Catégories"],"summary":"Catégories de la marketplace","operationId":"listCategories","responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCollection"}}}}}}},"/manifest":{"get":{"tags":["Manifeste"],"summary":"Manifeste signé des artefacts vérifiés","operationId":"getManifest","description":"Le corps est signé tel quel (Ed25519). La signature détachée, en base64, est dans l'en-tête `X-Kubuno-Signature` ; `X-Kubuno-Signature-Alg` vaut `ed25519`. Vérifiez avec la clé de `/signing-key`.","responses":{"200":{"description":"Manifeste JSON","headers":{"X-Kubuno-Signature":{"schema":{"type":"string"},"description":"Signature Ed25519 détachée, base64."},"X-Kubuno-Signature-Alg":{"schema":{"type":"string"}}}},"404":{"description":"Ressource introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/signing-key":{"get":{"tags":["Manifeste"],"summary":"Clé publique de signature","operationId":"getSigningKey","responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SigningKeyResource"}}}},"404":{"description":"Ressource introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Artifact":{"type":"object","properties":{"os":{"type":"string"},"arch":{"type":"string"},"kind":{"type":"string"},"filename":{"type":"string"},"url":{"type":"string"},"size":{"type":"integer"},"sha256":{"type":"string","nullable":true},"verified":{"type":"boolean","description":"Vrai si le catalogue a calculé lui-même l'empreinte."},"release":{"type":"string","nullable":true}}},"Module":{"type":"object","properties":{"id":{"type":"string","example":"p2pnas"},"name":{"type":"string"},"author":{"type":"string"},"official":{"type":"boolean"},"category":{"type":"string"},"accent":{"type":"string","example":"#1a73e8"},"version":{"type":"string"},"rating":{"type":"number","format":"float","nullable":true},"reviews":{"type":"integer","description":"Nombre d'avis publiés."},"downloads":{"type":"integer"},"installs":{"type":"string","description":"Nombre d'installations, formaté."},"installs_count":{"type":"integer"},"updated":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"description":{"type":"string"},"license":{"type":"string"},"featured":{"type":"boolean"},"installable":{"type":"boolean","description":"Un artefact installable existe (pour la plateforme demandée, le cas échéant)."},"artifact":{"allOf":[{"$ref":"#/components/schemas/Artifact"}],"nullable":true,"description":"L'artefact à installer pour la plateforme demandée."},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/Artifact"}},"links":{"type":"object"}}},"Review":{"type":"object","properties":{"id":{"type":"integer"},"author":{"type":"string"},"rating":{"type":"integer"},"body":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"Meta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"},"total_pages":{"type":"integer"}}},"Links":{"type":"object","properties":{"self":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"prev":{"type":"string","nullable":true},"next":{"type":"string","nullable":true}}},"ModuleCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Module"}},"meta":{"$ref":"#/components/schemas/Meta"},"links":{"$ref":"#/components/schemas/Links"}}},"ModuleResource":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Module"}}},"ReviewCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Review"}},"meta":{"type":"object","properties":{"total":{"type":"integer"},"average":{"type":"number","nullable":true}}}}},"Category":{"type":"object","properties":{"name":{"type":"string"},"modules":{"type":"string"}}},"CategoryCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"meta":{"type":"object"}}},"SigningKeyResource":{"type":"object","properties":{"data":{"type":"object","properties":{"alg":{"type":"string","example":"ed25519"},"public_key":{"type":"string","description":"Base64, 32 octets."}}}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}