Add full_path_search parameter to namespaces API

What does this MR do and why?

This MR adds a full_path_search parameter to the Namespaces REST API. When enabled, the search filter would be used to filter the results by their full path. It returns namespaces with fullpath that contains the search query.

  • Default behavior (unchanged): ?search=bar returns ["/bar", "/foo/bar"]
  • New behavior: ?search=bar&full_path_search=true returns ["/bar", "/foo/bar", "/bar/fuzz", "/foo/bar/baz"]

References

Screenshots or screen recordings

full_path_search=true full_path_search=false
image image
image image

UI from: #541501 (closed)

Screen_Recording_2025-06-25_at_6.59.21_PM

How to set up and validate locally

  1. Create a group with the path /foo
  2. Create a subgroup with the path /foo/bar
  3. Send an HTTP request to /api/v4/namespaces
    • ?search=foo/bar&full_path_search=false should return an empty result
    • ?search=foo/bar&full_path_search=true should return the /foo/bar group.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #551089 (closed)

Edited by Shane Maglangit

Merge request reports

Loading