Skip to content

Add REST API invited groups in a project

Shubham Kumar requested to merge invited-grops-to-projects into master

What does this MR do and why?

Implement projects REST API to return the equivalent of https://gitlab.com/groups/project/\\\<full path\\\>/-/project_members?tab=groups.

  • Invited groups in a project: /projects/:id/invited_groups
  • Ensure API is rate limited
  • Update docs
  • Add query plans to the MR description

Note: If the request is unauthenticated and the endpoint could be accessed without authentication and not already rate-limited then the endpoint will be rate-limited by IP and it will have the same value as for the rate-limiting by the user.

Endpoint Rate limit per user
GET /api/v4/projects/:id/invited_groups 60 requests per minute

Closes #465207 (closed)

Query Plans

MR acceptance checklist

curl -X GET 'http://localhost:3000/api/v4/projects/19/invited_groups'
[
  {
    "id": 35,
    "web_url": "http://127.0.0.1:3000/groups/twitter",
    "name": "Twitter",
    "avatar_url": null,
    "full_name": "Twitter",
    "full_path": "twitter"
  },
  {
    "id": 33,
    "web_url": "http://127.0.0.1:3000/groups/flightjs",
    "name": "Flightjs",
    "avatar_url": null,
    "full_name": "Flightjs",
    "full_path": "flightjs"
  },
  {
    "id": 31,
    "web_url": "http://127.0.0.1:3000/groups/jashkenas",
    "name": "Jashkenas",
    "avatar_url": null,
    "full_name": "Jashkenas",
    "full_path": "jashkenas"
  },
  {
    "id": 24,
    "web_url": "http://127.0.0.1:3000/groups/gitlab-org",
    "name": "Gitlab Org",
    "avatar_url": null,
    "full_name": "Gitlab Org",
    "full_path": "gitlab-org"
  },
  {
    "id": 22,
    "web_url": "http://127.0.0.1:3000/groups/toolbox",
    "name": "Toolbox",
    "avatar_url": null,
    "full_name": "Toolbox",
    "full_path": "toolbox"
  }
]

Screenshot_2024-08-13_at_16.13.34

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Shubham Kumar

Merge request reports

Loading