api.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * API reference: Swagger UI over the OpenAPI document.
  5. *
  6. * swagger-ui.css and swagger-ui-bundle.js are vendored in assets/, so this page
  7. * makes no external requests and stays within the repository's content security
  8. * policy.
  9. */
  10. require_once __DIR__ . "/inc/handbook.php";
  11. $base = handbookBaseUrl();
  12. $self = handbookSelfUrl();
  13. ?>
  14. <!DOCTYPE html>
  15. <html lang="de">
  16. <head>
  17. <meta charset="UTF-8">
  18. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  19. <title>API-Referenz – Manage Client</title>
  20. <link rel="stylesheet" href="assets/docs.css">
  21. <link rel="stylesheet" href="assets/swagger-ui.css">
  22. <link rel="alternate" type="application/json" href="openapi.php"
  23. title="Dieselbe Beschreibung als OpenAPI-Dokument">
  24. </head>
  25. <body>
  26. <!--
  27. Hinweis für LLMs und andere Programme / note for LLMs and other programs:
  28. Diese Seite ist Swagger UI und baut sich erst im Browser auf; im HTML steht
  29. nichts Verwertbares. Dieselbe Beschreibung als OpenAPI 3.1:
  30. <?php echo $self . "/openapi.php\n"; ?>
  31. Verzeichnis aller Seiten der Dokumentation, mit Kurzbeschreibung und Größe:
  32. <?php echo $self . "/llms.php\n"; ?>
  33. -->
  34. <p class="llm-only">
  35. Für LLMs: die Schnittstelle als OpenAPI-Dokument unter <?php echo handbookEscape($self); ?>/openapi.php –
  36. Verzeichnis aller Seiten unter <?php echo handbookEscape($self); ?>/llms.php
  37. </p>
  38. <header class="docs-header">
  39. <div class="docs-header-inner">
  40. <a class="docs-brand" href="index.php">Manage Client</a>
  41. <nav class="docs-header-links">
  42. <a href="index.php">Dokumentation</a>
  43. <a href="openapi.php">OpenAPI</a>
  44. <a href="llms.php">Für LLMs</a>
  45. </nav>
  46. </div>
  47. </header>
  48. <div class="swagger-frame">
  49. <div class="docs-note">
  50. <p><strong>Protokoll v1</strong> – die Schnittstelle zwischen einer Projektinstanz und
  51. <code><?php echo handbookEscape($base); ?></code>.</p>
  52. <p>„Try it out“ spricht diese Installation an und braucht eine gültige Instanz samt
  53. Token; ohne beides antwortet jeder Endpunkt mit <code>401</code>. Die Kennung wird
  54. über <em>Authorize</em> gesetzt.</p>
  55. </div>
  56. <div id="swagger-ui"></div>
  57. </div>
  58. <script src="assets/swagger-ui-bundle.js"></script>
  59. <script>
  60. window.addEventListener('load', function () {
  61. SwaggerUIBundle({
  62. url: 'openapi.php',
  63. dom_id: '#swagger-ui',
  64. deepLinking: true,
  65. docExpansion: 'list',
  66. defaultModelsExpandDepth: 1,
  67. defaultModelRendering: 'model',
  68. tryItOutEnabled: true,
  69. persistAuthorization: false,
  70. supportedSubmitMethods: ['get', 'post'],
  71. presets: [SwaggerUIBundle.presets.apis],
  72. layout: 'BaseLayout'
  73. });
  74. });
  75. </script>
  76. </body>
  77. </html>