API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Update API with updated YAML file

    Posted Sun October 15, 2023 06:43 PM

    I'm relatively new to API Connect, and I'd like to share my current scenario. I've created an API by importing an external YAML file with OpenAPI specification 3.0.

    During our end-to-end testing, we encountered some issues with the YAML file. I'm attempting to update the API using the 'update' option, but I'm encountering the following error:

    "Updating API of type 'rest' with API of type 'rest' is not allowed."

    I'm uncertain about how to proceed with updating the existing API. Any assistance would be greatly appreciated.

    Sandeep



    ------------------------------
    Sandeep Rane
    ------------------------------


  • 2.  RE: Update API with updated YAML file

    Posted Mon October 23, 2023 12:49 PM

    The update operation is only for SOAP APIs, allowing you to provide an updated WSDL file.
    If you want to update a REST API then just change the YAML file - you can easily edit it in source view in the UI if you want to.



    ------------------------------
    Chris Dudley
    ------------------------------



  • 3.  RE: Update API with updated YAML file

    Posted Mon October 23, 2023 06:26 PM

    Thank you, Chris. However, I am not entirely convinced of API Connect's ability to handle YAML file updates in this manner. Our use case involves importing the OpenAPI 3.0 Specification YAML file with the following option

    Existing OpenAPI  

    Use an existing definition of a REST proxy

    Are you suggesting editing the YAML file in API Designer or API Manager after importing it?

    Sandeep

     



    ------------------------------
    Sandeep Rane
    ------------------------------



  • 4.  RE: Update API with updated YAML file

    Posted Mon October 23, 2023 11:18 PM

    A rest api in apic takes your existing openapi document and you then add the apic specific assembly information.

    There is no update operation for the bit that was imported afterwards. The closest you can get is editing it in source view and replacing the content but if your local file doesn't have the apic extensions such as assembly in it you wouldn't want to do a wholesale replace.

    Look at the yaml and you'll see what I mean.



    ------------------------------
    Chris Dudley
    ------------------------------