简体   繁体   中英

WSO2 APIM - Retrieve Information about an API call in fault sequence

Trying to get the API name in the fault sequence(ex: auth_failure_handler.xml).

Tested as below and it is not working,

<sequence name="_auth_failure_handler_" xmlns="http://ws.apache.org/ns/synapse">
      <property name="error_message_type" value="application/xml"/> 
      <log level="custom">  
          <property name="ApiName" scope="transport" expression="$ctx:API_NAME"/> 
      </log>  
</sequence>

I think you can try with this:

<property name="ApiName" expression="$ctx:api.ut.api"/>

There are, some other useful properties, witch You can find on github: APIMgtGatewayConstants

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM