Skip to content

API for listing all service account users

Smriti Garg requested to merge smriti-416729/list_api_service_account_users into master

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

  1. Create a few service account users for group and for instance using instructions here - https://docs.gitlab.com/ee/user/profile/service_accounts.html

  2. Test both apis by curl call

    1. 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"
    1. Observe for instance level service account api a non-admin token wont work.
    2. Observe for group level service accounts api a non-group owner token wont work

Merge request reports