keyValueMap 'apiproxy' scope has no environment

Not applicable

I am using the keyvaluemaps in the apiproxy scope:

1.I am trying to create the KVM in an ‘apiproxy scope’ (not organization or environment scope)

using this endpoint:

https://api.enterprise.apigee.com/v1/organizations/{org}/apis/{Proxy-Name}/keyvaluemaps

and I see there is no any ‘environment’ context. (as you can see, environment doesn’t even appear in the link as opposed to the endpoint of creating KVM in environment scope:
https://api.enterprise.apigee.com/v1/organizations/{org}/environments/{env}/keyvaluemaps)

does it mean that each entry can be created only once (singleton) on all proxie's environments?

2. how can I use different KVM value for different environments?

let's say I have a key Key1 ,

with different values for each environment:

test, I want Key1 to be “test.val1”

for prod, I want Key1 (play attention it's the same key1) to be “prod.val2”

my problem is:

using the “apiproxy KVM” endpoint ,(https://api.enterprise.apigee.com/v1/organizations/{org}/apis/{Proxy-name}/keyvaluemaps [pay attention no env is defined here or in payload]) how can I achieve such a behaviour (where on test I will get “test.val1” from Key1 and on prod I will get “prod.val2” from Key1)

3. where can I find the 'apiproxy' scope KVM entries in the ManagmentUI? I can't see it.

thanks

Solved Solved
0 3 371
1 ACCEPTED SOLUTION

Not applicable

Hi @YuriAbaev

1. API Proxy KVM does not have environment scope. KVM can be created at Organization Level, Environment Level and API proxy Level. Keys in a KVM must be unique.

2. There are two solution for your problem

a) Create a KVM with the same name and same key name for the entry in both test and prod env. and then use the environment scope in KVM operation policy.

b) Create a KVM at proxy level but name the keys with env. name appended e.g. key1.test and key1.prod. and then use the system variable environment.name to make the Key name in KVM operation policy. But if you have too many keys then creating the key names to use in KVM policy might be bit difficult.

3. The KVM at apirpoxy and organization scope can be handled through management API only.

Hope this helps.

View solution in original post

3 REPLIES 3

Hi @YuriAbaev,

Use the following links to apigee documentation for creating

API proxy specific KVM

Environment specific KVM

Thabks @Nisha Mallesh but I ve already refered to the docs.. And didnt find any exlaination there

Not applicable

Hi @YuriAbaev

1. API Proxy KVM does not have environment scope. KVM can be created at Organization Level, Environment Level and API proxy Level. Keys in a KVM must be unique.

2. There are two solution for your problem

a) Create a KVM with the same name and same key name for the entry in both test and prod env. and then use the environment scope in KVM operation policy.

b) Create a KVM at proxy level but name the keys with env. name appended e.g. key1.test and key1.prod. and then use the system variable environment.name to make the Key name in KVM operation policy. But if you have too many keys then creating the key names to use in KVM policy might be bit difficult.

3. The KVM at apirpoxy and organization scope can be handled through management API only.

Hope this helps.