Difference between revisions of "Sugar Network/API"
Jump to navigation
Jump to search
m (→Overview) |
|||
Line 7: | Line 7: | ||
The common RESTful url format is: | The common RESTful url format is: | ||
− | http[s]://<SERVER>/<OBJECT> | + | http[s]://<SERVER>/<OBJECT>/<COMMAND>?<AUTH-TOKEN>=<VALUE>[&<ARG>=<VALUE>]..] |
For the beginning, API is not secure for reasons: | For the beginning, API is not secure for reasons: | ||
Line 19: | Line 19: | ||
* The {{Code|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 {{Code|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 {{Code|OBJECT}} value is one of the [[#Objects|following]] objects. When {{Code|COMMAND}} and a set of {{Code|ARG}}s depend on {{Code|OBJECT}}. | + | The {{Code|OBJECT}} value is one of the [[#Objects|following]] objects. When {{Code|COMMAND}} and a set of {{Code|ARG}}s depend on {{Code|OBJECT}}. Besides, particular {{Code|COMMANDS}} can input and return data in [[Wikipedia:Json|JSON]] notation. |
== Objects == | == Objects == |
Revision as of 09:09, 18 December 2011
This page describes the APi that Sugar Network clients use to interact with Sugar Network server. See also the introduction page and technical overview.
Overview
The API is RESTful and being served via HTTP(S) using JSON notation.
The common RESTful url format is:
http[s]://<SERVER>/<OBJECT>/<COMMAND>?<AUTH-TOKEN>=<VALUE>[&<ARG>=<VALUE>]..]
For the beginning, API is not secure for reasons:
- Implement initial version in short period of time;
- The only users, for the beginning, are teachers and students from one-teacher scholls.
In particular:
- API is being provided only via HTTP;
- The
AUTH-TOKEN
is theuid
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 following objects. When COMMAND
and a set of ARG
s depend on OBJECT
. Besides, particular COMMANDS
can input and return data in JSON notation.