Web API on IBMi - how to call?
Posted: Tue Jul 26, 2022 11:07 pm
Hello,
now that I have successfully sted my Web API on my local machine, I have checked everything in to the IBMi. This is the platform where the API has to run.
Unfortunately, I am now unable to access the object via Postman. The response is every time I try:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>404 Nicht gefunden</TITLE>
</HEAD>
<BODY>
<H1>Nicht gefunden</H1>
<p>The requested URL was not found on this server.</p>
</body>
</html>
In the Visual LANSA options the Web Page Base URL is set to http://MyIBMi:8875/l15pgmlib/, this access for Web Pages works fine.
When I check in the server module, an object is created in the IBMi program library SMH_V60P15. The server module in VL is called WH02, the object in the library SMH_V60P15 gets the name §WH02 during check-in. Partition name is V60.
In the httpd.conf for my IBMi HTTP Server L15PGMLIB I added the following:
Alias /smh /QSYS.LIB/SMH_V60P15.LIB
Operation path is /Preis.
So i tried things like:
http://MyIBMi:8875/smh/v60/wh02/preis
http://MyIBMi:8875/smh/wh02/preis
http://MyIBMi:8875/smh/v60/§wh02/preis
http://MyIBMi:8875/smh/§wh02/preis
http://MyIBMi:8875/l15pgmlib/v60/WH02/Preis
http://MyIBMi:8875/l15pgmlib/WH02/Preis
Nothing works.
What error in thinking am I making here? What is the correct configuration for the call? What is the correct setup in this case?
Thank you in advance and best regards.
Jörg
now that I have successfully sted my Web API on my local machine, I have checked everything in to the IBMi. This is the platform where the API has to run.
Unfortunately, I am now unable to access the object via Postman. The response is every time I try:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>404 Nicht gefunden</TITLE>
</HEAD>
<BODY>
<H1>Nicht gefunden</H1>
<p>The requested URL was not found on this server.</p>
</body>
</html>
In the Visual LANSA options the Web Page Base URL is set to http://MyIBMi:8875/l15pgmlib/, this access for Web Pages works fine.
When I check in the server module, an object is created in the IBMi program library SMH_V60P15. The server module in VL is called WH02, the object in the library SMH_V60P15 gets the name §WH02 during check-in. Partition name is V60.
In the httpd.conf for my IBMi HTTP Server L15PGMLIB I added the following:
Alias /smh /QSYS.LIB/SMH_V60P15.LIB
Operation path is /Preis.
So i tried things like:
http://MyIBMi:8875/smh/v60/wh02/preis
http://MyIBMi:8875/smh/wh02/preis
http://MyIBMi:8875/smh/v60/§wh02/preis
http://MyIBMi:8875/smh/§wh02/preis
http://MyIBMi:8875/l15pgmlib/v60/WH02/Preis
http://MyIBMi:8875/l15pgmlib/WH02/Preis
Nothing works.
What error in thinking am I making here? What is the correct configuration for the call? What is the correct setup in this case?
Thank you in advance and best regards.
Jörg