7 Replies Latest reply on May 9, 2016 3:37 PM by asorokina

    How to post TagData In Pi Server using Pi Web API ?

    AniketAmrutkar

      How to post TagData In Pi Server using Pi Web API ?

      What are the required fields to store the data ?

        • Re: How to post TagData In Pi Server using Pi Web API ?
          Marcos Vainer Loeff

          Hello Aniket,

           

          Please use the UpdateValue action under PI Web API Stream controller. You can find information about this action here.

           

          On chapter 3 of the Developing with PI Web API white paper, you can find interesting code snippets that will help in case you are developing an app!

           

          Hope this helps!

          2 of 2 people found this helpful
            • Re: How to post TagData In Pi Server using Pi Web API ?
              AniketAmrutkar

              Hello Marcos,

               

              I am using updateValues API of Streams for updating multiple values at a time in Point.

              I am facing one issue :

              I am writing 500 + records (distributed over 3 years time range) in single request, I found that only last two records are displayed in the data explorer.

              Also I am getting empty Items response, when doing /piwebapi/streams/webId/recorded query.

              Sample Data I which I am posting is :

              {

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

                  "Value": 42.91

                },

                {

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

                  "Value": 42.91

                },

                {

                  "Timestamp": "2011-01-04T00:03:00Z",

                  "Value": 53.35

                },

                {

                  "Timestamp": "2011-01-04T17:32:00Z",

                  "Value": 53.35

                },

                {

                  "Timestamp": "2011-01-04T18:49:00Z",

                  "Value": 46.88

                },

                {

                  "Timestamp": "2011-01-09T11:11:00Z",

                  "Value": 46.88

                },

                {

                  "Timestamp": "2011-01-09T21:43:00Z",

                  "Value": 52.22

                },

                {

                  "Timestamp": "2011-01-10T05:17:00Z",

                  "Value": 52.22

                },

                {

                  "Timestamp": "2011-01-10T20:39:00Z",

                  "Value": 52.22

                },

                {

                  "Timestamp": "2011-01-11T05:36:00Z",

                  "Value": 52.22

                },

                {

                  "Timestamp": "2011-01-14T13:46:00Z",

                  "Value": 52.22

                },

                {

                  "Timestamp": "2011-01-17T15:16:00Z",

                  "Value": 52.22

                },

                {

                  "Timestamp": "2011-01-17T17:27:00Z",

                  "Value": 52.22

                },

                {

                  "Timestamp": "2011-01-22T14:15:00Z",

                  "Value": 52.22

                },

                {

                  "Timestamp": "2011-01-22T19:53:00Z",

                  "Value": 52.22

                },

                {

                  "Timestamp": "2011-01-26T11:22:00Z",

                  "Value": 52.22

                },

                {

                  "Timestamp": "2011-01-26T12:55:00Z",

                  "Value": 41.38

                }.

                 .

              . ..

              ......

                {

                  "Timestamp": "2014-03-07T21:20:00Z",

                  "Value": 39.24

                },

                {

                  "Timestamp": "2014-03-09T07:57:30Z",

                  "Value": 39.24

                },

                {

                  "Timestamp": "2014-03-13T07:19:53Z",

                  "Value": 39.24

                },

                {

                  "Timestamp": "2014-03-23T11:55:35Z",

                  "Value": 39.24

                },

                {

                  "Timestamp": "2014-03-23T19:17:00Z",

                  "Value": 41.43

                },

                {

                  "Timestamp": "2014-03-27T10:21:22Z",

                  "Value": 41.43

                },

                {

                  "Timestamp": "2014-03-29T18:50:00Z",

                  "Value": 40.86

                },

                {

                  "Timestamp": "2014-04-02T16:22:00Z",

                  "Value": 41.7

                },

                {

                  "Timestamp": "2014-04-03T01:59:00Z",

                  "Value": 42.53

                },

                {

                  "Timestamp": "2014-04-07T20:26:00Z",

                  "Value": 40.43

                }

              ]