/lib/apigee-sdk-mgmt-api.js method getKVMsEnvironment() makes this call =>
curl -X GET undefined/v1/organizations/undefined/environments/dev1/keyvaluemaps
as the variable apigee_profile passed to this function is of the form =>
/{'test' : {url_mgmt : 'https://api.enterprise.apigee.com', org : grunt.option('org'), env : grunt.option('env'), username : grunt.option('username'), password : grunt.option('password')}, env : grunt.option('env')},/
The variables accesed in this function are at wrong level based on the request object.
trying to access apigee_profile[url_mgmt] instead of apigee_profile['test']['url_mgmt']
Please change
var apigeel = apigee_profile ;
to
var apigeel = apigee_profiles[apigee_profiles.env];
/lib/apigee-sdk-mgmt-api.js method getKVMsEnvironment() makes this call => curl -X GET undefined/v1/organizations/undefined/environments/dev1/keyvaluemaps
as the variable apigee_profile passed to this function is of the form => /{'test' : {url_mgmt : 'https://api.enterprise.apigee.com', org : grunt.option('org'), env : grunt.option('env'), username : grunt.option('username'), password : grunt.option('password')}, env : grunt.option('env')},/
The variables accesed in this function are at wrong level based on the request object. trying to access apigee_profile[url_mgmt] instead of apigee_profile['test']['url_mgmt']
Please change
var apigeel = apigee_profile ; to var apigeel = apigee_profiles[apigee_profiles.env];