They are going to send us a request for inventory data (QOH, location, etc.) and we send the data back to them. It could be multiple items needed per request. I'm pretty sure I have somewhat of a handle on the setup using the standard input (for the request ) and standard output (for the response back to them). I have been using Scott's "Rest APIs and RPG" presentation as a guide and will set up my HTTP server based on this example:
Code: Select all
DefaultFsCCSID 37
DefaultNetCCSID 1208
CgiConvMode %%MIXED/MIXED%%
ScriptAlias /api/customers /qsys.lib/skwebsrv.lib/cust001r.pgm
<Directory /qsys.lib/skwebsrv.lib>
SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;QGPL;SKLEMENT;SKWEBSRV;YAJL"
require valid-user
AuthType basic
AuthName "SK REST APIs"
PasswdFile %%SYSTEM%%
UserId %%CLIENT%%
</Directory>
I've looked at the getAuth and setAuth prototypes and examples but I'm not really seeing how to do this to check the authority when I am the provider. I know its something silly I'm missing but if someone could point me in the right direction I would appreciate it.
Thanks!