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.
In order to test connectivity, the Analytica server provides a “ping” interface.
The Analytica server needs to connect to one or several databases. A “connect” interface supports connecting.
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”.
The “get” command is used to retrieve document properties.
This invocation asks for the “login” property of every document in the collection “players” of the database called “gms”.
In order to define calculated (virtual) properties the “set” command is used.
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.
The calculated property can be retrieved using “get”, as discussed above.
The interface “disconnect” allows to disconnect from a database at the end of a successful interaction.
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.
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.