-
Notifications
You must be signed in to change notification settings - Fork 0
timestreams.add_measurement_file XML RPC procedure
Timestreams is an API that provides functions to add and organise sensor data. This page describes the timestreams.upload_measurement_file XML-RPC API procedure.
A POST request containing this procedure name will add a single file to a measurement container for a given blog's device. This procedure returns the value 1 indicating that a record was added. The following is the procedure call signature required to add a measurement:
<methodCall> <methodName>timestreams.add_measurement_file</methodName> <params> <param><value><string>UserName</string></value></param> <param><value><string>Password</string></value></param> <param><value><string>MeasurementContainerName</string></value></param> <param><value><struct><member><name>name</name><value><string>red.png</string></value></member><member><name>bits</name><value><base64>iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wGDw0zKcAK/Q0AAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAEklEQVQY02P8z4APMDGMSmMBAEEsARNlYhAzAAAAAElFTkSuQmCC</base64></value></member><member><name>type</name><value><string>image/png</string></value></member></struct></value></param> <param><value><string>Timestamp</string></value></param> </params> </methodCall>
Parameter | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
User Name | Name of blog user | ||||||||
Password | Password of blog user | ||||||||
Measurement Container Name | Value returned from timestreams.create_measurements | ||||||||
Struct |
| ||||||||
Timestamp (Optional) | Time the reading was taken in ('1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC). If this parameter is excluded then the current time from the server will be stored. |
<?xml version="1.0"?> <methodResponse> <params> <param> <value> <string>http://192.168.56.101/wordpress/wp-content/uploads/2012/06/wp_2_ts_Image_URL_11_red.png</string> </value> </param> </params> </methodResponse>