Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 49,892
    • Issues 49,892
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,564
    • Merge requests 1,564
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #20532
Closed
Open
Issue created Dec 29, 2017 by Adam Mulvany@amulvanyDeveloper

API response for all projects a user has access to

Description

Premium customer would like to retrieve the data from GET admin/users/<user>/projects via the API.

They would also like the access level to be displayed.

Proposal

As proposed by @Andysoiron, we will add a new endpoint that returns all membership information that takes a variable (type) which can scope it to specific membership types.

GET user/:id/memberships

[
  {
    "source_id": "1111",
    "source_name": "EXAMPLE PROJECT",
    "source_type": "Project"
    "access_level": "PROJECT ACCESS LEVEL"
  },
  {
    "source_id": "123",
    "source_name": "EXAMPLE Group",
    "source_type": "Namespace"
    "access_level": "GROUP ACCESS LEVEL"
  }
[

user/:id/memberships?type=Project would only return project memberships and user/:id/memberships?type=Namespace would return only group memberships.

Links / references

ZD: https://gitlab.zendesk.com/agent/tickets/88949 (Internal only)

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited Nov 22, 2022 by 🤖 GitLab Bot 🤖
Assignee
Assign to
Time tracking