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
5d1b616e
Commit
5d1b616e
authored
Sep 19, 2016
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update API documentation to mention rails session cookies
[ci skip]
parent
48d563a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
doc/api/README.md
doc/api/README.md
+12
-4
No files found.
doc/api/README.md
View file @
5d1b616e
...
...
@@ -55,11 +55,12 @@ The following documentation is for the [internal CI API](ci/README.md):
## Authentication
All API requests require authentication via a token. There are three types of tokens
available: private tokens, OAuth 2 tokens, and personal access tokens.
All API requests require authentication via a session cookie or token. There are
three types of tokens available: private tokens, OAuth 2 tokens, and personal
access tokens.
If a
token is invalid or omitted, an error message will be returned with
status code
`401`
:
If a
uthentication information is invalid or omitted, an error message will be
returned with
status code
`401`
:
```
json
{
...
...
@@ -98,6 +99,13 @@ that needs access to the GitLab API.
Once you have your token, pass it to the API using either the
`private_token`
parameter or the
`PRIVATE-TOKEN`
header.
### Session cookie
When signing in to GitLab as an ordinary user, a
`_gitlab_session`
cookie is
set. The API will use this cookie for authentication if it is present, but using
the API to generate a new session cookie is currently not supported.
## Basic Usage
API requests should be prefixed with
`api`
and the API version. The API version
...
...
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