DLx Data Download API - outputType

161 views
Skip to first unread message

thomas

unread,
Nov 11, 2014, 7:37:15 AM11/11/14
to resol...@googlegroups.com

Hi,

just tried the download api on my dl2v2.
The example is working fine:

$ curl --silent "http://<dl2Adress>/dlx/download/live?sessionAuthUsername=admin&sessionAuthPassword=admin&outputType=json&source=current" | head
{
       
"language" : "de",
       
"headers" : [
       
{
               
"id" : "00_0010_7821_0100",
               
"description" : "VBus 0: COSMO Multi [Regler]",
               
"channel" : 0,
               
"destination_address" : 16,
               
"source_address" : 30753,
               
"protocol_version" : 16,


but if I try to use outputType=text-csv-lf I get the same output:
$ curl --silent "http://<dl2Adress>/dlx/download/live?sessionAuthUsername=admin&sessionAuthPassword=admin&outputType=text-csv-lf&source=current" | head
{
       
"language" : "de",
       
"headers" : [
       
{
               
"id" : "00_0010_7821_0100",
               
"description" : "VBus 0: COSMO Multi [Regler]",
               
"channel" : 0,
               
"destination_address" : 16,
               
"source_address" : 30753,
               
"protocol_version" : 16,

I would expect a csv like output.

any ideas?

thanks,
-thomas

Daniel Wippermann

unread,
Nov 11, 2014, 10:04:00 AM11/11/14
to Resol Vbus
Hi Thomas,

the web service endpoint „/dlx/download/live“ ignores the „outputType“ parameter and always returns JSON payload. Please use the „/dlx/download/download“ endpoint instead.

Best regards,
    Daniel

Message has been deleted

thomas

unread,
Nov 12, 2014, 1:46:35 PM11/12/14
to resol...@googlegroups.com
Hi Daniel, 

lovely. now I gonna try to get this data into splunk or logstash. I think I should go for open source, but splunk seems to be easier to install.

this should do the job:
/dlx/download/download?sessionAuthUsername=admin&sessionAuthPassword=admin&outputType=text-csv-lf&source=current


regards,
-thomas

thomas

unread,
Nov 19, 2014, 10:35:08 AM11/19/14
to resol...@googlegroups.com
hi,

splunk does a great job.
1. setup splunk.
2. cron to download the file from my dl2 and place it in a folder
3. tell splunk to index it, (remove the first line, tell the name of the columns (TRANSFORMS-t1=eliminate_header),(FIELD_NAMES = datetime,CS1,CS2.....) )
4. start to search and visualize your data.
create an app and show the data: (here hours if sun each day, or summed up for a timeframe)

regards,

-thomas


Reply all
Reply to author
Forward
0 new messages