0

I am trying to access the API version set in the API Manager frontend, defined via an openAPI v3.0.3 spec, in the Micro Integrator backend - I can see this is defined in the API Overview page. However I find attempting to access the property API_VERSION in the backend in the axis2 scope returns null (checked by logging out the captured property): Within a property mediator at the beginning of the MI endpoint mediation flow using the following expression get-property('axis2','API_VERSION').

Is there additional configuration required in the front end to pass the API_VERSION set in API-M to the MI backend?

API-M and MI version: 4.2.0

Architecture: Separate nodes for API-M and MI, passing from API-M to MI via exposed Service Endpoint type

DH_CC89
  • 21
  • 1
  • 7
  • Do you want to access the API Managers API version in MI? – ycr Jul 11 '23 at 13:34
  • Yes, I would like to use the API version defined in the imported openAPI specification so the configuration can be managed in one place on the front end and made dynamic in the backend – DH_CC89 Jul 12 '23 at 15:08

2 Answers2

1

Accessing the API Version from the front end does not seem to be possible so instead, I have settled for putting the version information required in the APIResource. This then populates the SYNAPSE_REST_API_VERSION property in the default context.

If setting the Version Type to URL rather than context the metadata yaml also requires editing to include the version so the correct service URL is called.

DH_CC89
  • 21
  • 1
  • 7
0

You can access the API Manager's API version within a mediation sequence by using api.ut.api_version property.

<property name="API_NAME:VERSION" expression="get-property('api.ut.api_version')"/>
naoko
  • 31
  • 2
  • Unfortunately this returns null in both my local integration studio embedded MI test setup and the PoC platform setup with separate API-M and MI nodes – DH_CC89 Jul 12 '23 at 15:06