Sugar Network/API: Difference between revisions
m →Usage |
|||
| Line 9: | Line 9: | ||
The API is [[Wikipedia:Restful|RESTful]] and being served via HTTP(S) using [[Wikipedia:Json|JSON]] notation. The common RESTful request url format is: | The API is [[Wikipedia:Restful|RESTful]] and being served via HTTP(S) using [[Wikipedia:Json|JSON]] notation. The common RESTful request url format is: | ||
http[s]:// | http[s]://''SERVER''[/''RESOURCE''[/''GUID''[/''PROPERTY'']]][?[cmd=''COMMAND''][&''ARGUMENT''=''VALUE''..]] | ||
When: | When: | ||
| Line 20: | Line 20: | ||
* {{Code|ARGUMENT}}s and {{Code|VALUE}}s depend on particular [[#Actions|action]]. | * {{Code|ARGUMENT}}s and {{Code|VALUE}}s depend on particular [[#Actions|action]]. | ||
In [[#Common_actions|most cases]], server replies in JSON notation. If request was failed, the replied JSON object will contain {{Code|request}} key, with original request, and {{Code|error}} key, with error message. | |||
In [[#Common_actions|most cases]], server replies | |||
== API servers == | == API servers == | ||