API GET users/me endpoint should return ID as well (OD-2687)
Davide Beatrici opened 1 day ago

Right now the response is like this:

{
    "disabled" : true,
    "type" : "ORDINARY",
    "name" : "string",
    "fullName" : "string",
    "notifyOwnEvents" : true
}

This is because the method is almost identical to the one backing /users/{userId}:

https://code.onedev.io/onedev/server/~files/1d89b28896e4b46bfb35e2c8e57010a2c761a62a/server-core/src/main/java/io/onedev/server/rest/resource/UserResource.java?position=source-103-132

An API user that wants to get its own ID has to use the /users/ids/{name} endpoint with the name provided by the users/me one.

I believe we should, instead, include the ID in the response that is sent by the users/me endpoint. Maybe the /users/{userId} one as well.

issue 1/1
Type
Improvement
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-2687
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover