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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
4671cb78
Commit
4671cb78
authored
Nov 02, 2018
by
Evan Read
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add API topic template
parent
2268ddc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
doc/development/documentation/styleguide.md
doc/development/documentation/styleguide.md
+35
-0
No files found.
doc/development/documentation/styleguide.md
View file @
4671cb78
...
...
@@ -588,6 +588,41 @@ on this document. Further explanation is given below.
-
Every method must have a cURL example.
-
Every method must have a response body (in JSON format).
### API topic template
The following can be used as a template to get started:
```
md
## Descriptive title
One or two sentence description of what endpoint does.
```
METHOD /endpoint
```
| Attribute | Type | Required | Description |
|:------------|:---------|:---------|:----------------------|
| `attribute` | datatype | yes/no | Detailed description. |
| `attribute` | datatype | yes/no | Detailed description. |
Example request:
```
sh
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/endpoint?parameters'
```
Example response:
```
json
[
{
}
]
```
```
### Fake tokens
There may be times where a token is needed to demonstrate an API call using
...
...
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