API Connect

 View Only
Expand all | Collapse all

Cannot able to Define Catalog specific property values in API Properties

  • 1.  Cannot able to Define Catalog specific property values in API Properties

    Posted Wed March 09, 2022 02:11 AM
    I want to put domain of target url in Catalog define properties as it is volatile n changes frequently so I am try to use the property in API to invoke endpoints but these property isn't working out.
    I followed these for ref. -
    Defining Catalog specific property values
    Setting API properties


    ------------------------------
    Anurag Gupta
    ------------------------------


  • 2.  RE: Cannot able to Define Catalog specific property values in API Properties

    Posted Thu March 10, 2022 01:40 PM
    Hi Anurag,

    How exactly did you try it? Can you post snippet of how it was defined in the API, how it was used in the API, as well as catalog names/titles you have?​

    ------------------------------
    SUMANTO Biswas
    ------------------------------



  • 3.  RE: Cannot able to Define Catalog specific property values in API Properties

    Posted Fri March 11, 2022 03:15 AM

    AFAIK for 2018, catalog properties are applied only when you publish API with current property value, and not changing when you change property value. So it isn't really dynamic.

    I assume you expect properties values to change frequently, so you'll need to republish all APIs on property changes.

    But I clouldn't find this information in documentation right now, it's from hands-on experience.Somebody plz correct me, if I'm wrong.



    ------------------------------
    Denis Migulin
    ------------------------------



  • 4.  RE: Cannot able to Define Catalog specific property values in API Properties

    Posted Tue March 15, 2022 11:39 PM
    @Denis Migulin you are correct - you have to stage/re-publish the Product​ containing the API again for API properties changes to take effect.

    I will create an internal docs issue to update the API Connect documentation - thank you for checking.

    ------------------------------
    SUMANTO Biswas
    ------------------------------



  • 5.  RE: Cannot able to Define Catalog specific property values in API Properties

    IBM Champion
    Posted Wed March 16, 2022 07:34 AM
    Unfortunately, that's a big pain point for some implementations. Unless you call an external service or use extensions, there is no way currently in the product to provide dynamic config values.


  • 6.  RE: Cannot able to Define Catalog specific property values in API Properties

    Posted Fri May 27, 2022 07:51 AM
    Hi Denis,

    After Changing the catalog properties, we can republish the product still better option than changing target url individually as all the APIs inside product follows same domain whose version is changing(PFA of screenshot in which catalog property is defined where I am trying to change version).
    But catalog property values isn't accessible to me inside API.
    How is defined catalog property in my API -(cat_1.0.0.yaml)
    properties:
        empty: {}
    catalogs:
        Sandbox:
           properties: {}

    where empty is property define inside catalog named sandbox.
    and also what reference variable is required to access value of same property.

    ------------------------------
    Anurag Gupta
    ------------------------------

    Attachment(s)

    yaml
    cat_1.0.0.yaml   707 B 1 version


  • 7.  RE: Cannot able to Define Catalog specific property values in API Properties

    IBM Champion
    Posted Fri May 27, 2022 09:24 AM
    I didn't quite understand the second part of your questions, but you can access your catalog property inside your API flow by using $(catalog-var-name)
    Use a set-variable policy to assign $(catalog-var-name) value to a new context variable e.g: target-url. Then use target-url context variable in your Invoke.


  • 8.  RE: Cannot able to Define Catalog specific property values in API Properties

    Posted Fri May 27, 2022 04:08 PM
    Hi Romil,

    The name of catalog is 'sandbox' and variable name is 'empty' so reference i tried to get value $(sandbox-empty)/$(api.properties.empty)/$(apim-sandbox-empty) but any of them doesn't return value the which i defined in catalog.

    ------------------------------
    Anurag Gupta
    ------------------------------



  • 9.  RE: Cannot able to Define Catalog specific property values in API Properties
    Best Answer

    IBM Champion
    Posted Fri May 27, 2022 04:15 PM
    You don't have to specify the catalog name if your API is deployed/consumed in that catalog. Just use variable name : $(empty)



  • 10.  RE: Cannot able to Define Catalog specific property values in API Properties

    Posted Fri May 27, 2022 04:28 PM
    Thanks It worked out for me. Thanks @Romil Garg , Basically we don't have to do anything just have to use access it, i was trying to add some catalog properties in API because of that it always show​ unfined.


    ------------------------------
    Anurag Gupta
    ------------------------------