I want to fetch all the values I have stored in a Map using Management UI APIs as given in "Get KeyValue Map in an environment".
Issue 1:Accessing in API Proxy using ServiceCallout
So,I framed the url as "https://api.enterprise.apigee.com/v1/organizations...<OrganisationName>/environments/test/keyvaluemaps/<Map_Name>
And used it in ServiceCallOut policy in my API Proxy.I have also included Basic Authentication Policy before ServiceCallOut.But its throwing below error in APIProxy,
"Execution of ServiceCallout Service-Callout-1 failed. Reason: ResponseCode 401 is treated as error
tried using Service callout to my Map which I created in KeyValue Operation Policy"
Issue 2 : Accessing in UI http://apigee.com/docs/management/apis/get/organiz...
I tried creating a KeyValue Map using API http://apigee.com/docs/management/apis/post/organi... and tried to use Get API.That is working fine if both creation and fetch done through APIs.
But when I create a Map in KeyValueMap policy and try to get the value through API,its throwing me
HTTP/1.1 404 Not Found
{ "code": "keyvaluemap.service.keyvaluemap_doesnt_exist", "message": "KeyValueMap MyCollectionMap does not exist", "contexts": [] }
So,I am getting two different types of errors when accessing in two ways.Please post me what is the solution to fetch all the values in a Map using API Proxy.
Solved! Go to Solution.
Thanks for your response....
I have deployed in test environment only.And I am able to fetch all the values in Map now using https://api.enterprise.apigee.com/v1/organizations...>/environments/test/keyvaluemaps/MyCollectionMap
Earlier for the same collection it wasn't working.Strangely its started working now when I try this url.
But when I am using Service callout,its still throwing error as,
{ "fault": { "faultstring": "Execution of ServiceCallout Service-Callout-1 failed. Reason: ResponseCode 401 is treated as error", "detail": { "errorcode": "steps.servicecallout.ExecutionFailed" } } }
So,I am still digging the issue....If you are aware of the solution,please let me know.