Search code examples
apigee

Is there a direct way to query and update App data from within a proxy or do I have to use the management API?


I have a need to change Attributes of an App and I understand I can do it with management server API calls.

The two issues with using the management server APIs are:

  1. performance: it’s making calls to the management server, when it might be possible directly in the message processor. Performance issues can probably be mitigated with caching.
  2. availability: having to use management server APIs means that the system is dependent on the management server being available. While if it were done directly in the proxy itself, it would reduce the number of failure points.

Any recommended alternatives?


Solution

  • Finally all entities are stored in the cassandra ( for the runtime )

    Your best choice is using access entity policy for getting any info about an entity. That would not hit the MS. But just for your information - most of the time you do not even need an access entity policy. When you use a validate apikey or validate access token policy - all the related entity details are made available as flow variable by the MP. So no additional access entity calls should be required.

    When you are updating any entity (like developer, application) - I really assume it is management type use case and not a runtime use case. Hence using management APIs should be fine.

    If your use case requires a runtime API call to in-turn update an attribute in the application then possibly that attribute should not be part of the application. Think how you can take it out to a cache, KVM or some other place where you can access it from MP (Just a thought without completely knowing the use cases ).