diff options
author | Nicolas MERELLI <nicolas.merelli@gmail.com> | 2017-01-05 01:07:49 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2018-01-24 11:42:04 +0300 |
commit | 81bbcfacb0adfa32b15b044bfb997aca7bed69fb (patch) | |
tree | 27143690fa7a6390185a7f465122b768581ba95e /doc/api | |
parent | 74da79113bb2eb7363403d7c2a9f1e0624590b74 (diff) |
Add application create API
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/applications.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/api/applications.md b/doc/api/applications.md new file mode 100644 index 00000000000..637e52f2b57 --- /dev/null +++ b/doc/api/applications.md @@ -0,0 +1,33 @@ +# Applications API + +## Create a application + +Create a application by posting a JSON payload. + +User must be admin to do that. + +Returns `200` if the request succeeds. + +``` +POST /applications +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `name` | string | yes | The name of the application | +| `redirect_uri` | string | yes | The redirect URI of the application | +| `scopes` | string | yes | The scopes of the application | + +```bash +curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "name=MyApplication&redirect_uri=http://redirect.uri&scopes=" https://gitlab.example.com/api/v3/applications +``` + +Example response: + +```json +{ + "application_id": "5832fc6e14300a0d962240a8144466eef4ee93ef0d218477e55f11cf12fc3737", + "secret": "ee1dd64b6adc89cf7e2c23099301ccc2c61b441064e9324d963c46902a85ec34", + "callback_url": "http://redirect.uri" +} +``` |