API to update Service Accounts

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Background

We have Update Service Account in UI (#393234 - closed) to add support for updating a service account in the UI. This issue is for the same support in the API.

Acceptance Criteria

  1. An API endpoint is created to update Service Account details.
  2. The API allows updating the following Service Account attributes:
    • Name
    • Description
    • Email address
    • Secondary email address
    • PAT
    • Expiration Date
  3. The API requires appropriate authentication and authorization to perform updates.
  4. Only users with the necessary permissions can successfully use the API to update Service Accounts.
  5. The API returns appropriate success or error responses with relevant HTTP status codes.
  6. Updates to Service Accounts via the API are properly logged for audit purposes.
  7. The API handles invalid input gracefully, providing clear error messages.
  8. Updates made through the API are immediately reflected in the GitLab UI.
  9. The API documentation is updated to include this new endpoint and its usage.
  10. Rate limiting is applied to prevent abuse of the API.
  11. The API supports both JSON and URL-encoded request formats.
Edited by 🤖 GitLab Bot 🤖