{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
0
Question by Swapna · Jun 28, 2016 at 05:33 PM · 1.5k Views kvmkvmap

Retrieve and Update KVM Value

Hi, I'm able to retrieve all the KVM Maps available in my test org and looks like the following kvm (

mapIdentifier="DataCenter") is there in default kvmap. But I would like to update value for the datacenterserver variable and for this I' not seeing this variable only in kvmap in retrieval. Is KVM work in test orgs? If yes, How can I directly retrieve the data of DataCenter KVM map? I have tried using the below once, but not working for the mapIdentifier names. Please advice. Thanks!

http://docs.apigee.com/management/apis/get/organizations/%7Borg_name%7D/keyvaluemaps/%7Bmap_name%7D

Existing KVM:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="DataCenterGet" mapIdentifier="DataCenter">
<DisplayName>DataCenterGet</DisplayName>
<FaultRules/>
<Properties/>
<ExclusiveCache>false</ExclusiveCache>
<ExpiryTimeInSecs>-1</ExpiryTimeInSecs>
<Get assignTo="datacenterserver" index="1">
<Key>
<Parameter ref="request.header.X-OUID"/>
</Key>
</Get>
<Scope>environment</Scope>
</KeyValueMapOperations>

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

2 Answers

  • Sort: 
avatar image
1

Answer by hanselm   · Jun 28, 2016 at 09:56 PM

Hi Swapna,

Make sure the apiproxy from where you are accessing the KVM is deployed to the same environment where the KVM is created, since the Scope element of the KVM is <Environment> as per your snippet above.

Also, to update the KVM entry, you can use the <Put> operation as described here:

http://docs.apigee.com/api-services/reference/key-value-map-operations-policy

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by arghya das · Jun 29, 2016 at 06:49 AM

@Swapna In your keyvaluemap policy I see that you have set the <Scope> as environment, which means its not an org level kvm, its an environment level kvm. Now depending on which environment you had deployed this proxy, you should be able to call it via the management api using:

I think you already know how to update the kvm, otherwise just follow the public api docs for kvm.

Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Swapna · Jun 29, 2016 at 03:02 PM 0
Link

Thanks @arghya das and @hmiranda@apigee.com.

Can weretrieve the custom attributes based on environment and apps? I have tried the below one but it's not working.

Thanks in Advance.

avatar image Swapna Swapna · Jun 29, 2016 at 03:13 PM 0
Link

@arghya das Irgnore this. Got it. it's a context level.

Follow this Question

Answers Answers and Comments

38 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to access keyvalue map created from management UI using policy ? 1 Answer

KVM - suitability for storing small data 2 Answers

KeyValueMap Operations - GET not working 1 Answer

Copying KVM values from one environment to another 9 Answers

adding a value to kvm 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges