Patch #5895
closedAPI to query user database
0%
Description
I've attached a patch that adds an API for querying against the user database.
Provides:- User ID
- Login
- First name
- Last name
URL Examples:
All Users: http://redmine.org/users.xml
Specific User: http://redmine.org/users.xml?status=1&name=akaplan%40nytimes.com
No User: http://redmine.org/users.xml?status=1&name=BOB
Format:
<?xml version="1.0" encoding="UTF-8"?>
<users type="array">
<user id="4">
<first>Redmine</first>
<last>Admin</last>
<login>admin</login>
<mail>foo@nytimes.com</mail>
</user>
<user id="4">
<first>Adam</first>
<last>Kaplan</last>
<login>adamkaplan</login>
<mail>akaplan@nytimes.com</mail>
</user>
</users>
Files
Updated by Adam Kaplan over 15 years ago
Correction, my example was outdated... the ID is an element, not an attribute:
<users type="array">
<user>
<id>4</id>
<first>Redmine</first>
<last>Admin</last>
<login>admin</login>
<mail>foo@nytimes.com</mail>
</user>
Updated by Eric Davis over 15 years ago
Thanks. Can you add some tests to the patch?
Updated by Adam Kaplan over 15 years ago
Eric Davis wrote:
Thanks. Can you add some tests to the patch?
Sure. Might take a few days though, got busy.
Updated by Adam Kaplan over 15 years ago
- File user_query_api-2.diff user_query_api-2.diff added
The patch broke the user information view (/users/14/, for example) because it called render twice (i think). Regardless the second diff includes a fix for this issue.
Updated by Adam Kaplan over 15 years ago
- File user_query_api-3.diff user_query_api-3.diff added
Eric, I've added some tests for the new API.
Updated by Jean-Philippe Lang almost 15 years ago
- Status changed from New to Closed
API for Users added in r4453.