Hi, i’m making an app where i can start job via simple html button,
I make the request with jquery ajax
I already have the bearer token and everything was working perfectly last week, but today, it throws me this error :
Access to XMLHttpRequest at /odata/Jobs/UiPath.Server.Configuration.OData.StartJobs’ from origin ‘http://localhost:8080’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
something change server side ?
here is my code :
ajax :
$("a.startjobcommande").click(function(){
var params = {};
params.startInfo = { "ReleaseKey" : "xxxxxxxxxxx", "RobotIds" : [ xxxxxx ], "NoOfRobots" : 0, "Strategy" : "Specific" };
$.ajax({
type: "POST",
headers: {
'Authorization': mdp,
'Content-Type' : 'application/json'
},
url: "https://platform.uipath.com/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs",
data: JSON.stringify(params),
dataType: "json",
success: function(data) {
console.log(data);
},
error: function(data) {
console.log(data);
}
});
or do i missed something ?
thanks for any help !
Edit : Everything back to normal (I didn’t do anything)