Add Group Service Accounts API
What does this MR do and why?
Describe in detail what your merge request does and why.
Fixes #407775 (closed)
Add new API endpoint to create service accounts within a group.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Create a group and ensure your test user is an owner.
- Create a Personal Access Token with
api
scope. - Test the API via a terminal:
curl -XPOST "https://gdk.test:3443/api/v4/groups/<group_id>/service_accounts?access_token=your_test_token"
- Observe the API returns a response like:
{"id":57,"username":"service_account_group_33_6018816a18e515214e0c34c2b33523fc","name":"Service account user","state":"active","avatar_url":"...","web_url":"https://gdk.test:3443/service_account_group_33_6018816a18e515214e0c34c2b33523fc"
Optionally call the API again with a non-existent group ID (returns 404 not found), or with an access token for a user that's not an owner in the group (returns forbidden).
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Drew Blessing