KVM Post Entry Not Behaving As Expeted

The documentation for KVM entry POST states that "..., it updates the entries if they exist, or adds them if they do not exist." When attempting to use this endpoint to create a KVM entry that does not already exist I am receiving the following error: keyvaluemap.service.keyvaluemap_entry_doesnt_exist. This is expected, the key does not exist, but the documentated behavior says it should create the key in this case.

Is the documentation incorrect, or is there an issue in my usage?

0 1 68
1 REPLY 1

What version of Apigee are you using?  The Update-or-create behavior may not work on Apigee for Private cloud.

Can you show the details of the POST call you are making?

I think a workaround may be to always use the Update version of the post.  Like this (for an environment scoped KVM): 

POST :mgmtserver/v1/o/:orgname/e/:env/keyvaluemaps/:mapname/entries/:keyname
Authorization: :apigee-auth
content-type: application/json

{
   "name" : ":keyname",
   "value" : "new-value-to-write"
}