Home Forum Software JSON GET-request authentication questions [SOLVED]

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5342
    Kotitonttu
    Participant

    Hello

    I’m trying to download JSON data from the uradmonitor.com website via this:
    http://data.uradmonitor.com/api/v1/devices/5100001F/radiation
    but then I get “{“error”:”Authentification failed”}”

    I thought this was publicly available

    How can I fix this?

    #5343
    Kotitonttu
    Participant

    Okay… I’m able to get a little further…
    root@pine64:~# curl -X GET -H “X-User-id:3796” -H “X-User-hash:MYHASH” http://data.uradmonitor.com/api/v1/devices/5100001F
    {“cpm”:”Radiation”,”voltage”:”Voltage”,”duty”:”Duty cycle”,”all”:”All”}

    the above response seems to be wrong…

    How can I get the same data as from my local setup?
    resource: http://192.168.1.81/j
    ###example of json response### {“data”:{ “id”:”5100001F”,”type”:”5″,”detector”:”SBM20″,”cpm”:12,”temperature”:0.00,”uptime”: 64042}}

    I just want the CPM value to be logged into my local database & I want to access the data through the cloud so that I can use the uradmonitor anywhere.

    #5361
    Kotitonttu
    Participant

    curl -X GET -H “X-User-id:3796” -H “X-User-hash:SECRETHASH” http://data.uradmonitor.com/api/v1/devices/5100001F/cpm

    seems to return every CPM value that I’ve ever sent to the cloud…

    How can I get it to return the most recent one?

    #5371
    uRADMonitor
    Keymaster

    Please see detailed API description and the examples on the Dashboard, API tab.

    To get the readings you will use:
    https://data.uradmonitor.com/api/v1/devices/5100001F/cpm

    for the last 24h of “cpm” data. Instead of CPM you can use any of the sensor labels supported by your device (you already got that list):
    {“cpm”:”Radiation”,”voltage”:”Voltage”,”duty”:”Duty cycle”,”all”:”All”}

    Finally you can call
    https://data.uradmonitor.com/api/v1/devices/5100001F/cpm/timestart/timestop

    and
    https://data.uradmonitor.com/api/v1/devices/5100001F/cpm/last

    All this is explained in the API documentation, please check it out. All these calls require X-User-id and X-User-hash in headers.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.