Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0661826b
Commit
0661826b
authored
Jan 11, 2019
by
Evan Read
Committed by
Achilleas Pipinellis
Jan 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more information and refactor format of topic
parent
48597497
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
20 deletions
+36
-20
doc/api/applications.md
doc/api/applications.md
+30
-17
doc/integration/oauth_provider.md
doc/integration/oauth_provider.md
+6
-3
No files found.
doc/api/applications.md
View file @
0661826b
# Applications API
# Applications API
> [Introduced]
[ce-8160] in GitLab 10.5
> [Introduced]
(https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8160) in GitLab 10.5.
[
ce-8160
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8160
Applications API operates on OAuth applications for:
Only admin user can use the Applications API.
-
[
Using GitLab as an authentication provider
](
../integration/oauth_provider.md
)
.
-
[
Allowing access to GitLab resources on a user's behalf
](
oauth2.md
)
.
## Create a application
NOTE:
**Note:**
Only admin users can use the Applications API.
Create a application by posting a JSON payload.
## Create an application
Create an application by posting a JSON payload.
Returns
`200`
if the request succeeds.
Returns
`200`
if the request succeeds.
```
```
text
POST /applications
POST /applications
```
```
Parameters:
| Attribute | Type | Required | Description |
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
|:---------------|:-------|:---------|:---------------------------------|
|
`name`
| string | yes | The name of the application |
|
`name`
| string | yes | Name of the application. |
|
`redirect_uri`
| string | yes | The redirect URI of the application |
|
`redirect_uri`
| string | yes | Redirect URI of the application. |
|
`scopes`
| string | yes | The scopes of the application |
|
`scopes`
| string | yes | Scopes of the application. |
Example request:
```
ba
sh
```
sh
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
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
```
```
...
@@ -42,11 +50,13 @@ Example response:
...
@@ -42,11 +50,13 @@ Example response:
List all registered applications.
List all registered applications.
```
```
text
GET /applications
GET /applications
```
```
```
bash
Example request:
```
sh
curl
--request
GET
--header
"PRIVATE-TOKEN: <your_access_token>"
https://gitlab.example.com/api/v4/applications
curl
--request
GET
--header
"PRIVATE-TOKEN: <your_access_token>"
https://gitlab.example.com/api/v4/applications
```
```
...
@@ -63,7 +73,8 @@ Example response:
...
@@ -63,7 +73,8 @@ Example response:
]
]
```
```
> Note: the `secret` value will not be exposed by this API.
NOTE:
**Note:**
The
`secret`
value will not be exposed by this API.
## Delete an application
## Delete an application
...
@@ -71,7 +82,7 @@ Delete a specific application.
...
@@ -71,7 +82,7 @@ Delete a specific application.
Returns
`204`
if the request succeeds.
Returns
`204`
if the request succeeds.
```
```
text
DELETE /applications/:id
DELETE /applications/:id
```
```
...
@@ -79,6 +90,8 @@ Parameters:
...
@@ -79,6 +90,8 @@ Parameters:
-
`id`
(required) - The id of the application (not the application_id)
-
`id`
(required) - The id of the application (not the application_id)
```
bash
Example request:
```
sh
curl
--request
DELETE
--header
"PRIVATE-TOKEN: <your_access_token>"
https://gitlab.example.com/api/v4/applications/:id
curl
--request
DELETE
--header
"PRIVATE-TOKEN: <your_access_token>"
https://gitlab.example.com/api/v4/applications/:id
```
```
doc/integration/oauth_provider.md
View file @
0661826b
...
@@ -3,8 +3,11 @@
...
@@ -3,8 +3,11 @@
This document is about using GitLab as an OAuth authentication service provider
This document is about using GitLab as an OAuth authentication service provider
to sign in to other services.
to sign in to other services.
If you want to use other OAuth authentication service providers to sign in to
If you want to use:
GitLab, please see the
[
OAuth2 client documentation
](
../api/oauth2.md
)
.
-
Other OAuth authentication service providers to sign in to
GitLab, see the
[
OAuth2 client documentation
](
omniauth.md
)
.
-
The related API, see
[
Applications API
](
../api/applications.md
)
.
## Introduction to OAuth
## Introduction to OAuth
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment