5 Replies Latest reply on Aug 26, 2016 1:01 AM by jyi

    Is there a limit on posting point data to Pi Server in single request ?

    AniketAmrutkar

      I am using following API for posting timeseries data to my Pi Tag :
      POST :  /piwebapi/streams/<webId>/recorded

      Sample Body : [

      {

          "Timestamp": "2016-01-03T18:16:00Z",

          "Value": 42.91

        },

        {

          "Timestamp": "2016-01-03T21:57:00Z",

          "Value": 42.91

        },

      . .. . ...

      ]

      I am posting 1000 rows at a time in the request. 
      I am using following api for checking recorded Data :

      GET : /piwebapi/streamsets/recorded?webId=<webId>&startTime=*-1Y
      But getting only last value in the result.

       

      But If I post values one by one then getting all the values in the GET api response.

       

      Can you please help me in the above case.
      How many points can I Post in single request ?

        • Re: Is there a limit on posting point data to Pi Server in single request ?
          pmartin

          Hi Aniket,

           

          I'm not sure of the exact maximum but I know it's far higher than 1000.  I tested my code using 10000 values and it worked.

           

          Since it seems like you are in a bit of unique situation, could you answer a few questions for me?

          1. Do you have exception/compression turned on for this tag?
          2. When you are updating single tags, are you using the recorded action? Or are you using the value action?
          3. Just as a verification, could you pull that tag up in System Management Tools > Archive Editor just to verify that there is only 1 result?
          4. What response are you getting from the server when you make this request?
          5. What version of the PI Web API are you using?
          • Re: Is there a limit on posting point data to Pi Server in single request ?
            jyi

            Hello Aniket,

             

            Once Post request is received via PI Web API, Web API will translate the request in AF SDK form. After that, it will be up to the PI Buffer Subsystem and PI Data Archive.

            PI Buffer Subsystem will automatically tune the post rate, send rate according to your network conditions therefore your request will probably be broken down to several requests anyway.

             

            In addition to Paul's question, I would like to ask you to check the buffer sessions.

            • Re: Is there a limit on posting point data to Pi Server in single request ?
              AniketAmrutkar

              Thanks Paul and Jinmo for quick reply.

              @Paul

              1. Do you have exception/compression turned on for this tag?

                -- Yes. Compression and Archived are OFF. Exception is set to 0.

                    Also can you please tell me how to set above values while creating a new Point through web API ?

               

               

              2. When you are updating single tags, are you using the recorded action? Or are you using the value action?

                -- I am using recorded action for updating bot h single and multiple points.

                  POST :  /piwebapi/streams/<webId>/recorded

               

               

              3. Just as a verification, could you pull that tag up in System Management Tools > Archive Editor just to verify that there is only 1 result?

                 -- 1. When I post single value per request then getting all the values in SMT UI.

                    2. When I post 100 value per request then getting almost 90+ values. (Some values are getting lost in between),

                    3. When I post more than 100 value per request then only last value displayed on UI.

               

               

                    Please Note that, data which I posting is time series data and each input event is separated by 10 min.

               

               

              4. What response are you getting from the server when you make this request?

                 -- 202 Accepted.

               

               

              5. What version of the PI Web API are you using?

                 -- I installed Pi WEB API from : PI-Web-API-2015-R3_1.6.0.159_.exe

                 I am getting following response for /piwebapi/system/versions

                 {

                 "OSIsoft.REST.Channels": {

                   "FullVersion": "1.7.0.331",

                   "MajorMinorRevision": "1.7.0",

                   "Build": "331"

                 },

                 "OSIsoft.REST": {

                   "FullVersion": "1.7.0.331",

                   "MajorMinorRevision": "1.7.0",

                   "Build": "331"

                 },

                 "OSIsoft.REST.Documentation": {

                   "FullVersion": "1.7.0.331",

                   "MajorMinorRevision": "1.7.0",

                   "Build": "331"

                 },

                 "OSIsoft.Search.SvcLib": {

                   "FullVersion": "1.4.0.1379",

                   "MajorMinorRevision": "1.4.0",

                   "Build": "1379"

                 }

                }

               

               

               

               

              Jinmo Yi

              Can you please let me know "how to check the buffer sessions" ?

              I will like to mention, if it helps,  that I look into PI SMT -> Operations -> Snapshot and Archive Statistics

                 Events in Queue = 0

                 Events in Primary Queue = 0

               

               

               

              Thanks.