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
33ac1bbb
Commit
33ac1bbb
authored
Nov 09, 2021
by
Marcin Sedlak-Jakubowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update sorting guidance in API doc template
parent
a22649d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
doc/development/documentation/restful_api_styleguide.md
doc/development/documentation/restful_api_styleguide.md
+19
-12
No files found.
doc/development/documentation/restful_api_styleguide.md
View file @
33ac1bbb
...
@@ -49,8 +49,8 @@ METHOD /endpoint
...
@@ -49,8 +49,8 @@ METHOD /endpoint
Supported attributes:
Supported attributes:
| Attribute | Type | Required | Description |
| Attribute | Type | Required
| Description |
|
:------------|:---------|:---------|:----------------------
|
|
:---------- | :------- | :--------------------- | :--------------------
|
|
`attribute`
| datatype |
**{check-circle}**
Yes | Detailed description. |
|
`attribute`
| datatype |
**{check-circle}**
Yes | Detailed description. |
|
`attribute`
| datatype |
**{dotted-circle}**
No | Detailed description. |
|
`attribute`
| datatype |
**{dotted-circle}**
No | Detailed description. |
|
`attribute`
| datatype |
**{dotted-circle}**
No | Detailed description. |
|
`attribute`
| datatype |
**{dotted-circle}**
No | Detailed description. |
...
@@ -80,16 +80,23 @@ to describe the GitLab release that introduced the API call.
...
@@ -80,16 +80,23 @@ to describe the GitLab release that introduced the API call.
Use the following table headers to describe the methods. Attributes should
Use the following table headers to describe the methods. Attributes should
always be in code blocks using backticks (
`` ` ``
).
always be in code blocks using backticks (
`` ` ``
).
Sort the attributes in the table: first, required, then alphabetically.
```
markdown
```
markdown
| Attribute | Type | Required | Description |
| Attribute | Type | Required | Description |
|:----------|:-----|:---------|:------------|
| :------------- | :------------ | :--------------------- | :--------------------------------------------------- |
|
`user`
| string |
**{check-circle}**
Yes | The GitLab username. |
|
`assignee_ids`
| integer array |
**{dotted-circle}**
No | The IDs of the users to assign the issue to. |
|
`confidential`
| boolean |
**{dotted-circle}**
No | Set an issue to be confidential. Default is
`false`
. |
```
```
Rendered example:
Rendered example:
| Attribute | Type | Required | Description |
| Attribute | Type | Required | Description |
|:----------|:-------|:---------|:--------------------|
| :------------- | :------------ | :--------------------- | :--------------------------------------------------- |
|
`user`
| string | yes | The GitLab username. |
|
`user`
| string |
**{check-circle}**
Yes | The GitLab username. |
|
`assignee_ids`
| integer array |
**{dotted-circle}**
No | The IDs of the users to assign the issue to. |
|
`confidential`
| boolean |
**{dotted-circle}**
No | Set an issue to be confidential. Default is
`false`
. |
## cURL commands
## cURL commands
...
@@ -101,12 +108,12 @@ Rendered example:
...
@@ -101,12 +108,12 @@ Rendered example:
-
Prefer to use examples using the personal access token and don't pass data of
-
Prefer to use examples using the personal access token and don't pass data of
username and password.
username and password.
| Methods | Description |
| Methods | Description
|
|
:------------------------------------------- |:------------------------------------------------------
|
|
:---------------------------------------------- | :-----------------------------------------------------
|
|
`--header "PRIVATE-TOKEN: <your_access_token>"`
| Use this method as is, whenever authentication needed. |
|
`--header "PRIVATE-TOKEN: <your_access_token>"`
| Use this method as is, whenever authentication needed. |
|
`--request POST`
| Use this method when creating new objects |
|
`--request POST`
| Use this method when creating new objects
|
|
`--request PUT`
| Use this method when updating existing objects |
|
`--request PUT`
| Use this method when updating existing objects
|
|
`--request DELETE`
| Use this method when removing existing objects |
|
`--request DELETE`
| Use this method when removing existing objects
|
## cURL Examples
## cURL Examples
...
...
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