• Recent
    • Tags
    • Popular
    • Register
    • Login

    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 Mango 5 Documentation Website

    bulk update polling intervals on datapoint

    How-To
    6
    7
    3.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      djmolloyjr22
      last edited by

      Hello-

      Does anyone have any tips to update the polling cycle interval on datapoints? For example, would like to change all the datapoints from 15 minute interval to 5 minute interval. Taking the import/export might be difficult as we currently have over 2000 points in a system.

      Regards,

      Daniel

      1 Reply Last reply Reply Quote 0
      • B
        btrombo
        last edited by

        The import export would be the fastest, you can do find/replace all in a text editor just test out your find criteria so it does not overwrite other items. Also you say you have 2000 data points but the polling parameter can be changed per datasource in Mango UI.

        1 Reply Last reply Reply Quote 0
        • jeremyhJ
          jeremyh
          last edited by

          I agree, import/export is the quickest and simplest, using a find-replace operation in any text editor.

          Make sure that your text editor is set to plain text not rich text and save a copy of your exported JSON before you do the find-replace incase something goes wrong.

          Also as btrombo says, make sure you match the whole string not just the digits, ie.:

          Find:          "intervalLoggingPeriod":15,
          Replace:       "intervalLoggingPeriod":2,
          

          (rather than find 15 and replace with 2)

          1 Reply Last reply Reply Quote 0
          • D
            djmolloyjr22
            last edited by

            I was looking for a more optimized way of loading the datapoints; perhaps through a CURL POST because trying to paste 2000 datapoints worth of data using a browser via the import/export can be slow.

            JoelHaggarJ 1 Reply Last reply Reply Quote 0
            • hussamH
              hussam
              last edited by

              1:stop the mango.
              2:update you database use SQL.
              3:start again.

              1 Reply Last reply Reply Quote 0
              • JoelHaggarJ
                JoelHaggar @djmolloyjr22
                last edited by JoelHaggar

                @djmolloyjr22 as @btrombo said you only need to update the Data Sources and not the data points. Just export the Data Sources and this will be a really easy and fast action.

                1 Reply Last reply Reply Quote 0
                • terrypackerT
                  terrypacker
                  last edited by

                  @djmolloyjr22

                  The REST api has a feature that allows bulk updating of data points via a PUT of a JSON array, but this has not been rigorously tested and is still in Beta. Use at your own risk since not every type of data point has been verified to work. I would suggest making a backup of your database prior to testing your specific updates.

                  Here is the basic idea:

                  1. Make a GET request to {YourMangoHost}/rest/v1/data-points to get all your data points as an Array in JSON format
                  2. Edit your JSON
                  3. Do a PUT request with the edited array of data points as the payload to {YourMangoHost}/rest/v1/data-points

                  Note that since the JSON structure for a Data Point in the REST API is different than the Mango JSON Export you cannot use one with the other.

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post