Project

General

Profile

Actions

Patch #5895

closed

API to query user database

Added by Adam Kaplan over 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
2010-07-16
Due date:
% Done:

0%

Estimated time:

Description

I've attached a patch that adds an API for querying against the user database.

Provides:
  1. User ID
  2. Login
  3. Email
  4. First name
  5. 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

user_query_api.diff (1.5 KB) user_query_api.diff Patch Adam Kaplan, 2010-07-16 23:04
user_query_api-2.diff (1.78 KB) user_query_api-2.diff Patched diff: fixes broken user pages. Adam Kaplan, 2010-07-20 20:55
user_query_api-3.diff (4.73 KB) user_query_api-3.diff added integration tests - trunk r3859 Adam Kaplan, 2010-07-23 21:53
Actions #1

Updated by Adam Kaplan over 14 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>
Actions #2

Updated by Eric Davis over 14 years ago

Thanks. Can you add some tests to the patch?

Actions #3

Updated by Adam Kaplan over 14 years ago

Eric Davis wrote:

Thanks. Can you add some tests to the patch?

Sure. Might take a few days though, got busy.

Actions #4

Updated by Adam Kaplan over 14 years ago

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.

Actions #5

Updated by Adam Kaplan over 14 years ago

Eric, I've added some tests for the new API.

Actions #6

Updated by Jean-Philippe Lang about 14 years ago

  • Status changed from New to Closed

API for Users added in r4453.

Actions

Also available in: Atom PDF