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
2fd4b53d
Commit
2fd4b53d
authored
Sep 02, 2020
by
Jonston Chan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix inconsistent capitalization of "PRIVATE-TOKEN"
parent
f7d08041
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
doc/api/README.md
doc/api/README.md
+5
-5
No files found.
doc/api/README.md
View file @
2fd4b53d
...
@@ -123,7 +123,7 @@ Read more about [GitLab as an OAuth2 provider](oauth2.md).
...
@@ -123,7 +123,7 @@ Read more about [GitLab as an OAuth2 provider](oauth2.md).
### Personal/project access tokens
### Personal/project access tokens
Access tokens can be used to authenticate with the API by passing it in either the
`private_token`
parameter
Access tokens can be used to authenticate with the API by passing it in either the
`private_token`
parameter
or the
`P
rivate-Token
`
header.
or the
`P
RIVATE-TOKEN
`
header.
Example of using the personal/project access token in a parameter:
Example of using the personal/project access token in a parameter:
...
@@ -134,7 +134,7 @@ curl "https://gitlab.example.com/api/v4/projects?private_token=<your_access_toke
...
@@ -134,7 +134,7 @@ curl "https://gitlab.example.com/api/v4/projects?private_token=<your_access_toke
Example of using the personal/project access token in a header:
Example of using the personal/project access token in a header:
```
shell
```
shell
curl
--header
"P
rivate-Token
: <your_access_token>"
"https://gitlab.example.com/api/v4/projects"
curl
--header
"P
RIVATE-TOKEN
: <your_access_token>"
"https://gitlab.example.com/api/v4/projects"
```
```
You can also use personal/project access tokens with OAuth-compliant headers:
You can also use personal/project access tokens with OAuth-compliant headers:
...
@@ -178,7 +178,7 @@ For more information, refer to the
...
@@ -178,7 +178,7 @@ For more information, refer to the
[
users API
](
users.md#create-an-impersonation-token
)
docs.
[
users API
](
users.md#create-an-impersonation-token
)
docs.
Impersonation tokens are used exactly like regular personal access tokens, and can be passed in either the
Impersonation tokens are used exactly like regular personal access tokens, and can be passed in either the
`private_token`
parameter or the
`P
rivate-Token
`
header.
`private_token`
parameter or the
`P
RIVATE-TOKEN
`
header.
#### Disable impersonation
#### Disable impersonation
...
@@ -266,7 +266,7 @@ GET /projects?private_token=<your_access_token>&sudo=username
...
@@ -266,7 +266,7 @@ GET /projects?private_token=<your_access_token>&sudo=username
```
```
```
shell
```
shell
curl
--header
"P
rivate-Token
: <your_access_token>"
--header
"Sudo: username"
"https://gitlab.example.com/api/v4/projects"
curl
--header
"P
RIVATE-TOKEN
: <your_access_token>"
--header
"Sudo: username"
"https://gitlab.example.com/api/v4/projects"
```
```
Example of a valid API call and a request using cURL with sudo request,
Example of a valid API call and a request using cURL with sudo request,
...
@@ -277,7 +277,7 @@ GET /projects?private_token=<your_access_token>&sudo=23
...
@@ -277,7 +277,7 @@ GET /projects?private_token=<your_access_token>&sudo=23
```
```
```
shell
```
shell
curl
--header
"P
rivate-Token
: <your_access_token>"
--header
"Sudo: 23"
"https://gitlab.example.com/api/v4/projects"
curl
--header
"P
RIVATE-TOKEN
: <your_access_token>"
--header
"Sudo: 23"
"https://gitlab.example.com/api/v4/projects"
```
```
## Status codes
## Status codes
...
...
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