Key Value Map best practise

Hi Apigeeks,

I have an organization with different environments. I want to know what is the best practice in order to define KVMs. Specificaly:

1. Do i need to declare KVM for each environment separately OR

2.We can declare KVM on organization level (not env level).

Which one can i recommend.


Thanks
Pratyus

Solved Solved
0 4 1,120
1 ACCEPTED SOLUTION

If the question is, "is it possible to use an organization-scoped KeyValueMap?", then the answer is: yes. That is supported.

From the documentation:

The KeyValueMaps resource provides an API for managing the Apigee Edge key/value store for longer-term data persistence. Key/Value maps are collections of arbitrary name/value pairs ("entries") that can be accessed at runtime by API proxies, or for other custom runtime requirements. The API lets you perform CRUD operations on the key/value store.

You can create and manage key/value maps at multiple scopes:

  • API proxy: Key/value maps at the API proxy scope can be accessed only by the API proxy or a specific revision of the proxy.
  • Environment: Key/value maps at the environment scope can be accessed by any API proxy in the environment (such as test or prod). In the management UI (APIs > Environment Configuration), key/value maps are at the environment scope.
  • Organization: Key/value maps at the organization scope can be accessed by all API proxies in all environments.

API proxies interact with the key/value store at runtime using policies. See Key Value Map Operations policy.

If your question is, "Which should I use? organization-scoped or environment-scoped Key-Value Maps?", then ... the answer is, "It depends." It's up to you. Some data are organization-scoped. This might include specific stndards around keystrengths, quota limits, spike arrest limits, templates for log messages, trace masks, other formatting.

Some data might be environment specific. This might include endpoints for IDPs or log aggregation systems, endpoints for targets, public or private keys, and lots of other things.

In some cases you may use both org-scoped and env-scoped KVMs.

It's up to you.

View solution in original post

4 REPLIES 4

If the question is, "is it possible to use an organization-scoped KeyValueMap?", then the answer is: yes. That is supported.

From the documentation:

The KeyValueMaps resource provides an API for managing the Apigee Edge key/value store for longer-term data persistence. Key/Value maps are collections of arbitrary name/value pairs ("entries") that can be accessed at runtime by API proxies, or for other custom runtime requirements. The API lets you perform CRUD operations on the key/value store.

You can create and manage key/value maps at multiple scopes:

  • API proxy: Key/value maps at the API proxy scope can be accessed only by the API proxy or a specific revision of the proxy.
  • Environment: Key/value maps at the environment scope can be accessed by any API proxy in the environment (such as test or prod). In the management UI (APIs > Environment Configuration), key/value maps are at the environment scope.
  • Organization: Key/value maps at the organization scope can be accessed by all API proxies in all environments.

API proxies interact with the key/value store at runtime using policies. See Key Value Map Operations policy.

If your question is, "Which should I use? organization-scoped or environment-scoped Key-Value Maps?", then ... the answer is, "It depends." It's up to you. Some data are organization-scoped. This might include specific stndards around keystrengths, quota limits, spike arrest limits, templates for log messages, trace masks, other formatting.

Some data might be environment specific. This might include endpoints for IDPs or log aggregation systems, endpoints for targets, public or private keys, and lots of other things.

In some cases you may use both org-scoped and env-scoped KVMs.

It's up to you.

Not applicable

The organization-level KVM cannot be seen in the edge UI. You need to do a management API call to get the details. The Environment level can be seen in Edge UI environment configurations.

If you have a requirement to check frequently or the KVM can be managed by users and you don't want to expose your management API call then you can go for the environment one.

Is there a way to use this api from Apigeex?

yes. But yours seems like a new question.  Maybe you can post a New Question and we can talk about it.