7 Replies Latest reply on Apr 16, 2015 4:42 PM by David Golverdingen

    Post Data with Web API and JQuery


      I'm trying to post data back to PI using the new Web API.  I am able to pull point data no problem but my guess is there is something in my request I'm doing wrong.  I've starting putting my code together and it looks like this.  Any tips as to get it working?  I'm guessing its probably something to do with my URL but not entirely sure.  I just put a snippet of the javascript piece.




      var postUrl = https://server/piwebapi/streams/;
      var pointWebID;
       var postUrlComplete;
              $.getJSON(databaseUrl,function (database) {
                  pointWebID = database.WebId;
                 var pointsIDDomElement = $("#pointID");
                  pointsIDDomElement.append("<li> <B>WebID:</B> " + pointWebID + "</li>");
                  postUrlComplete = postUrl + pointWebID +"/Value=10";
                  $.getJSON(postUrlComplete,function (writePoint) {