Skip to content

timestreams.add_measurement_files XML RPC procedure

pszjmb1 edited this page Jul 5, 2012 · 1 revision

Timestreams is an API that provides functions to add and organise sensor data. This page describes the timestreams.upload_measurement_files XML-RPC API procedure.

Description

A POST request containing this procedure name will add multiple files to a measurement container for a given blog's device. This procedure returns an integer value indicating the number of records that were added. The following is the procedure call signature required to add measurement files: <methodCall> <methodName>timestreams.add_measurement_files</methodName> <params> <param><value><string>UserName</string></value></param> <param><value><string>Password</string></value></param> <param><value><string>MeasurementContainerName</string></value></param> <param><array><data><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> <member> <name>timestamp</name><value><string>Timestamp</string></value> </member> </struct> </value></data></array></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 (One struct per file to upload)
Parameter Description
Name The name to use for this file
Type The file MIME type
Bits Base64-encoded binary data
Timestamp Time the reading was taken in ('1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC).

Example Response:

<?xml version="1.0"?> <methodResponse> <params> <param> <value> <int>2</int> </value> </param> </params> </methodResponse>