5 Replies Latest reply on Mar 8, 2017 11:21 AM by BrunoDevos

    UpdateValues 400 error message

    BrunoDevos

      I am trying to write values to a stream using

      POST streams/{webId}/recorded

       

      I can write 18 values (202 response), but I can't write 19 values (400 response).

       

      Maybe that is because the request length exceeds 1000 characters.

       

      Is there a way I can overcome this limit?

       

      My Osisoft.REST Version: 1.8.0.375

        • Re: UpdateValues 400 error message
          pmartin

          Hi Bruno,

           

          What's the actual error you get back from the server with your 400 response?

          For example, when I try to submit a bad request (by missing a comma) I get:

          {
            "Errors": [
              "After parsing a value an unexpected character was encountered: \". Path 'Good', line 1, position 61."
            ]
          }
          

          in the body.

            • Re: UpdateValues 400 error message
              BrunoDevos

              Hi Paul,

              I've got an empty response content.

               

              Here is my post content:

               

              [{"Timestamp":"2016-09-30T23:00:00Z","Value":6521.5322},{"Timestamp":"2016-10-01T00:00:00Z","Value":5581.4409},{"Timestamp":"2016-10-01T01:00:00Z","Value":5577.2754},{"Timestamp":"2016-10-01T02:00:00Z","Value":5733.1738},{"Timestamp":"2016-10-01T03:00:00Z","Value":6059.9292},{"Timestamp":"2016-10-01T04:00:00Z","Value":7187.8496},{"Timestamp":"2016-10-01T05:00:00Z","Value":10776.251},{"Timestamp":"2016-10-01T06:00:00Z","Value":11171.4307},{"Timestamp":"2016-10-01T07:00:00Z","Value":10723.1445},{"Timestamp":"2016-10-01T08:00:00Z","Value":10211.4258},{"Timestamp":"2016-10-01T09:00:00Z","Value":9473.1904},{"Timestamp":"2016-10-01T10:00:00Z","Value":8706.75},{"Timestamp":"2016-10-01T11:00:00Z","Value":8922.8594},{"Timestamp":"2016-10-01T12:00:00Z","Value":7393.8721},{"Timestamp":"2016-10-01T13:00:00Z","Value":7351.2324},{"Timestamp":"2016-10-01T14:00:00Z","Value":6815.0859},{"Timestamp":"2016-10-01T15:00:00Z","Value":7124.4639},{"Timestamp":"2016-10-01T16:00:00Z","Value":7224.5156},{"Timestamp":"2016-10-01T17:00:00Z","Value":7648.3486}]

            • Re: UpdateValues 400 error message
              David Golverdingen

              Maybe your answer is in the reaction of DaphneNg in this post: PI Web API query examples