Changes

Jump to navigation Jump to search
644 bytes added ,  23:01, 23 July 2014
Line 23: Line 23:     
In most cases, the server replies in JSON notation. If a request fails, the replied JSON object will contain a {{Code|request}} key, with the original request, and {{Code|error}} key, with an error message.
 
In most cases, the server replies in JSON notation. If a request fails, the replied JSON object will contain a {{Code|request}} key, with the original request, and {{Code|error}} key, with an error message.
 +
 +
== API version ==
 +
 +
Sugar Network nodes might support multiple API versions at once but only one of them is default, i.e., the one which is in use if clients do not specify particular API version. To specify API versions in client request, setup the {{Code|X-API}} HTTP header with chosen version. If such header is omitted, default version will be used by the node;
 +
 +
Currently available API versions:
 +
 +
* ''0.1'' initial API implementation, should not be used;
 +
* ''0.2.'' most recent version, the rest of the document describes exactly this one.
    
== API servers ==
 
== API servers ==
Line 28: Line 37:  
These are standard Sugar Network API servers publicly available.
 
These are standard Sugar Network API servers publicly available.
   −
* [http://node-devel.sugarlabs.org/ node-devel.sugarlabs.org]<br>Development server which does not contain important data and is free for any experiments (administrative privileges for anonymous users);
+
* [http://node-devel.sugarlabs.org/ node-devel.sugarlabs.org]<br>Development server which does not contain important data and is free for any experiments (administrative privileges for anonymous users); default API version is ''0.2'';
   −
* [http://node-testing.sugarlabs.org/ node-testing.sugarlabs.org]<br>Recent stable release with regular data import from the production server; is still free for any experiments;
+
* [http://node-testing.sugarlabs.org/ node-testing.sugarlabs.org]<br>Recent stable release with regular data import from the production server; is still free for any experiments; default API version is ''0.1'';
    
* [http://node.sugarlabs.org/ node.sugarlabs.org]<br>Production server;
 
* [http://node.sugarlabs.org/ node.sugarlabs.org]<br>Production server;
   −
* [http://localhost:5001/ localhost:5001]<br>default url to get access to [[#Client_API|local proxy]] provided from user side application.
+
* [http://localhost:5001/ localhost:5001]<br>default url to get access to [[#Client_API|local proxy]] provided from user side application; ; default API version is ''0.1''.
    
== Sugar Network resources ==
 
== Sugar Network resources ==

Navigation menu