Setting up Db2 native REST services
What are Db2 native REST services and how are they used in z/OS® Connect?
zosConnect-3.0 Applies to zosConnect-3.0.
Containers Applies to z/OS Connect container deployments.
What is a Db2 native REST service?
As a Representational State Transfer (REST) service provider, Db2 enables your web, mobile, and cloud applications to interact with Db2 data through a set of scalable RESTful APIs.
Db2 defines a REST service as a package. Each package contains a single static SQL statement and is stored in a user-defined SYSIBM.DSNSERVICE catalog table. When a service is created, a new row is added to the table that associates the service with its corresponding package. After the package is bound, it can be run only as a service.
Why are REST services used in IBM z/OS Connect?
An authorized user can discover and invoke the Db2 service through a REST HTTP client.
Figure 1 shows how IBM® z/OS Connect uses a Db2 native REST service. It is the callable artifact that enables Db2 to accept an HTTP request, process the request body in JavaScript Object Notation (JSON) format, execute the bound SQL statement, and return any output in JSON format to the IBM z/OS Connect API.
What to do next
Prepare the sample Db2 native REST services to test out the experience of API enabling Db2 data. Alternatively, configure your own Db2 native REST service and expose Db2 data by using your own OpenAPI definition.