RESTful APIs and z/OS Connect

william giannelli

RESTful APIs and z/OS Connect

For RESTful APIs connecting to Db2, my understanding is that z/OS Connect is needed. If we dont currently have z/OS Connect yet, how might RESTful APIs work without it?

thanks

Bill

Raymond Bell

RESTful APIs and z/OS Connect
(in response to william giannelli)
Hi Bill,

z/OS Connect is not required. All you need is Db2 V11 with fairly current maintenance and you’re laughing. All they way to the asylum…

You will need an offhost client to test them, but you can create them all on the host via the new BIND SERVICE command. Then you just need the derived URL to invoke them (fixed format; cross that bridge when you get there) and you’re off.

Cheers,


Raymond

From: william giannelli <[login to unmask email]>
Sent: 08 August 2019 11:43
To: [login to unmask email]
Subject: [DB2-L] - RESTful APIs and z/OS Connect


*********************************************
" This message originates from outside our organisation. Consider carefully whether you should click on any links, open any attachments or reply. If in doubt, forward to ~ Phishing"
*********************************************


For RESTful APIs connecting to Db2, my understanding is that z/OS Connect is needed. If we dont currently have z/OS Connect yet, how might RESTful APIs work without it?

thanks

Bill

-----End Original Message-----
The Royal Bank of Scotland plc. Registered in Scotland No 83026. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. The Royal Bank of Scotland is authorised by the Prudential Regulation Authority, and regulated by the Financial Conduct Authority and Prudential Regulation Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 350, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions.

National Westminster Bank Plc. Registered in England No. 929027. Registered Office: 135 Bishopsgate, London EC2M 3UR. National Westminster Bank Plc is authorised by the Prudential Regulation Authority, and regulated by the Financial Conduct Authority and the Prudential Regulation Authority.

The Royal Bank of Scotland plc and National Westminster Bank Plc are authorised to act as agent for each other.

This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc, The Royal Bank of Scotland N.V., National Westminster Bank Plc or any affiliated entity (RBS or us) does not accept responsibility for changes made to this message after it was sent. RBS may monitor e-mails for business and operational purposes. By replying to this message you understand that the content of your message may be monitored.

Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by RBS in this regard and the recipient should carry out such virus and other checks as it considers appropriate.

Visit our website at www.rbs.com http://www.rbs.com

william giannelli

RE: RESTful APIs and z/OS Connect
(in response to Raymond Bell)

Ok, sounds great as it just so happens I am implementing RSU1907 with a lot of API maintenance.

So, my next question, if it is not really needed, what does z/OS Connect provide you?

thanks

Bill

Philip Sevetson

RESTful APIs and z/OS Connect
(in response to william giannelli)
Bill G.,

I’m working from memory here, of a presentation at TRIDEX more than six months ago. Here it is:

z/OS Connect allows you to implement RESTful APIs in pretty much any other service on the zmachines. (I’m not a vendor – check with your IBM rep if you need to confirm!) As Raymond said, you don’t need the z/OS Connect product to make DB2-on-z APIs work, but you do for things like compiled programs in-system (and you might for IMS, just speculating).

-phil (sevetson)

