Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

Bulk data upload with HTTP Receiver possible? - SOLVED by using API REST instead


  • Is there a way to bulk upload to the HTTP Receiver?
    With value and time

    Something like:

    parameterName=value@time

    temp=21.2@1576137626&
    temp=21.3@1576137636&
    etc...

    I can only get the first temp.


  • Solution is to use REST API instead.

    curl -X POST "http://192.168.1.2:8080/rest/v2/point-values?fireEvents=NEVER"

    API follows JSON syntax "Square brackets hold arrays and values are separated by ,(comma)"

    [
      {
        "annotation": "",
        "dataType": "NUMERIC",
        "timestamp": 1576117390000,
        "value": 227.1,
        "xid": "DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae"
      },
      {
        "annotation": "",
        "dataType": "NUMERIC",
        "timestamp": 1576117400000,
        "value": 228.1,
        "xid": "DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae"
      },
        {
        "annotation": "",
        "dataType": "NUMERIC",
        "timestamp": 1576117410000,
        "value": 229.1,
        "xid": "DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae"
      },
      {
        "annotation": "",
        "dataType": "NUMERIC",
        "timestamp": 1576117342000,
        "value": 220.1,
        "xid": "DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae"
      }
    ]
    

    Full CURL with this body:

    curl -X POST "http://192.168.1.2:8080/rest/v2/point-values?fireEvents=NEVER" -H "accept: application/json;charset=UTF-8" -H "Content-Type: application/json;charset=UTF-8" -H "X-XSRF-TOKEN: 58594b34-9a0d-4417-9b23-xxxx" -d "[ { \"annotation\": \"\", \"dataType\": \"NUMERIC\", \"timestamp\": 1576117390000, \"value\": 227.1, \"xid\": \"DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae\" }, { \"annotation\": \"\", \"dataType\": \"NUMERIC\", \"timestamp\": 1576117400000, \"value\": 228.1, \"xid\": \"DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae\" }, { \"annotation\": \"\", \"dataType\": \"NUMERIC\", \"timestamp\": 1576117410000, \"value\": 229.1, \"xid\": \"DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae\" }, { \"annotation\": \"\", \"dataType\": \"NUMERIC\", \"timestamp\": 1576117342000, \"value\": 220.1, \"xid\": \"DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae\" }]"
    

  • I would have thought that the HTTP Receiver would accept multiple point values at once, however I don't have the docs in front of me.

    Not sure how your CURL request is authenticating.. You have an XSRF token but no session cookie. I would suggest using an authentication token for this kind of usage, then you don't need the XSRF token either.