code: function getServiceGuid(userId, service, appTarget){
  	return target.cfRequest("GET", userId, appTarget.Url + "/v2/spaces/" + appTarget.Space.metadata.guid + "/service_instances"
  	, {"inline-relations-depth":"1","return_user_provided_service_instances":"true","q":"name:"+service}, null, null, null, appTarget)
  	.then(function(serviceJson){
  		var serviceResources = serviceJson.resources;
  		var serviceInstanceGUID;
  		// Find service Guid from the response of getting service request.
  		for(var k = 0; k < serviceResources.length ; k++ ){
  			serviceInstanceGUID = serviceResources[k] && serviceResources[k].metadata && serviceResources[k].metadata.guid;
  			if(serviceInstanceGUID) break;
  		}
  		return serviceInstanceGUID;
  	});
  }
docs: End of putApp()