Calling an Apigee endpoint URL from a JCL using CURL
Hi,
I've been working to call an API via JCL using CURL by passing public & private keys of the certificate. I was able to successfully make a call to the PCF endpoint URL using below JCL where I got the request as expected by the API developer, however, due to security reasons now I need to make a call to an Apigee endpoint instead of PCF cloud directly. But for that I've been asked by our API team to pass below 3 parameters while making a CURL call.
1.) Client-meta data
2.) API-key
3.) requestUniqueID
Below is the JCL.
//ABCJ4API JOB (XXXX,P),'CURL',MSGCLASS=T,SCHENV=SYSPLEX,USER=XXX
//*
//S5QCUR1 EXEC PGM=BPXBATCH,
// REGION=0M
//STDPARM DD *
SH cd /appshare/XXXX/road4z/bin;
curl --get -v URL
https://apigw-int.devxx.xxx.com/xxxx/pdg/v1
--key '/appshare/API/key.pem'
--cacert '/appshare/API/ca.pem'
/*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
Please let me know how to pass the above 3 parameters using CURL and if this is not the correct forum, please let me know where I can post and get some help.
Thanks in advance.
------------------------------
Santosh Reddy Chintagari
Technical Systems Analyst
Rocket Forum Shared Account
------------------------------
I've been working to call an API via JCL using CURL by passing public & private keys of the certificate. I was able to successfully make a call to the PCF endpoint URL using below JCL where I got the request as expected by the API developer, however, due to security reasons now I need to make a call to an Apigee endpoint instead of PCF cloud directly. But for that I've been asked by our API team to pass below 3 parameters while making a CURL call.
1.) Client-meta data
2.) API-key
3.) requestUniqueID
Below is the JCL.
//ABCJ4API JOB (XXXX,P),'CURL',MSGCLASS=T,SCHENV=SYSPLEX,USER=XXX
//*
//S5QCUR1 EXEC PGM=BPXBATCH,
// REGION=0M
//STDPARM DD *
SH cd /appshare/XXXX/road4z/bin;
curl --get -v URL
https://apigw-int.devxx.xxx.com/xxxx/pdg/v1
--key '/appshare/API/key.pem'
--cacert '/appshare/API/ca.pem'
/*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
Please let me know how to pass the above 3 parameters using CURL and if this is not the correct forum, please let me know where I can post and get some help.
Thanks in advance.
------------------------------
Santosh Reddy Chintagari
Technical Systems Analyst
Rocket Forum Shared Account
------------------------------