Add version endpoint

This commit is contained in:
Lars Lehmann 2022-04-25 22:44:41 +02:00
parent 374cc64601
commit 76ec0e888b
No known key found for this signature in database
GPG Key ID: BC832CCD9A8BAE4D
2 changed files with 25 additions and 0 deletions

View File

@ -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:

View File

@ -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;