Flow hook not applicable to a particular proxy

Not applicable

Hi,

Is there any way, where if I have added one flow hook to a particular environment and I want this not to be applied for a particular proxy in same environment?

Thanks in Advance..

Solved Solved
0 4 710
1 ACCEPTED SOLUTION

Hi @Priyadarshi Ajitav Jena

I just stumbled upon this question. While you and Nagashree are correct that a flow hook shared flow will run for every proxy, you can use conditions in your shared flow. The variable apiproxy.name has the name of the API proxy being run, and this variable correctly identifies the proxy name for which the flow hook shared flow is running, so you could use it in the shared flow this way:

<Step>
  <Name>SomePolicy</Name>
  <Condition>apiproxy.name != "oauth"</Condition>
</Step>
<Step>
  <Name>AnotherPolicy</Name>
  <Condition>apiproxy.name != "oauth"</Condition>
</Step>

View solution in original post

4 REPLIES 4

@Priyadarshi Ajitav Jena

Flow hooks are applied to all proxies deployed to an environment. You cannot override it for a specific proxy. Excerpts from the docs below:

With a flow hook, you attach a shared flow so that it executes at the same place for all API proxies deployed to a specific environment.

Note: Important!Attaching a shared flow to a flow hook is an action that has a very broad effect. The attached shared flow will execute at the flow hook's point for every proxy deployed to that environment.

https://docs.apigee.com/api-platform/fundamentals/flow-hooks

Yes, my understanding is same as your. As I have a business need which came later after the implementation of flow hook. I was checking for a workaround. Thanks for you comment.

Hi @Priyadarshi Ajitav Jena

I just stumbled upon this question. While you and Nagashree are correct that a flow hook shared flow will run for every proxy, you can use conditions in your shared flow. The variable apiproxy.name has the name of the API proxy being run, and this variable correctly identifies the proxy name for which the flow hook shared flow is running, so you could use it in the shared flow this way:

<Step>
  <Name>SomePolicy</Name>
  <Condition>apiproxy.name != "oauth"</Condition>
</Step>
<Step>
  <Name>AnotherPolicy</Name>
  <Condition>apiproxy.name != "oauth"</Condition>
</Step>

Thanks @Mike. This will help.