Hi All,

We have a requirement to introduce access restrictions to APIs based
transport type. As it is done for proxy services, we wish to introduce a
"transport" attribute based on which, access to the API will be deflected
or approved.

>From what i observed, we may introduce a condition in canProcess() method
of API class, to validate the inTransport of message context against the
configured list of transports. But is it the correct way to achieve this?

Pls. find attached sample API xml.

Your advise on this regard would be highly appreciated.



Thanks and Regards,

Ruwan Yatawara
<?xml version="1.0" encoding="UTF-8"?>
<api xmlns="http://ws.apache.org/ns/synapse";
     name="Response_API"
     transports="https"
     context="/response">
   <resource methods="POST GET" url-mapping="/*">
      <inSequence>
         <log level="full"/>
         <payloadFactory>
            <format>
               <response xmlns="">
                  <value>Received Request</value>
               </response>
            </format>
         </payloadFactory>
         <property name="RESPONSE" value="true" scope="default" type="STRING"/>
         <header name="To" action="remove"/>
         <send/>
      </inSequence>
   </resource>
</api>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to