Unable to Create multiple entries in kvm using management api in apigeeX

Hi,

I have a requirement like I have to create multiple entries in kvm using management api in apigeeX.
So can we made multiple entries in apigeeX using management apis?

Thanks

0 6 258
6 REPLIES 6

Yes

Hii @dknezic 

Could you please explain how to add multiple entries in kvm in apigeeX using management APIs?

Please review the documentation

https://apidocs.apigee.com/docs/key-value-maps/1/overview

https://apidocs.apigee.com/docs/key-value-maps/1/routes/organizations/%7Borg_name%7D/apis/%7Bapi_nam...

 

Use POST with below payload (again it dependents if kvm is at environment vs  org level )

org level:

/organizations/{org_name}/apis/{api_name}/keyvaluemaps

vs

environment level

/organizations/{org_name}/environments/{env_name}/keyvaluemaps

I like to always use "encrypted"= "true" since you may have secrets


{
"encrypted": true,
"entry": [
{
"name": "Test",
"value": "1234"
},
{
"name": "Test2",
"value": "5678"
},
{
"name": "Test3",
"value": "91011"
},

],
"name": "KV-Test"
}

Make sure to use proper scope (environment vs organization) & same Map name eg: KV-Test (in mapIdentifier) in KeyValueMapOperations policy to fetch the values with in the proxy.

https://cloud.google.com/apigee/docs/api-platform/reference/policies/key-value-map-operations-policy

 

@API-Evangelist 
Thanks for your response.
But this solution is for Apigee edge but I want to create multiple entries of kvm using management api in apigeeX.

This is the Apigee X Management API for creating a KVM entry. You would need to call it multiple times for multiple entries

https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.keyval...

Hello, when was this API released for Apigee X? I was surprised and excited to see it because our team had been maintaining custom proxies to interact with KVM entires, since we thought that was the only way to do it. I'd like to make sure to subscribe to whatever channel this change was announced in. I didn't see it in the release notes but I could be overlooking it. Thanks!