API Connect

 View Only
  • 1.  How to use a static value in the Map widget

    Posted Tue June 14, 2022 01:42 PM

    Is it possible to put a string value 'some-string' in the map "Context variable" -or- would it be possible to pull it from a property defined in API? The value below for the test security token – is that valid? Or can I put another line here that would pull it from a property defined within the API?

     

    Graphical user interface, text, application, email  Description automatically generated



  • 2.  RE: How to use a static value in the Map widget
    Best Answer

    Posted Wed June 15, 2022 09:28 AM

    Hi Ray,

    The context variable in the input definitions can be any variable in the api connect context, so if you have had some prior policy set a context variable named mySecurityToken to the value of c76bf89d-3b8f-439f-9b5d-bb270ac9e3db, then your map input would simply specify mySecurityToken as the context variable.  The map action would map from the input name, in this case securityToken to whatever output variable you desire.  If you're asking if you can specify as the context variable $(myContextVariableName) where the context variable myContextVariableName has a value of  mySecurityToken, that should be substituted at runtime as long as the option to disable variable name resolution does not prevent that.  I've never seen that level of indirection required in an API before, but I believe it should work.

    Regards,

    Steve



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------