NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

Add version endpoint

76ec0e88
Lars Lehmann <[email protected]> 4 years, 3 months ago
data/web/api/openapi.yaml | 21 +++++++++++++++++++++
 data/web/json_api.php     |  4 ++++
 2 files changed, 25 insertions(+)

Diff

diff --git a/data/web/api/openapi.yaml b/data/web/api/openapi.yaml
index ef8b0bd1..834b8589 100644
--- a/data/web/api/openapi.yaml
+++ b/data/web/api/openapi.yaml
@@ -5072,6 +5072,27 @@ paths:
         of used storage.
       operationId: Get vmail status
       summary: Get vmail status
+  /api/v1/get/status/version:
+    get:
+      responses:
+        "401":
+          $ref: "#/components/responses/Unauthorized"
+        "200":
+          content:
+            application/json:
+              examples:
+                response:
+                  value:
+                    version: "2022-04"
+          description: OK
+          headers: {}
+      tags:
+        - Status
+      description: >-
+        Using this endpoint you can get the current running release of this
+        instance.
+      operationId: Get version status
+      summary: Get version status
   /api/v1/get/syncjobs/all/no_log:
     get:
       responses:
diff --git a/data/web/json_api.php b/data/web/json_api.php
index efe02340..8d64a0b0 100644
--- a/data/web/json_api.php
+++ b/data/web/json_api.php
@@ -1472,6 +1472,10 @@ if (isset($_GET['query'])) {
                   'solr_documents' => $solr_documents
                 ));
               break;
+              case "version":
+                echo json_encode(array(
+                  'version' => $GLOBALS['MAILCOW_GIT_VERSION']
+                ));
               }
             }
           break;