API for listing all service account users
What does this MR do and why?
Solves #416729 (closed)
API for listing all service account users
With this MR we introducing two new API endpoints for listing all service account users at group level and instance level
Changelog: added
How to set up and validate locally
-
Create a few service account users for group and for instance using instructions here - https://docs.gitlab.com/ee/user/profile/service_accounts.html
-
Test both apis by
curl
call-
for Group service accounts
curl --request GET --header "PRIVATE-TOKEN: <token>" "https://gdk.test:3443/api/v4/groups/33/service_accounts?order_by=username"
fir listing all service account users for an instance token has to
curl --request GET --header "PRIVATE-TOKEN: <token>" "https://gdk.test:3443/api/v4/service_accounts"
- Observe for
instance level service account api
a non-admin token wont work. - Observe for
group level service accounts api
a non-group owner token wont work
-