Author Topic: URL parameters to do a GET to the ted gateway to get historical data  (Read 7241 times)

solarInVT

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
[Edit]  Moved to developer section.


I have a pwd protected TED and hope there is a way to pass the userid and password as additional arguments on the URL.. but my feeble attempts have not worked.

Example
http://TED5000/history/secondhistory.xml?MTU=1&userid=foo&password=bar

« Last Edit: March 11, 2011, 08:35:32 AM by SherlockOhms »

solarInVT

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: URL parameters to do a GET to the ted gateway to get historical data
« Reply #1 on: March 15, 2011, 11:46:27 AM »
I'll bump this to see if someone from TED knows if I can put the userid / password in the URLs that can be used to get data.

I only have the higher level pwd setting checked on because I was afraid that things like resetting settings or the ted itself could be done if I don't do that.

A ticket I put in (ticket 392 )  had a reply that with the config pwd only.. those things should not work.. but I was afraid to try it.

I will have to try it and hope there is some confirmation box to tell me when i'm about to hurt myself.. I will dump the cookies and then remove the overall pwd and just keep the config pwd protected.

In the meantime, I was hoping the id / pwd can be passed in the URL to get data remotely..

TedDev

  • TED Software Developent
  • Administrator
  • Full Member
  • *****
  • Posts: 158
  • Karma: +0/-0
Re: URL parameters to do a GET to the ted gateway to get historical data
« Reply #2 on: March 15, 2011, 07:40:53 PM »
In order to authenticate, you'll need to use basic authentication which is a base-64 encoded header parameter. More information on how to send this header (w/ a couple of examples) can be found here:
http://en.wikipedia.org/wiki/Basic_access_authentication

dannyted

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +0/-0
    • Energy Monitor Blog
Re: URL parameters to do a GET to the ted gateway to get historical data
« Reply #3 on: March 21, 2011, 06:40:25 PM »
I just tested wget and it works fine using this command.  I am not sure exactly what you are trying to do but this does work.

wget --http-user=admin --http-passwd=password ted5000/api/LiveData.xml

Enjoy!
My Energy Blog - http://energymonitorblog.com
     --A site dedicated to discussing power saving information.

My Personal Blog - http://dannymullen.net

MyTed5000 - http://myted5k.com/danny/
     --Live Data from my ted5000

Like me on Facebook
http://www.facebook.com/pages/EnergyMonitorB