Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,761
    • Issues 44,761
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,329
    • Merge requests 1,329
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • 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)

Edited Jan 16, 2020 by Patrick Deuley
Assignee
Assign to
Time tracking