Disable resource at run time

Hello,

We have a scenario, where a single API proxy contains multiple REST resources.

Example:

<PreFlow...
<Flows>
<Flow name="getSomething">...
<Flow name="getSomethingElse">...
</Flows>

From operational standpoint, we may receive information from the back-end that we have a downtime for specific resources and thus we may have to disable the same on the API at a resource level (not the complete proxy).

  • Is it possible to disable/turn-off select resources? Example disable "getSomething", but not "getSomethingElse".
  • If not, what is the best way to implement this? Have a check against a custom attribute for each resource, at the product level and validate against this?

Thanks,

Girish

Solved Solved
0 5 361
1 ACCEPTED SOLUTION

@Girish Gajria , How about adding a raise fault policy called "Maintenance Mode" & enable / disable policy ?

View solution in original post

5 REPLIES 5

@Girish Gajria , See similar question asked here, You can able to achieve same using KVM & RaiseFault Policy. Since, you would like to do same at resource level, We assume you will have config for each resource in KVM that tracks maintenance mode & raise fault policy attached to resource flow to check the condition. Hope it helps. Keep us posted if any.

Thanks @Anil Sagar. This involves the overhead of checking for every transaction.

Is it in the realm of possibility that we can enable/disable any conditional flows at the product level? Looking over there we can restrict at the path level, but it does not allow us to mention the HTTP verb (Ex: GET /employees, but not POST /employees)

Any possibility of customizing the error if the path is under restricted at the product level?

I understand that this may not be in plans, but this looks like a requested feature 🙂

Thanks,

Girish

@Girish Gajria , How about adding a raise fault policy called "Maintenance Mode" & enable / disable policy ?

We were considering this approach. However, when I enable/disable a policy, it requires a re-deploy. When a re-deployment is performed, does it affect traffic to the other resources of the same proxy? Is there a downtime when we perform a re-deploy? Or is it performed as a rolling update across message processors?

@Girish Gajria , Apigee supports zero downtime deployment, For more information check docs here.