Improve namespaces and users api
What does this MR do?
Improves API for namespaces and users management.
Are there points in the code the reviewer needs to double check?
Should be merged together with gitlab-ee!4628.
Why was this MR needed?
This MR adds three changes:
-
Present
user_id
with namespace's details, when namespace is of kinduser
. While using API I found that the first thing I do after checking information about namespace is to find the user ID related to this namespace (by running another request to users API). -
Allows to list projects of selected namespace. Currently we can find namespace by
id
but there is no API that would list all projects of given namespace. -
Allows to use
username
as the replacement ofID
when using users API. Currently we could do - for example -GET /api/v4/users/USERNAME_OR_ID/projects
but we couldn't doGET /api/v4/users/USERNAME_OR_ID
but onlyGET /api/v4/users/ID
. This makes API inconsistent.
The MR adds also some improvements and fixes for problems in tests for users API, that I found during work on the three additions described above.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered
What are the relevant issue numbers?
Closes #62547 (moved)