Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unable to remove entries from KeyValueMap using Update KeyValueMap API

I created a KVM "My_Test_KVM" with two entries

{
  "entry": [
    {
      "name": "Key1",
      "value": "value_one"
    },
    {
      "name": "Key2",
      "value": "value_two"
    }
  ],
  "name": "My_Test_Map"
}

Now I want to update the value of "Key1" as "ONE" and would like to delete the entry "Key2". So I used the "Update KeyValueMape in an Environment" API call - http://apigee.com/docs/management/apis/put/organi...

However, in the output, I see this

a) The value of "Key1" is updated to "ONE"

b) The entry "Key2" still exists

{
  "entry": [
    {
      "name": "Key1",
      "value": "ONE"
    },
    {
      "name": "Key2",
      "value": "value_two"
    }
  ],
  "name": "My_Test_Map"
}

Is this expected behaviour ?

Solved Solved
1 3 351
1 ACCEPTED SOLUTION

Not applicable

Hi there!

KVM update API updates an existing KeyValueMap in an environment and does not override the existing map. Instead, this method updates the entries if they exist or adds them if not. So, Update won't delete any entries of that map.

For deleting an individualKVM entry, please follow the below link.

http://apigee.com/docs/management/apis/delete/orga...

View solution in original post

3 REPLIES 3