Skip to content

Commit

Permalink
Added the getTenantsByEmailAddress endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
simong committed Mar 12, 2016
1 parent be59a25 commit 8734d88
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/api.tenants.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ var getTenants = module.exports.getTenants = function(restCtx, callback) {
RestUtil.RestRequest(restCtx, '/api/tenants', 'GET', null, callback);
};

/**
* Get the tenants matching one or more email addresses
*
* @param {RestContext} restCtx Standard REST Context object that contains the current tenant URL and the current user credentials. In order for this to work, a global admin rest context will need to passed in.
* @param {String[]} emails The email addresses to get the tenants for
* @param {Function} callback Standard callback function
* @param {Object} callback.err Error object containing error code and error message
* @param {Object} callback.tenants The tenants keyed by the email addresses
*/
var getTenantsByEmailAddress = module.exports.getTenantsByEmailAddress = function(restCtx, emails, callback) {
RestUtil.RestRequest(restCtx, '/api/tenantsByEmail', 'GET', {'emails': emails}, callback);
};

/**
* Retrieve a tenant through the REST API.
*
Expand Down

0 comments on commit 8734d88

Please sign in to comment.