In the recent Dynamic Workload Console v9.4 FP2 release, a new powerful feature has been added: the possibility to handle the interaction with your z/OS workload through REST APIs! REST APIs give you the possibility to perform actions and queries on your workload, such as:
Simple: REST APIs are simple to use, requiring just a URL and few parameters as input. Safe: leveraging on HTTPS connection and basic authentication, all your data is protected in both sending and receiving ways. Quick: response time of a REST API call is in seconds! Let’s explain first what is the RESTful approach we have used to create this new functionality. Representational state transfer (REST) or RESTful Web Services is a way of providing interoperability between computer systems on the Internet. REST-compliant Web Services allow requesting systems to access and manipulate textual representations of Web resources using a uniform and predefined set of stateless operations. In a RESTful Web Service, requests made to a resource's URI will elicit a response that may be in XML, HTML, JSON or some other defined format. The response might confirm that some alterations have been made to the stored resource, and it might provide hypertext links to other related resources or collections of resources. Using HTTP, which is the most common format, the kind of operations available include those predefined by the HTTP verbs GET, POST, PUT, DELETE, and so on. Using this approach, REST API for z/OS have been created and included in the ZConnector which is shipped with the Dynamic Workload Console. The product documentation shows all the REST APIs available both on Application Database and Current Plan, specifying the path you must use to invoke a specific REST API, the required input parameters, and the expected output. After installing DWC v9.4 FP2 you can find the documentation of the RESP APIs at the following address: https://<DWC_HOST>:<port_number>/twsz, where:
REST APIs for z/OS have been organized following a specific URL pattern which guides you to identify the object to interact with or the action to be performed: /{engine name}/{sector}/{object type}/{object id}/{action} Engine name: Since REST APIs leverage on existing ZConnector connection, in this field you must set the engine name chosen when this connection was defined. This name is the one defined through wastools scripts during the execution of the createZosEngine script. Sector: In this field, you must specify the keyword <model> for Application Database or <plan> for Current Plan. Object type: In this field, you must specify which type of object you want to interact with. Keywords will be jobstream, job, resource, calendar, and so on. Action: In this field, you must enter the name of the action that will be performed on the object type previously specified. Keywords are: query, release, hold, release all dependencies, and many more. Object id: This field identifies specifically the object that you want to interact with, using the id of the object to be processed by REST APIs. Here are some examples of REST APIs for z/OS, by using cURL which is a command line tool for transferring data with URL syntax: Select all jobs in the Current Plan that are on hold:
Remove the hold status on a specific Job in the Current Plan:
URL: https:// <DWC_HOST>:16311/twsz/<ZOS_ENGINE_NAME>/plan/current/job/<JOB_ID>/action/release Note: JOB ID can be retrieved from job information when you perform a query) NOP a job in the Current Plan:
URL: https:// <DWC_HOST>:16311/twsz/<ZOS_ENGINE_NAME>/plan/current/job/<JOB_ID>/action/nop Note: (JOB ID can be retrieved from job information when you perform a query) Select all jobs in the Current Plan with a wildcard. For example, select all jobs that begin with GB*:
If you have any questions, doubts or feedback on this article feel free to contact Gabriele Barboni at [email protected] or Davide Canalis at [email protected].
8 Comments
Rich Szabo
6/15/2018 08:16:19 am
What is the minimum PTF level for IWS for z/OS that will allow the REST API to function?
Reply
Davide
6/19/2018 08:33:35 am
Hi Rich,
Reply
1/24/2019 07:35:51 am
If I work in Information Technology industry, I am sure that I will be familiar with this one. But since I don't, I have to read the whole article first for me to get the gist of the story and all the stuff that is related to Representational state transfer (REST) or RESTful Web Services! Well, it is good to know that such thing has been existing already. It makes the process easier between internet and people. Technology has been taking over, and I cannot help but to be happy with everything that is happening around us. I can finally say that its a good thing!
Prema
7/27/2018 07:53:29 am
Reply
Davide
8/8/2018 02:38:54 am
Hi Prema,
Reply
Vishal
10/15/2019 03:16:15 am
How can we access IWSz REST APIs directly from home grown java based application? What is the minimum requirement from Installation perspective on z/OS?
Reply
Davide
10/25/2019 08:59:55 am
Hi Vishal,
Reply
Vishal
11/8/2019 12:16:25 am
Thanks for your response. I have explored it further and went through below mentioned two links. I was not able colclude if REST APIs are available to retrieve the Abended job details from error list and Edit the JCL. Your comment will be posted after it is approved.
Leave a Reply. |
Archives
August 2024
Categories
All
|