Skip to content

Commit a09c9e7

Browse files
committed
Add Server info /fusiondb/version end-point
1 parent c6ab22c commit a09c9e7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main/xar-resources/api.xqm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ declare namespace rest = "http://exquery.org/ns/restxq";
77
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
88
declare namespace http = "http://expath.org/ns/http-client";
99
import module namespace sm = "http://exist-db.org/xquery/securitymanager";
10+
import module namespace system = "http://exist-db.org/xquery/system";
1011

1112
import module namespace config = "http://fusiondb.com/ns/studio/api/config" at "modules/config.xqm";
1213
import module namespace col = "http://fusiondb.com/ns/studio/api/collection" at "modules/collection.xqm";
@@ -39,7 +40,13 @@ declare
3940
function api:version() {
4041
api:cors-allow(
4142
map {
42-
"version": $config:version
43+
"version": $config:version,
44+
"server": map {
45+
"product-name": system:get-product-name(),
46+
"version": system:get-version(),
47+
"revision": system:get-revision(),
48+
"build": system:get-build()
49+
}
4350
}
4451
)
4552
};

0 commit comments

Comments
 (0)