Commit 4cd999d6 authored by Craig Norris's avatar Craig Norris Committed by Suzanne Selhorn

Update API guide for inline tier badge info

parent e0658ad4
--- ---
type: reference, dev info: For assistance with this Style Guide page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments-to-other-projects-and-subjects.
stage: none description: 'Writing styles, markup, formatting, and other standards for the GitLab RESTful APIs.'
group: Development
info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments-to-development-guidelines"
description: "Writing styles, markup, formatting, and other standards for the GitLab RESTful APIs."
--- ---
# RESTful API # RESTful API
...@@ -30,6 +27,10 @@ In the Markdown doc for a resource (AKA endpoint): ...@@ -30,6 +27,10 @@ In the Markdown doc for a resource (AKA endpoint):
- Every method must have a detailed [description of the parameters](#method-description). - Every method must have a detailed [description of the parameters](#method-description).
- Every method must have a cURL example. - Every method must have a cURL example.
- Every method must have a response body (in JSON format). - Every method must have a response body (in JSON format).
- If an attribute is available only to higher level tiers than the other
parameters, add the appropriate inline [tier badge](styleguide/index.md#product-tier-badges).
Put the badge in the **Attribute** column, like the
`**(<tier>)**` code in the following template.
## API topic template ## API topic template
...@@ -49,12 +50,12 @@ METHOD /endpoint ...@@ -49,12 +50,12 @@ 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` **(<tier>)** | 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. | | `attribute` | datatype | **{dotted-circle}** No | Detailed description. |
Example request: Example request:
...@@ -83,20 +84,20 @@ always be in code blocks using backticks (`` ` ``). ...@@ -83,20 +84,20 @@ always be in code blocks using backticks (`` ` ``).
Sort the attributes in the table: first, required, then alphabetically. 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. | | `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. | | `assignee_ids` **(PREMIUM)** | 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`. | | `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 | **{check-circle}** 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. | | `assignee_ids` **(PREMIUM)** | 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`. | | `confidential` | boolean | **{dotted-circle}** No | Set an issue to be confidential. Default is `false`. |
## cURL commands ## cURL commands
...@@ -109,7 +110,7 @@ Rendered example: ...@@ -109,7 +110,7 @@ Rendered example:
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 |
......
...@@ -1806,7 +1806,9 @@ after the heading text. For example: ...@@ -1806,7 +1806,9 @@ after the heading text. For example:
# Heading title **(FREE)** # Heading title **(FREE)**
``` ```
Do not add tier badges inline with other text. The single source of truth for a feature should be the heading where the functionality is described. Do not add tier badges inline with other text, except for [API attributes](../restful_api_styleguide.md).
The single source of truth for a feature should be the heading where the
functionality is described.
#### Available product tier badges #### Available product tier badges
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment