Desktop Connect Data Store API reference
This document holds the technical & environmental details required to enable bespoke applications to use Geomant’s Desktop Connect data storage, for providing additional data to the call.
DesktopConnect Data Store service publishes the following interfaces to connecting clients:
- RESTful API, JSONP based using http get and http post
REST API Methods
The service offers the following methods:
- getState
- getValues
- setValues
getState
Invoking this method returns the overall status of the cache data store service
Parameters
None
Syntax
Access |
URI |
Invoke URL |
http://[ServerURL]/GeoDataStore/JsonService?method=getState |
Return value
Value |
Description |
CREATED |
The data store has been created but it’s not started |
CREATING |
The data store is creating |
DESTROYED |
The data store is destroyed |
DESTROYING |
The data store is disposing |
FAILED |
Failure occurred during create, start or stop |
STARTED |
The data store is created and available |
STARTING |
The data store is created but not yet available |
STOPPED |
The data store is stopped but not destroyed |
STOPPING |
The data store is stopping |
Example
Query the state of the REST service
Action |
Value |
Request |
http://[ServerURL]/GeoDataStore/JsonService?method=getState |
Response |
{"result":"STARTED","method":"getState"} |
setValues
Creates a new data container with the container identifier and stores the name – value pairs that have been added, if the container identifier is missing the method will generate a new id, if with the given container identifier there is already data associated in the data store the method updates the given data container associated with the id.
Parameter
Value |
Description |
id |
Data container identified that is provided upon creation time, e.g. geo_1233312 |
data |
JSON formatted data container – name value pairs. |
Syntax
Access |
URI |
Invoke URL |
http://[ServerURL]/GeoDataStore/JsonService?method=setValues&id=[DataContainerId]&data={“Data1”:”Value1”,[......]} |
Return value
Value |
Description |
result |
Contains the identified of the the added data |
method |
The invoked method |
Example
Set the following parameters
- Firstname: John
- Lastname: Smith
- Id: geo_1001
Action |
Value |
Request |
http://[ServerURL]/GeoDataStore/JsonService?method=setValues&id=geo_1001&data={"Firstname":"John","Lastname":"Smith"}" |
Response |
{"result":"geo_1001","method":"setValues"} |
getValues
Retrieves stored data associated with the data identifier.
Parameters
Value |
Desciption |
id |
Data container identified, e.g. geo_1233312 |
Syntax
Access |
URI |
Invoke URL |
http://[ServerURL]/GeoDataStore/JsonService?method=getValues&id=[DataContainerId] |
Return value
Value |
Description |
result |
Contains data associated with the given identified, this is provided as a JSON container, and can be URL encoded. |
method |
The invoked method |
Example
Retrieve data with id: geo_1001
Action |
Value |
Request |
http://[ServerURL]/GeoDataStore/JsonService?method=getValues&id=geo_1001 |
Response |
{"result":"{"Firstname":"John","Lastname":"Smith"}","method":"getValues"} |