Skip to Main Content
IBM Data and AI Ideas Portal for Customers


This portal is to open public enhancement requests against products and services offered by the IBM Data & AI organization. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:


Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,


Post your ideas

Post ideas and requests to enhance a product or service. Take a look at ideas others have posted and upvote them if they matter to you,

  1. Post an idea

  2. Upvote ideas that matter most to you

  3. Get feedback from the IBM team to refine your idea


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

IBM Employees should enter Ideas at https://ideas.ibm.com


Status Not under consideration
Workspace Db2 for z/OS
Created by Guest
Created on May 23, 2019

Have GET generate a useful Swagger doc for REST services that call native SQL SPs

Within a REST client like Postman or SoapUI, you can call the URI for a Db2 REST service with the GET command and the client will, from information passed to it from Db2, build a Swagger document that describes the data being sent to/from the REST service.  This is very useful for callers of Db2 REST services as it describes the format of the data being returned - the SOAP equivalent of a WSDL document.

 

Unfortunately when the REST service SQL statement is CALL, GET simply returns a Swagger doc that describes the variables the called SP itself uses, not the data the SP is returning to the service via the ResultSet.

 

I have attached two files: one is the Swagger output from a GET against a REST service that calls a native SQL SP, and the other is the output from a GET against a similar REST service that issues the single SQL statement from the native SQL SP directly, rather than call the SP to issue the SQL.

 

GET needs to describe the data being returned to the REST service when the service calls a native SQL stored procedure.

Needed by Date Nov 29, 2019
  • Admin
    Janet Figone
    Reply
    |
    Jun 6, 2019

    Raymond, Jim adds: currently there is no way to provide a swagger doc for result sets returned from a procedure. They are not known when the service is created. They are dynamically generated when the procedure is invoked. The Db2 discover service has no way to know which result sets or if any will be returned until the procedure is executed.

    z/OS connect can generate a swagger doc for a Db2 native service that invokes a procedure from the output of the Db2 discover service; but it contains only the input/output parameters of the procedure. The result sets are not provided in the discover service which is the input to z/OS swagger generation utility.

  • Guest
    Reply
    |
    Jun 6, 2019

    Janet?

    Jim, not sure I'm getting your comment.  Swagger support is already present in native Db2.  I can GET a REST service and have my client software (Postman in my case) show me the Swagger doc.  The problem is it's not describing the result set; it only describes the Input and/or Output parameters the REST service passes to the SP.  We need the result set described.

    An example would be a REST service that calls an SP to return all columns from Sysibm.Sysdatabase for a specified dbname value.  The REST service would pass an input variable to the SP, say, DB_NAME, and the SP would pass back an output variable, say, SQL_CODE, to indicate the success or otherwise of the SQL - as well as the actual data in a ResultSet.  As it stands, the Swagger doc produced from the data Db2 passes back to the client would describe DB_NAME and SQL_CODE.  What we need it to describe is the 21 columns in Sysibm.Sysdatabase.

    I must confess to not knowing anything about z/OS Connect, other than we don't have it.  But I doubt it could generate a Swagger doc any more useful than any other REST client if Db2 isn't providing the required metadata.

    Have I got it wrong?  Could z/OS Connect provide a Swagger doc that would describe the ResultSet rather than just the input/output variables passed between the REST service and the called SP?  Because as it stands it seems Db2, not any particular front-end into it, is where the problem lies.

     

    Cheers,

     

    Raymond

  • Guest
    Reply
    |
    Jun 5, 2019

    Janet, z/OS Connects supports Swagger. There are no plans to add Swagger support to Db2 native REST. Can you close this idea as supported using z/OS Connect.

    Jim Pickel
    Senior Technical Staff
    Db2 for z/OS Development
    Security and Connectivity
    Silicon Valley Laboratory

    mobile: 408-497-6320
    email: pickel@us.ibm.com

    [signature_1199027360]