Skip to content

Commit

Permalink
Merge pull request #34 from sallakarppinen/issue-1340
Browse files Browse the repository at this point in the history
REST API changes for Hilary issue #1340
sallakarppinen authored Mar 22, 2017
2 parents 30b6f1e + e46f5d1 commit aa290cb
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion lib/api.admin.js
Original file line number Diff line number Diff line change
@@ -142,6 +142,20 @@ var importUsers = module.exports.importUsers = function(restCtx, tenantAlias, cs
RestUtil.RestRequest(restCtx, '/api/user/import', 'POST', params, callback);
};

/**
* Get all users for a given tenantAlias through the REST API.
*
* @param {RestContext} adminRestCtx Standard REST Context object associated to a global or tenant administrator
* @param {String} tenantAlias tenantAlias for which you wish to receive users
* @param {Function} callback Standard callback function
* @param {Object} callback.err Standard error object, if any
* @param {User[]} callback.response The users for the given tenantAlias
*/
var getAllUsersForTenant = module.exports.getAllUsersForTenant = function(adminRestCtx, tenantAlias, callback) {
var url = '/api/tenants/' + RestUtil.encodeURIComponent(tenantAlias) + '/users';
RestUtil.RestRequest(adminRestCtx, url, 'GET', {}, callback);
};

/**
* Perform the signed authentication request as described by the request info object
*
@@ -167,4 +181,4 @@ var _doSignedAuthenticationWithRequestInfo = function(requestInfo, internalBaseU

return callback(null, authenticatingRestCtx);
});
};
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "oae-rest",
"main": "./lib/api.js",
"description": "Open Academic Environment (OAE) REST client library",
"version": "12.4.1-1",
"version": "12.5.0",
"homepage": "http://www.oaeproject.org",
"author": {
"name": "The Apereo Foundation",

0 comments on commit aa290cb

Please sign in to comment.