Is anyone using the CM APIs? My specific question is:
I can successfully call the component/build API to compile/build like-src components. What API do I call to stage non-source components (comparable to ST in the green screens) ?
------------------------------
Jim Haworth
Technology Engineer
Nationwide Mutual Insurance Company
------------------------------
Hi Jim,
Yes, we use them all the time (as you'd expect - I'm a ZMF developer :-) ).
They are also how external UIs such as the vsCode ZMF Explorer achieves the same thing. So, yes, they work fine.
To explore the ZMF REST api calls you are probably best using the 'RESTtest' facility.
Once your ZMF REST service infrastructure is in place you can access this using the following URL:
<server_address>/<zmfWebAppName>/resttest/list
In my case we have called the zmfWebApp the same name as the target ZMF subsystem, so I access this using...
https://my.zos.com:xxxx/u830dp/resttest/list
where my.zos.com is the name of my zOS tcp stack and xxxx is the port that my TomCat server is listening on.
u830dp is the name of the zmfrest webApp which connects to our target ZMF subsystem which, to keep things simple, has the same name.
From there you can search and prototype all the available ZMF REST apis.
To get source into a ZMF package (whether buildable or not) you use the /component/checkin call
To build a like-src component you would use /component/build.
As an example, using my above-mentioned infrastructure, to build a component called AA051.SRC in package STEV000576 at my target ZMF u830dp, I can use this API call...
PUT /u830dp/component/build
using the following JSON body
{
"package":"STEV000576",
"listCount":1,
"component":"AA051",
"componentType":"SRC",
"useHistory":"Y",
"jobCard01":"//TS6215ZM JOB ,'CMN$PISC',COND=(4,LT),",
"jobCard02":"// CLASS=A,NOTIFY=TS6215,",
"jobCard03":"// MSGCLASS=X",
"jobCard04":"//*"
}
The same call can be made purely using a url with associated parameters (the resttest app will show you how).
Hope this helps ?
All the best - Steve
------------------------------
Steve Downes
Principal Software Engineer
Rocket Internal - All Brands
------------------------------
Hi Jim,
Yes, we use them all the time (as you'd expect - I'm a ZMF developer :-) ).
They are also how external UIs such as the vsCode ZMF Explorer achieves the same thing. So, yes, they work fine.
To explore the ZMF REST api calls you are probably best using the 'RESTtest' facility.
Once your ZMF REST service infrastructure is in place you can access this using the following URL:
<server_address>/<zmfWebAppName>/resttest/list
In my case we have called the zmfWebApp the same name as the target ZMF subsystem, so I access this using...
https://my.zos.com:xxxx/u830dp/resttest/list
where my.zos.com is the name of my zOS tcp stack and xxxx is the port that my TomCat server is listening on.
u830dp is the name of the zmfrest webApp which connects to our target ZMF subsystem which, to keep things simple, has the same name.
From there you can search and prototype all the available ZMF REST apis.
To get source into a ZMF package (whether buildable or not) you use the /component/checkin call
To build a like-src component you would use /component/build.
As an example, using my above-mentioned infrastructure, to build a component called AA051.SRC in package STEV000576 at my target ZMF u830dp, I can use this API call...
PUT /u830dp/component/build
using the following JSON body
{
"package":"STEV000576",
"listCount":1,
"component":"AA051",
"componentType":"SRC",
"useHistory":"Y",
"jobCard01":"//TS6215ZM JOB ,'CMN$PISC',COND=(4,LT),",
"jobCard02":"// CLASS=A,NOTIFY=TS6215,",
"jobCard03":"// MSGCLASS=X",
"jobCard04":"//*"
}
The same call can be made purely using a url with associated parameters (the resttest app will show you how).
Hope this helps ?
All the best - Steve
------------------------------
Steve Downes
Principal Software Engineer
Rocket Internal - All Brands
------------------------------
Apologies, I misread the bit where you said that you could successfully build using the REST api - so most of my post is irrelevant to you (but I'll leave it there in case it helps somebody else).
The short answer to your question is that you should use the /component/checkin api call to put source (whether like-SRC or not) into the package.
Cheers
------------------------------
Steve Downes
Principal Software Engineer
Rocket Internal - All Brands
------------------------------
Is anyone using the CM APIs? My specific question is:
I can successfully call the component/build API to compile/build like-src components. What API do I call to stage non-source components (comparable to ST in the green screens) ?
------------------------------
Jim Haworth
Technology Engineer
Nationwide Mutual Insurance Company
------------------------------
I would try using the component check in API
------------------------------
Lisa Brewer
Senior System Software Engineer
The Northwestern Mutual Life Insurance Company
Milwaukee WI US
------------------------------
I would try using the component check in API
------------------------------
Lisa Brewer
Senior System Software Engineer
The Northwestern Mutual Life Insurance Company
Milwaukee WI US
------------------------------
Thank you for the replies - checkin was the missing piece that I needed.
I should probably explain a little more about my use case: We are upgrading to V831. I have created a number of packages with various components checked out. I have automated my testing by creating tests in Postman that read an input spreadsheet with various CM API parameters (APPL, package, component, userOptions, etc.) and then calls the appropriate CM API (this current stream includes /package/search , /component/checkin , /component/build , and /component/load ). I can then have Postman query the response and validate expected results (both did the job complete satisfactorily, and did I get the expected output - for instance a listing). It takes a little under 6 minutes to run through 224 tests for 26 components across 19 packages (and to be honest about half of that is wait time so I don't outrun the job if it gets stuck in a slower initiator...).
Anyway, thanks for the help.
------------------------------
Jim Haworth
Technology Engineer
Nationwide Mutual Insurance Company
------------------------------