Search code examples
gitlabgitlab-api

gitlab api: how to retrieve userId of current user


I'd like to have a individually callable url to see issues in gitlab for a specific user.

How can I retrieve the currently logged in user?

https://server/folder/project/issues?scope=all&state=opened&assignee_id=<how to get this id>

or

https://server/folder/project/issues?scope=all&state=opened&assignee_username=<how to get this name>

Edit:

Solved with scope=assigned_to_me
https://server/folder/project/issues?scope=assigned_to_me&state=opened


Solution

  • List current user: Gets currently authenticated user.

    GET /user
    

    example: https://gitlab.example.org/api/v4/user.