How to exactly use restAPI in nodejs environment with JDE/AIS?

rioteam19

Member
We are developing a portal which takes a file uploaded by a partner and passes the data to JDE. Before we can pass this data to JDE I wanna understand how exactly to make an API call to JDE using nodejs.

for starters, I have an simple API call as seen below. Am I on the right track? I want to make that first contact before going to the next step.

$.ajax({
method: "GET",
username:"username",
password:"password",
url: "http://aisserver:port/jderest/",
dataType:'jsonp'
}).then(function (data) {
console.log(data)
})
 

rioteam19

Member
I think your best bet is to start here: https://docs.oracle.com/cd/E53430_01/EOTRS/QuickStart.html

It covers it all using examples that you can call with CURL. You can't get more platform neutral than that. You can just then put the examples into JavaScript/TypeScript in your node project.

I am getting a 404 error, so wondering if anyone else has done this in node or willing to crank out a quick example to lead me in the right direction?
 

rioteam19

Member
update to this:

I am getting no response, no error when I call the ajax method. Anyone have any idea?

$.ajax({
method: "GET",
Authorization: `Basic ${s}`,
url: "https://aisserver:8081/jderest/"
}).then(function (data) {
console.log(data)
})
 
Top