REST Interface

The Analytica server provides a REST interface in order to support 3rd party clients. Any environment or programming language supporting REST technology is able to interact with the full feature set of the Analytica server.

The following is a dialog between a clients and the Analytica server. The invocations are as issued by the client and as received by the Analytica server.

Ping

In order to test connectivity, the Analytica server provides a “ping” interface.

http://localhost:8123/ping

Connect

The Analytica server needs to connect to one or several databases. A “connect” interface supports connecting.

http://localhost:8123/connect/localhost/27017/---/---/gms/MongoDB

This invocation tells the Analytica server to connect to the MongoDB server on localhost and the default port using the default password and user name (“—”). The database to connect to is called “gms”.

Get

The “get” command is used to retrieve document properties.

http://localhost:8123/get/gms.players.login

This invocation asks for the “login” property of every document in the collection “players” of the database called “gms”.

Set

In order to define calculated (virtual) properties the “set” command is used.

http://localhost:8123/set/gms.players.totalscore/sum(games.sessions.score)

After this invocation each document in the collection “players” has an additional calculated property (not visible in the database) that contains the sum of all scores across all game sessions.

http://localhost:8123/get/gms.players.totalscore

The calculated property can be retrieved using “get”, as discussed above.

Disconnect

The interface “disconnect” allows to disconnect from a database at the end of a successful interaction.

http://localhost:8123/disconnect/localhost/27017/gms/MongoDB

Result Data Structure

In order to make the client-side programming as easy as possible, all REST invocations return the same result structure. It contains an indicator if the invocation was successful and if not, a set of error messages. It contains the configuration settings as seen at the time of invocation in addition to the result itself. Various other values are returned also so that the client is always aware of the overall context of the invocation.

API Coverage

Above invocations are only a small subset of the available signatures in the REST interface of the Analytica server. A rich and extensive REST API is available and the Excel client as well as the Shell and iPhone application interact with the Analytica server using its REST interface.