Changes

Jump to navigation Jump to search
253 bytes added ,  10:17, 19 December 2011
Line 3: Line 3:  
== Overview ==
 
== Overview ==
   −
The API is [[Wikipedia:Restful|RESTful]] and being served via HTTP(S) using [[Wikipedia:Json|JSON]] notation.
+
The API is [[Wikipedia:Restful|RESTful]] and being served via HTTP(S) using [[Wikipedia:Json|JSON]] notation. The API operates with [[#Resources|resources]] that are collections of objects. All objects are identified by global unique identifiers, GUIDs.
   −
The common RESTful url format is:
+
The common RESTful request url format is:
   −
  http[s]://<SERVER>/<OBJECT>/<ACTION>?<AUTH-TOKEN>=<VALUE>[&<ARG>=<VALUE>]..]
+
  http[s]://<SERVER>/<RESOURCE>[/<GUID|ACTION>[/<ACTION>]]?<AUTH-TOKEN>=<VALUE>[&<ARG>=<VALUE>]..]
 +
 
 +
When:
 +
 
 +
* ''RESOURCE'' value is one of [[#Resources|existing]] resources;
 +
* ''GUID'', the ''RESOURCE'''s particular object;
 +
* ''ACTION'' and a set of ''ARG''s depend on particular ''RESOURCE''.
 +
 
 +
Besides, particular request can send and receive data in [[Wikipedia:Json|JSON]] notation. If request processing was failed, the reply is a JSON directory that contains {{Code|error}} key with error message.
    
For the beginning, API is not secure for reasons:
 
For the beginning, API is not secure for reasons:
    
* Implement initial version in short period of time;
 
* Implement initial version in short period of time;
* The only users, for the beginning, are teachers and students from one-teacher scholls.
+
* The only users, for the beginning, are teachers and students from one-teacher off-line schools.
    
In particular:
 
In particular:
Line 18: Line 26:  
* API is being provided only via HTTP;
 
* API is being provided only via HTTP;
 
* The ''AUTH-TOKEN'' is the {{Code|uid}} which is a hashed value from Sugar profile public SSH key (the same as JID value in Sugar Shell but without the domain part) that does not require any handshake procedures.
 
* The ''AUTH-TOKEN'' is the {{Code|uid}} which is a hashed value from Sugar profile public SSH key (the same as JID value in Sugar Shell but without the domain part) that does not require any handshake procedures.
  −
The ''OBJECT'' value is one of the [[#Objects|following]] objects. When ''ACTION'' and a set of ''ARG''s depend on ''OBJECT''. Besides, particular ''ACTION'' can input and return data in [[Wikipedia:Json|JSON]] notation. If ''ACTION'' was failed, it returns the JSON directory that contains {{Code|error}} key with error message.
      
== Objects ==
 
== Objects ==

Navigation menu