Skip to content

Commit 0661826

Browse files
ereadaxilleas
authored andcommitted
Add more information and refactor format of topic
1 parent 4859749 commit 0661826

File tree

2 files changed

+36
-20
lines changed

2 files changed

+36
-20
lines changed

doc/api/applications.md

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
11
# Applications API
22

3-
> [Introduced][ce-8160] in GitLab 10.5
3+
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8160) in GitLab 10.5.
44
5-
[ce-8160]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8160
5+
Applications API operates on OAuth applications for:
66

7-
Only admin user can use the Applications API.
7+
- [Using GitLab as an authentication provider](../integration/oauth_provider.md).
8+
- [Allowing access to GitLab resources on a user's behalf](oauth2.md).
89

9-
## Create a application
10+
NOTE: **Note:**
11+
Only admin users can use the Applications API.
1012

11-
Create a application by posting a JSON payload.
13+
## Create an application
14+
15+
Create an application by posting a JSON payload.
1216

1317
Returns `200` if the request succeeds.
1418

15-
```
19+
```text
1620
POST /applications
1721
```
1822

19-
| Attribute | Type | Required | Description |
20-
| --------- | ---- | -------- | ----------- |
21-
| `name` | string | yes | The name of the application |
22-
| `redirect_uri` | string | yes | The redirect URI of the application |
23-
| `scopes` | string | yes | The scopes of the application |
23+
Parameters:
24+
25+
| Attribute | Type | Required | Description |
26+
|:---------------|:-------|:---------|:---------------------------------|
27+
| `name` | string | yes | Name of the application. |
28+
| `redirect_uri` | string | yes | Redirect URI of the application. |
29+
| `scopes` | string | yes | Scopes of the application. |
30+
31+
Example request:
2432

25-
```bash
33+
```sh
2634
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --data "name=MyApplication&redirect_uri=http://redirect.uri&scopes=" https://gitlab.example.com/api/v4/applications
2735
```
2836

@@ -42,11 +50,13 @@ Example response:
4250

4351
List all registered applications.
4452

45-
```
53+
```text
4654
GET /applications
4755
```
4856

49-
```bash
57+
Example request:
58+
59+
```sh
5060
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/applications
5161
```
5262

@@ -63,22 +73,25 @@ Example response:
6373
]
6474
```
6575

66-
> Note: the `secret` value will not be exposed by this API.
76+
NOTE: **Note:**
77+
The `secret` value will not be exposed by this API.
6778

6879
## Delete an application
6980

7081
Delete a specific application.
7182

7283
Returns `204` if the request succeeds.
7384

74-
```
85+
```text
7586
DELETE /applications/:id
7687
```
7788

7889
Parameters:
7990

8091
- `id` (required) - The id of the application (not the application_id)
8192

82-
```bash
93+
Example request:
94+
95+
```sh
8396
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/applications/:id
8497
```

doc/integration/oauth_provider.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
This document is about using GitLab as an OAuth authentication service provider
44
to sign in to other services.
55

6-
If you want to use other OAuth authentication service providers to sign in to
7-
GitLab, please see the [OAuth2 client documentation](../api/oauth2.md).
6+
If you want to use:
7+
8+
- Other OAuth authentication service providers to sign in to
9+
GitLab, see the [OAuth2 client documentation](omniauth.md).
10+
- The related API, see [Applications API](../api/applications.md).
811

912
## Introduction to OAuth
1013

@@ -28,7 +31,7 @@ GitLab supports two ways of adding a new OAuth2 application to an instance. You
2831
can either add an application as a regular user or add it in the admin area.
2932
What this means is that GitLab can actually have instance-wide and a user-wide
3033
applications. There is no difference between them except for the different
31-
permission levels they are set (user/admin). The default callback URL is
34+
permission levels they are set (user/admin). The default callback URL is
3235
`http://your-gitlab.example.com/users/auth/gitlab/callback`
3336

3437
## Adding an application through the profile

0 commit comments

Comments
 (0)