Philip Sevetson
Computer Systems Manager
FISA-OPA
5 Manhattan West
New York, NY 10001
[login to unmask email]<mailto:[login to unmask email]>
212-857-1688 w
917-991-7052 m
212-857-1659 f
[cid:[login to unmask email]

From: william giannelli <[login to unmask email]>
Sent: Thursday, August 8, 2019 7:22 AM
To: [login to unmask email]
Subject: [DB2-L] - RE: RESTful APIs and z/OS Connect


Ok, sounds great as it just so happens I am implementing RSU1907 with a lot of API maintenance.

So, my next question, if it is not really needed, what does z/OS Connect provide you?

thanks

Bill

-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
Attachments

  • image001.png (3.3k)

Daniel Luksetich

RESTful APIs and z/OS Connect
(in response to Philip Sevetson)
Quite simple. Db2 on it’s own provides RESTful services. z/OS connect provides REST API. So, z/OS connect will basically provide you with the ability to expand the use of parameters and such in your URI, different calls for different things. Then it formats the call into something Db2 understands. Db2 on its own provides for you to send parameters and such via a JSON document string, and that’s it.



Cheers,

Dan



+--------------------------------------+-----------------------------------------------------------+

| Daniel L Luksetich | IBM Certified Advanced Database Administrator – |

| IBM GOLD Consultant | Db2 10.1 for Linux UNIX and Windows |

| IDUG Content Committee Past-Chairman | IBM Certified Database Adminstrator – Db2 11 DBA for z/OS |

| IDUG DB2-L Administrator | IBM Certified System Administrator – Db2 11 for z/OS |

| URL: https://db2expert.com https://db2expert.com | IBM Certified Application Developer – Db2 11 for z/OS |

+--------------------------------------+-----------------------------------------------------------+





From: Sevetson, Phil <[login to unmask email]>
Sent: Thursday, August 8, 2019 7:24 AM
To: [login to unmask email]
Subject: [DB2-L] - RE: RESTful APIs and z/OS Connect



Bill G.,



I’m working from memory here, of a presentation at TRIDEX more than six months ago. Here it is:



z/OS Connect allows you to implement RESTful APIs in pretty much any other service on the zmachines. (I’m not a vendor – check with your IBM rep if you need to confirm!) As Raymond said, you don’t need the z/OS Connect product to make DB2-on-z APIs work, but you do for things like compiled programs in-system (and you might for IMS, just speculating).



-phil (sevetson)



Philip Sevetson

Computer Systems Manager

FISA-OPA

5 Manhattan West

New York, NY 10001

[login to unmask email] <mailto:[login to unmask email]>

212-857-1688 w

917-991-7052 m

212-857-1659 f





From: william giannelli <[login to unmask email] <mailto:[login to unmask email]> >
Sent: Thursday, August 8, 2019 7:22 AM
To: [login to unmask email] <mailto:[login to unmask email]>
Subject: [DB2-L] - RE: RESTful APIs and z/OS Connect



Ok, sounds great as it just so happens I am implementing RSU1907 with a lot of API maintenance.

So, my next question, if it is not really needed, what does z/OS Connect provide you?

thanks

Bill



-----End Original Message-----

**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**

-----End Original Message-----

Attachments

  • image001.png (18.4k)
  • image002.png (16.2k)
  • image003.png (20k)
  • image004.png (21.4k)
  • image005.png (17.8k)
  • image006.png (17.4k)

Philip Sevetson

RESTful APIs and z/OS Connect
(in response to Daniel Luksetich)
And, Dan scratches my curiosity bump. What’s the difference between RESTful “services” and “API”? Inquiring minds use Google… read on if you’re interested.

****


1. Starting at Wikipedia ( https://en.wikipedia.org/wiki/Representational_state_transfer ):

Representational State Transfer (REST) is a software architectural https://en.wikipedia.org/wiki/Software_architecture style that defines a set of constraints to be used for creating Web services https://en.wikipedia.org/wiki/Web_service . Web services that conform to the REST architectural style, called RESTful Web services (RWS), provide interoperability between computer systems on the Internet https://en.wikipedia.org/wiki/Internet . RESTful Web services allow the requesting systems to access and manipulate textual representations of Web resources https://en.wikipedia.org/wiki/Web_resource by using a uniform and predefined set of stateless https://en.wikipedia.org/wiki/Stateless_protocol operations. Other kinds of Web services, such as SOAP https://en.wikipedia.org/wiki/SOAP Web services, expose their own arbitrary sets of operations.[1] https://en.wikipedia.org/wiki/Representational_state_transfer#cite_note-1

So, that’s what the services are about.


2. Now, the API (same link, farther down the page):

Web service APIs https://en.wikipedia.org/wiki/Application_programming_interface that adhere to the REST architectural constraints https://en.wikipedia.org/wiki/Representational_state_transfer#Architectural_constraints are called RESTful APIs.[13] https://en.wikipedia.org/wiki/Representational_state_transfer#cite_note-13 HTTP-based RESTful APIs are defined with the following aspects:[14] https://en.wikipedia.org/wiki/Representational_state_transfer#cite_note-Richardson_2013-14
· a base URI https://en.wikipedia.org/wiki/Uniform_Resource_Identifier , such as http://api.example.com/collection/;
· standard HTTP methods https://en.wikipedia.org/wiki/HTTP_method (e.g., GET, POST, PUT, PATCH and DELETE);
· a media type https://en.wikipedia.org/wiki/Media_type that defines state transition data elements (e.g., Atom, microformats, application/vnd.collection+json,[14] https://en.wikipedia.org/wiki/Representational_state_transfer#cite_note-Richardson_2013-14 :91–99 etc.). The current representation tells the client how to compose requests for transitions to all the next available application states. This could be as simple as a URI or as complex as a Java applet.[15] https://en.wikipedia.org/wiki/Representational_state_transfer#cite_note-must-be-hypertext-driven-15
There’s additional material below what I captured, which details the use of the five methods. I recommend using the link – my copying it would bulk up this email and probably violate fair-use copyright principles.

Philip Sevetson
Computer Systems Manager
FISA-OPA
5 Manhattan West
New York, NY 10001
[login to unmask email]<mailto:[login to unmask email]>
212-857-1688 w
917-991-7052 m
212-857-1659 f
[cid:[login to unmask email]

From: Daniel L Luksetich <[login to unmask email]>
Sent: Thursday, August 8, 2019 8:36 AM
To: [login to unmask email]
Subject: [DB2-L] - RE: RESTful APIs and z/OS Connect

Quite simple. Db2 on it’s own provides RESTful services. z/OS connect provides REST API. So, z/OS connect will basically provide you with the ability to expand the use of parameters and such in your URI, different calls for different things. Then it formats the call into something Db2 understands. Db2 on its own provides for you to send parameters and such via a JSON document string, and that’s it.

Cheers,
Dan

+--------------------------------------+-----------------------------------------------------------+
| Daniel L Luksetich | IBM Certified Advanced Database Administrator – |
| IBM GOLD Consultant | Db2 10.1 for Linux UNIX and Windows |
| IDUG Content Committee Past-Chairman | IBM Certified Database Adminstrator – Db2 11 DBA for z/OS |
| IDUG DB2-L Administrator | IBM Certified System Administrator – Db2 11 for z/OS |
| URL: https://db2expert.com https://db2expert.com | IBM Certified Application Developer – Db2 11 for z/OS |
+--------------------------------------+-----------------------------------------------------------+
[cid:[login to unmask email][cid:[login to unmask email][cid:[login to unmask email][cid:[login to unmask email][cid:[login to unmask email][cid:[login to unmask email]

From: Sevetson, Phil <[login to unmask email]<mailto:[login to unmask email]>>
Sent: Thursday, August 8, 2019 7:24 AM
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: [DB2-L] - RE: RESTful APIs and z/OS Connect

Bill G.,

I’m working from memory here, of a presentation at TRIDEX more than six months ago. Here it is:

z/OS Connect allows you to implement RESTful APIs in pretty much any other service on the zmachines. (I’m not a vendor – check with your IBM rep if you need to confirm!) As Raymond said, you don’t need the z/OS Connect product to make DB2-on-z APIs work, but you do for things like compiled programs in-system (and you might for IMS, just speculating).

-phil (sevetson)

Philip Sevetson
Computer Systems Manager
FISA-OPA
5 Manhattan West
New York, NY 10001
[login to unmask email]<mailto:[login to unmask email]>
212-857-1688 w
917-991-7052 m
212-857-1659 f
[cid:[login to unmask email]

From: william giannelli <[login to unmask email]<mailto:[login to unmask email]>>
Sent: Thursday, August 8, 2019 7:22 AM
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: [DB2-L] - RE: RESTful APIs and z/OS Connect


Ok, sounds great as it just so happens I am implementing RSU1907 with a lot of API maintenance.

So, my next question, if it is not really needed, what does z/OS Connect provide you?

thanks

Bill

-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
-----End Original Message-----

-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
Attachments

  • image007.png (3.3k)
  • image008.png (18.4k)
  • image009.png (16.2k)
  • image010.png (20k)
  • image011.png (21.4k)
  • image012.png (17.8k)
  • image013.png (17.4k)

Peter Conlin

RE: RESTful APIs and z/OS Connect
(in response to Philip Sevetson)

Hi Phil,
Here is a simple validation for the REST services that retrieves data (beyond the list of services).

It's a 3 step job, BIND, EXECUTE & LIST.

Aside from the maintenance level, curl (from Rocket) is the only requisite (plus SELECT on SYSIBM.SYSLEVELUPDATES). 

My 1st attempt to attach files, hope it works.

Peter

p.s. I don't know why the z/OS Connect licensing is mandatory to simply test the API for this stuff.  Liberty is distributed with z/OS (z/OSMF), CICS et al, never mind ZOWE.  It's like one side of IBM is throwing sand on the fire while the other is pouring gasoline.   

Attachments

  • cntl.txt (1.5k)
  • listing.txt (21.2k)

J&#248;rn Thyssen

RE: RESTful APIs and z/OS Connect
(in response to william giannelli)

The Db2 rest API is all POST requests whereas the standard is use GET for SELECT, PUT for UPDATE, POST for INSERT, and DELETE for DELETE. z/OS Connect can provide that mapping for you. It can also generate Swagger docs (for some APIs, not all unfortunately, see thread from earlier this year for more discussion).

z/OS Connect also provide discovery services and much more.

It all depends on requirements from your developers. Are they happy with a raw POST endpoint or do they need more? For initial exploration you’ll not need it, but you might want it for production deployment later.

 

In Reply to william giannelli:

Ok, sounds great as it just so happens I am implementing RSU1907 with a lot of API maintenance.

So, my next question, if it is not really needed, what does z/OS Connect provide you?

thanks

Bill



 

Best regards,

Jørn Thyssen

Rocket Software
77 Fourth Avenue • Waltham, MA • 02451 • USA
E: [login to unmask email] • W: www.rocketsoftware.com 

2019 IBM Champion.

Views are personal.