Improve namespaces and users API

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Initial description take from gitlab-ce!16308:

We should improve API for namespaces and users management:

  1. Present user_id with namespace's details, when namespace is of kind user. 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).

  2. 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.

  3. Allows to use username as the replacement of ID when using users API. Currently we could do - for example - GET /api/v4/users/USERNAME_OR_ID/projects but we couldn't do GET /api/v4/users/USERNAME_OR_ID but only GET /api/v4/users/ID. This makes API inconsistent.

These three problems were found when working on https://gitlab.com/gitlab-org/ci-cd/ops-helper

Edited Sep 28, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading