AnsweredAssumed Answered

How can we call bach request using jquery ?

Question asked by Babasaheb on Jul 19, 2017
Latest reply on Jul 20, 2017 by Paurav Joshi

I refer below link to call the batch requests. But it shown in JSON format and I want to cal this batch request using jQuery.


PI Web API: Getting multiple attributes with batch requests


Here is my code. Please can someone tell me how to write this function for batch request ?




var processJsonContent = function(){

            return $.ajax(


url: "https://ServerName:4440/piwebapi/assetdatabases?path=\\\\ServerName\\DatabaseName",



//data: '{"username": "' + username + '", "password" : "' + password + '"}',

success: function (data){

//alert('connected'+ JSON.stringify(data));

console.log('Database Connected'+ JSON.stringify(data));





beforeSend: function (xhr){

xhr.setRequestHeader('Authorization','Basic ZWNnXdsfgRT34Y3RfMjAxNg==');








Thank you