Admin API

HFactory Server administration tasks can be performed by sending REST requests to the /_apps route. The server returns results in JSON format.

Installing apps

Note : This describes the manual installation of apps.

Installing an app is as simple as unpacking an app archive in the app store. Note that an app archive must have all its content within a single top-level directory whose name is the name of the app – please check for this before unpacking the app!

Setting up an app

To setup an app A, send a POST request to the /_apps route with setup as the operation to perform:

POST /_apps?op=setup&app=A

This will create the HBase tables required by the application.

Cleaning up an app

Conversely, to cleanup an app A, send a POST request to the /_apps route with cleanup as the operation to perform:

POST /_apps?op=cleanup&app=A

This will delete all the HBase tables that were created by the setup operation.

Note : The cleanup of an app can only be performed if the app is stopped. If the app is started, stop it first.

Listing apps

To get the list of all installed apps, send a GET request to the /_apps route:

GET /_apps

This will return a list of all apps in the app store along with their state (started or stopped) in JSON format.

Starting and stopping apps

To start an app A, send a POST request to the /_apps route with start as the operation to perform:

POST /_apps?op=start&app=A[&config=C]

The config parameter specifies the configuration file to use and is optional; if not specified the configuration file for app A is A.conf.

Similarly, to stop app A:

POST /_apps?op=stop&app=A