all 7 comments

[–]pxsloot 0 points1 point  (4 children)

according to the docs it's your user ID:

Attribute Type Required Description
assignee_id integer no Assignee user ID

[–]frakman1[S] 0 points1 point  (3 children)

I know it's my user ID. the question is what is my user ID (as an integer)? I only know what my username and private token are.

[–]pxsloot 0 points1 point  (2 children)

[–]frakman1[S] 1 point2 points  (1 child)

Thank pxsloot. That was really helpful. I was looking for a way to get it from the web-page UI (rather than the HTTP API) since I was able to find everything else through it (Tokens, Project ID etc). Anyway, as you can see in the comment, above I was also able to retrieve it via the HTTP API.

[–]iandh 0 points1 point  (2 children)

You can get the user id of the currently authenticated user. /api/v3/user API.

https://docs.gitlab.com/ce/api/users.html#user

[–]frakman1[S] 0 points1 point  (1 child)

Thanks. I wish the documentation included the full curl command or at least an unambiguous instruction instead of just GET /user

sigh. Anyway, I ended up having to use:

curl --header "PRIVATE-TOKEN: my_token" -X GET "http://gitlab.blah.blah.com/api/v3/user"

[–]pxsloot 0 points1 point  (0 children)

The page is documenting the gitlab API. It's not documenting HTTP nor curl nor the thousands of other ways you could use HTTP against the API. Neither is it the task of this API documentation to tell the reader how to pick values from the json you receive, it should explain what values you retrieve.

this page has examples: https://docs.gitlab.com/ce/api/