AnsweredAssumed Answered

Jquery Ajax to call API controller Issue

Question asked by mamyrand on Aug 4, 2017
Latest reply on Oct 27, 2017 by skumar12

Hello Everyone,

Can someone help me please?

I have created my very first project and intend to invoke PI Timestamp and value to text boxes using PIwebAPI.

My attachment includes:

the aspx file - the Jquery Ajax Call - The routing configuration - and the API Controller.


Browsing directly using the API url: http://localhost:49499/PI/PI returns:

{"Timestamp":"08/04/2017 07:20:00","Value":"8258.106"}

which are exactly the Json content that I am expecting.

But I fail when I try to use Jquery Ajax to invoke these 2 parameters and try to parse it into my text boxes.

I get error

Any help is very appreciated.