Hi,
I am trying to create a KeyvalueMap using postman tool.
Below is the URL i am using :
https://enterprise.apigee.com/platform/{org-name}/environments/test/target-servers
content-type : application/json
Body :
{ "host":"http://services.groupkt.com", "isEnabled":true, "name":"Country_Target", "port": 8080, "sSLInfo": { "ciphers": [], "clientAuthEnabled": false, "enabled": false, "ignoreValidationErrors": false, "protocols": [] } }
But i am unable to create it. getting following error description. Please do help me ASAP.
<!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <title>Apigee</title> <meta charset="${_response_encoding}"> <link rel="shortcut icon" type="image/icon" href="https://community.apigee.com/favicon.ico"> <link rel="stylesheet" media="screen" href="https://community.apigee.com/public/stylesheets/bootstrapThemeOrange.css"> <link rel="stylesheet" media="screen" href="https://community.apigee.com/public/stylesheets/accountStatic.css"> <link rel="stylesheet" media="screen" href="https://community.apigee.com/public/stylesheets/apigee404.css"> <script src="/public/javascripts/jquery-1.7.1.min.js" type="text/javascript" charset="${_response_encoding}"></script> <script src="/public/javascripts/underscore-min.js" type="text/javascript" charset="${_response_encoding}"></script> <script type="text/javascript"> window.ACCOUNT_CONFIG = { pwdMinLength: 8, pwdValidationRegex: '' }; </script> <script src="/platform/components/bootstrap/js/bootstrap-dropdown.js" type="text/javascript"></script> </head> <body> <script> var context = { 'user.email' : '', 'user.uuid' : '', 'webapp.name' : 'management' }; context['gtm.start'] = new Date().getTime(); context.event = 'gtm.js'; </script> <!-- Google Tag Manager --> <noscript> <iframe src="//www.googletagmanager.com/ns.html?id=GTM-N52333" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push(context);var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-N52333');</script> <!-- End Google Tag Manager --> <script src="/public/javascripts/jquery-custom.js" type="text/javascript"></script> <!--[if lte IE 8]> <div style="margin-top: 40px"> <strong>Warning</strong> <![if lt IE 8]> You are using an outdated, insecure browser. <a href="http://whatbrowser.org/">Upgrade your browser</a> to access this site. <![endif]> <![if IE 8]> Apigee doesn't work well with IE 8. Please <a href="http://windows.microsoft.com/ie/"> upgrade to the latest version of Internet Explorer</a> or use a recent version of another <a href="http://browsehappy.com/">modern browser</a>. <![endif]> </div> <script type="text/javascript"> $(document).ready(function() { $('#loginContainer').hide(); }); </script> <![endif]--> <!--[if lt IE 9]> <script src="components/es5-shim/es5-shim.js" type="text/javascript"></script> <![endif]--> <div org="${organization}"> <div> <div> <span></span> <span> <span></span> </span> </div> </div> </div> <div> <div></div> <div> <h1>Oops, something went wrong!</h1> <div> <div>404</div> <div> Sorry, but the page you're looking for can't be found. <br/> Try checking the URL for errors and refresh your browser. <br/> <br/> Keep getting this page? Report this to our <a href="https://apigee.com/about/support/portal" target="_blank">support team</a>. </div> </div> </div> <script type="text/javascript"> if (window.dataLayer) { window.dataLayer.push({ 'target': 'Edge_notFound', 'action': 'Page Not Found' }); } </script> </div> <div> <div> <div> <div> <p>© <script>document.write(new Date().getFullYear());</script> Apigee Corp. All rights reserved. Version 170802 </p> </div> </div> </div> </div> </body> </html>
Hey @Saidulu
The URL and content you posted indicates you are not trying to create a KeyValueMap ...
... rather that you are trying to create a new TargetServer.
Remember to set your authorization header (easy via postman - Authorization tab, type=Basic Auth).
'Authorization' : 'Basic {base64-username-colon-password'
I managed to create a target server via Postman using the following body:-
{ "host": "http://services.groupkt.com", "isEnabled": true, "name": "Country_Target", "port": 8080, "sSLInfo": { "ciphers": [], "clientAuthEnabled": "false", "enabled": "false", "ignoreValidationErrors": false, "protocols": [] } }
Result was "201 Created" and I can see the target server via the Edge UI.
NAME | HOST | PORT | ENABLED |
---|---|---|---|
Country_Target | http://services.groupkt.com |
Hope this helps.
Robin
As Robin pointed, you are actually attempting to create a target server.
Your URL is also pointing to the wrong location as all management APIs on cloud will go to
https://api.enterprise.apigee.com/v1/o/{org}/.
For more details on the target server APIs http://docs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/environments/%7Benv_name%7D...
And KVM: http://docs.apigee.com/api-reference/content/keyvalue-maps-management-api
User | Count |
---|---|
5 | |
2 | |
2 | |
1 | |
1 |