Changes

Jump to navigation Jump to search
811 bytes added ,  22:46, 27 September 2012
Line 85: Line 85:  
Data to receive:
 
Data to receive:
 
:* property value in JSON notation.
 
:* property value in JSON notation.
 +
 +
=== Usage statistics ===
 +
 +
In order to collect [[Platform_Team/Usage_Statistics|usage statistics]] gathered in local users' environment by [[Platform_Team/Server_Kit/sugar-client|sugar-client]], API provides related commands for ''User'' [[Sugar Network]] resource.
 +
 +
'''GET''' /user/''GUID''?cmd='''stats-info'''
 +
 +
Returns a dictionary with RRD configuration settings for local stats collecting process that user side should use to avoid problem while uploading stats to the server.
 +
 +
'''POST''' /user/''GUID''?cmd='''stats-upload'''
 +
 +
Upload statistics. Request content should be in JSON notation and be a dictionary of:
 +
 +
* {{Code|name}} name of RRD database to upload stats to;
 +
* {{Code|values}} and array of {{Code|timestamp, row}} tuples when {{Code|row}} is a dictionary of database field names and values.
    
=== Notifications ===
 
=== Notifications ===

Navigation menu