Skip to content

Commit 497b04e

Browse files
committed
added endpoint for querying the server's storage engine
1 parent 50ae288 commit 497b04e

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

lib/ArangoDBClient/AdminHandler.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ class AdminHandler extends Handler
2727
* details for server version
2828
*/
2929
const OPTION_DETAILS = 'details';
30+
31+
/**
32+
* Get the server's storage engine
33+
*
34+
* This will throw if the engine data cannot be retrieved
35+
*
36+
* @throws Exception
37+
*
38+
* @return mixed - an object returning the engine information
39+
* @since 3.2
40+
*/
41+
public function getEngine()
42+
{
43+
$response = $this->getConnection()->get(Urls::URL_ENGINE);
44+
return $response->getJson();
45+
}
3046

3147
/**
3248
* Get the server version

lib/ArangoDBClient/Urls.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ abstract class Urls
162162
* URL for transactions
163163
*/
164164
const URL_TRANSACTION = '/_api/transaction';
165+
166+
/**
167+
* URL for storage engine
168+
*/
169+
const URL_ENGINE = '/_api/engine';
165170

166171
/**
167172
* URL for admin version

0 commit comments

Comments
 (0)