Skip to content

Ability to create application from the API

Description

Currently, it doesn't seem to be a way to create a Gitlab Application via the Gitlab API. Is there a reason for it ?

For instance, I'd like to create an application to allow Jenkins to use Gitlab as an SSO provider. I can do that by going to Gitlab Settings > Applications > Create New. Then I have to provide a name, and a URL. When created, I get an "Application Id" and a "secret" I have to use on the Jenkins' side.

I would like to be able to do that by the Gitlab REST API.

Proposal

I'm thinking of something like:

POST /applications

With the following content

{
    "name": "A name",
    "redirect-uri": "http://..."
}

And of course, the security parameters / headers around it. The answer would be something like:

{
    "application-id": "<a generated id>",
    "secret": "<a generated secret>",
    "callback-url": "<the provided URI>"
}

Links / references