Skip to content

Provide API to adjust service templates

Problem to solve

As a GitLab administrator, I want an API endpoint for service templates (/admin/application_settings/services), so I can automate the process of adjusting them.

Intended users

User experience goal

The user should be able to use the GitLab-API to change all service template related settings.

Proposal

  1. We need to decide on the namespace. The /application/settings endpoint exists, but it is for /admin/application_settings/general. Would it make sense to provide /application/settings/services for /admin/application_settings/services? Or would a completely new namespace be better, like /services?
  2. We need an endpoint to list available service integrations since they are referenced by an ID, f.e. Jira is 19.
  3. We need an endpoint to retrieve the current settings of a service template by its ID.
  4. The same endpoint should be able to update its settings.

Further details

The services of single projects already have an API: https://docs.gitlab.com/ee/api/services.html We can probably re-use that.

My current use case is that I have a global service where a password is set in the GitLab service template. Due to an internal policy that password needs to be changed on a regular basis. It can be generated and changed automatically for the service itself, but the GitLab service template can't be adjusted without manual actions (navigating the frontend).

Permissions and Security

The personal access token created to use the new API endpoint should require the sudo scope.