Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST API changes for Hilary issue #1340 #34

Merged
merged 6 commits into from
Mar 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion lib/api.admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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
Expand Up @@ -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",
Expand Down