Commit a81dda45 authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'docs-aqualls-api-codeblocks' into 'master'

Add language declarations to code blocks

See merge request gitlab-org/gitlab!26203
parents 34393d6a bf402238
...@@ -355,7 +355,7 @@ curl --head --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example ...@@ -355,7 +355,7 @@ curl --head --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example
The response will then be: The response will then be:
``` ```http
HTTP/1.1 200 OK HTTP/1.1 200 OK
Cache-Control: no-cache Cache-Control: no-cache
Content-Length: 1103 Content-Length: 1103
...@@ -415,7 +415,7 @@ curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab ...@@ -415,7 +415,7 @@ curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab
The response header includes a link to the next page. For example: The response header includes a link to the next page. For example:
``` ```http
HTTP/1.1 200 OK HTTP/1.1 200 OK
... ...
Link: <https://gitlab.example.com/api/v4/projects?pagination=keyset&per_page=50&order_by=id&sort=asc&id_after=42>; rel="next" Link: <https://gitlab.example.com/api/v4/projects?pagination=keyset&per_page=50&order_by=id&sort=asc&id_after=42>; rel="next"
...@@ -540,7 +540,7 @@ Such errors appear in two cases: ...@@ -540,7 +540,7 @@ Such errors appear in two cases:
When an attribute is missing, you will get something like: When an attribute is missing, you will get something like:
``` ```http
HTTP/1.1 400 Bad Request HTTP/1.1 400 Bad Request
Content-Type: application/json Content-Type: application/json
{ {
...@@ -551,7 +551,7 @@ Content-Type: application/json ...@@ -551,7 +551,7 @@ Content-Type: application/json
When a validation error occurs, error messages will be different. They will When a validation error occurs, error messages will be different. They will
hold all details of validation errors: hold all details of validation errors:
``` ```http
HTTP/1.1 400 Bad Request HTTP/1.1 400 Bad Request
Content-Type: application/json Content-Type: application/json
{ {
...@@ -589,7 +589,7 @@ follows: ...@@ -589,7 +589,7 @@ follows:
When you try to access an API URL that does not exist you will receive 404 Not Found. When you try to access an API URL that does not exist you will receive 404 Not Found.
``` ```http
HTTP/1.1 404 Not Found HTTP/1.1 404 Not Found
Content-Type: application/json Content-Type: application/json
{ {
......
...@@ -6,7 +6,7 @@ You can read more about [triggering pipelines through the API](../ci/triggers/RE ...@@ -6,7 +6,7 @@ You can read more about [triggering pipelines through the API](../ci/triggers/RE
Get a list of project's build triggers. Get a list of project's build triggers.
``` ```plaintext
GET /projects/:id/triggers GET /projects/:id/triggers
``` ```
...@@ -14,7 +14,7 @@ GET /projects/:id/triggers ...@@ -14,7 +14,7 @@ GET /projects/:id/triggers
|-----------|---------|----------|---------------------| |-----------|---------|----------|---------------------|
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
``` ```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers"
``` ```
...@@ -36,7 +36,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a ...@@ -36,7 +36,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
Get details of project's build trigger. Get details of project's build trigger.
``` ```plaintext
GET /projects/:id/triggers/:trigger_id GET /projects/:id/triggers/:trigger_id
``` ```
...@@ -45,7 +45,7 @@ GET /projects/:id/triggers/:trigger_id ...@@ -45,7 +45,7 @@ GET /projects/:id/triggers/:trigger_id
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `trigger_id` | integer | yes | The trigger id | | `trigger_id` | integer | yes | The trigger id |
``` ```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers/5" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers/5"
``` ```
...@@ -65,7 +65,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a ...@@ -65,7 +65,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
Create a trigger for a project. Create a trigger for a project.
``` ```plaintext
POST /projects/:id/triggers POST /projects/:id/triggers
``` ```
...@@ -74,7 +74,7 @@ POST /projects/:id/triggers ...@@ -74,7 +74,7 @@ POST /projects/:id/triggers
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `description` | string | yes | The trigger name | | `description` | string | yes | The trigger name |
``` ```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form description="my description" "https://gitlab.example.com/api/v4/projects/1/triggers" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form description="my description" "https://gitlab.example.com/api/v4/projects/1/triggers"
``` ```
...@@ -94,7 +94,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form descrip ...@@ -94,7 +94,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form descrip
Update a trigger for a project. Update a trigger for a project.
``` ```plaintext
PUT /projects/:id/triggers/:trigger_id PUT /projects/:id/triggers/:trigger_id
``` ```
...@@ -104,7 +104,7 @@ PUT /projects/:id/triggers/:trigger_id ...@@ -104,7 +104,7 @@ PUT /projects/:id/triggers/:trigger_id
| `trigger_id` | integer | yes | The trigger id | | `trigger_id` | integer | yes | The trigger id |
| `description` | string | no | The trigger name | | `description` | string | no | The trigger name |
``` ```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form description="my description" "https://gitlab.example.com/api/v4/projects/1/triggers/10" curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form description="my description" "https://gitlab.example.com/api/v4/projects/1/triggers/10"
``` ```
...@@ -124,7 +124,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form descript ...@@ -124,7 +124,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form descript
Remove a project's build trigger. Remove a project's build trigger.
``` ```plaintext
DELETE /projects/:id/triggers/:trigger_id DELETE /projects/:id/triggers/:trigger_id
``` ```
...@@ -133,6 +133,6 @@ DELETE /projects/:id/triggers/:trigger_id ...@@ -133,6 +133,6 @@ DELETE /projects/:id/triggers/:trigger_id
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `trigger_id` | integer | yes | The trigger id | | `trigger_id` | integer | yes | The trigger id |
``` ```shell
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers/5" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers/5"
``` ```
...@@ -9,7 +9,7 @@ GitLab supports links links to `http`, `https`, and `ftp` assets. ...@@ -9,7 +9,7 @@ GitLab supports links links to `http`, `https`, and `ftp` assets.
Get assets as links from a Release. Get assets as links from a Release.
``` ```plaintext
GET /projects/:id/releases/:tag_name/assets/links GET /projects/:id/releases/:tag_name/assets/links
``` ```
...@@ -47,7 +47,7 @@ Example response: ...@@ -47,7 +47,7 @@ Example response:
Get an asset as a link from a Release. Get an asset as a link from a Release.
``` ```plaintext
GET /projects/:id/releases/:tag_name/assets/links/:link_id GET /projects/:id/releases/:tag_name/assets/links/:link_id
``` ```
...@@ -78,7 +78,7 @@ Example response: ...@@ -78,7 +78,7 @@ Example response:
Create an asset as a link from a Release. Create an asset as a link from a Release.
``` ```plaintext
POST /projects/:id/releases/:tag_name/assets/links POST /projects/:id/releases/:tag_name/assets/links
``` ```
...@@ -114,7 +114,7 @@ Example response: ...@@ -114,7 +114,7 @@ Example response:
Update an asset as a link from a Release. Update an asset as a link from a Release.
``` ```plaintext
PUT /projects/:id/releases/:tag_name/assets/links/:link_id PUT /projects/:id/releases/:tag_name/assets/links/:link_id
``` ```
...@@ -150,7 +150,7 @@ Example response: ...@@ -150,7 +150,7 @@ Example response:
Delete an asset as a link from a Release. Delete an asset as a link from a Release.
``` ```plaintext
DELETE /projects/:id/releases/:tag_name/assets/links/:link_id DELETE /projects/:id/releases/:tag_name/assets/links/:link_id
``` ```
......
...@@ -751,7 +751,7 @@ Search within the specified project. ...@@ -751,7 +751,7 @@ Search within the specified project.
If a user is not a member of a project and the project is private, a `GET` request on that project will result to a `404` status code. If a user is not a member of a project and the project is private, a `GET` request on that project will result to a `404` status code.
``` ```plaintext
GET /projects/:id/search GET /projects/:id/search
``` ```
......
...@@ -10,7 +10,7 @@ administrator in order to perform this action. ...@@ -10,7 +10,7 @@ administrator in order to perform this action.
List the current [application settings](#list-of-settings-that-can-be-accessed-via-api-calls) List the current [application settings](#list-of-settings-that-can-be-accessed-via-api-calls)
of the GitLab instance. of the GitLab instance.
``` ```plaintext
GET /application/settings GET /application/settings
``` ```
...@@ -90,7 +90,7 @@ the `file_template_project_id`, `deletion_adjourned_period`, or the `geo_node_al ...@@ -90,7 +90,7 @@ the `file_template_project_id`, `deletion_adjourned_period`, or the `geo_node_al
Use an API call to modify GitLab instance Use an API call to modify GitLab instance
[application settings](#list-of-settings-that-can-be-accessed-via-api-calls). [application settings](#list-of-settings-that-can-be-accessed-via-api-calls).
``` ```plaintext
PUT /application/settings PUT /application/settings
``` ```
......
...@@ -10,7 +10,7 @@ of Sidekiq, its jobs, queues, and processes. ...@@ -10,7 +10,7 @@ of Sidekiq, its jobs, queues, and processes.
List information about all the registered queues, their backlog and their List information about all the registered queues, their backlog and their
latency. latency.
``` ```plaintext
GET /sidekiq/queue_metrics GET /sidekiq/queue_metrics
``` ```
...@@ -35,7 +35,7 @@ Example response: ...@@ -35,7 +35,7 @@ Example response:
List information about all the Sidekiq workers registered to process your queues. List information about all the Sidekiq workers registered to process your queues.
``` ```plaintext
GET /sidekiq/process_metrics GET /sidekiq/process_metrics
``` ```
...@@ -77,7 +77,7 @@ Example response: ...@@ -77,7 +77,7 @@ Example response:
List information about the jobs that Sidekiq has performed. List information about the jobs that Sidekiq has performed.
``` ```plaintext
GET /sidekiq/job_stats GET /sidekiq/job_stats
``` ```
...@@ -102,7 +102,7 @@ Example response: ...@@ -102,7 +102,7 @@ Example response:
List all the currently available information about Sidekiq. List all the currently available information about Sidekiq.
``` ```plaintext
GET /sidekiq/compound_metrics GET /sidekiq/compound_metrics
``` ```
......
...@@ -8,7 +8,7 @@ administrator in order to perform this action. ...@@ -8,7 +8,7 @@ administrator in order to perform this action.
NOTE: **Note:** NOTE: **Note:**
These statistics are approximate. These statistics are approximate.
``` ```plaintext
GET /application/statistics GET /application/statistics
``` ```
......
...@@ -7,7 +7,7 @@ Every API call to suggestions must be authenticated. ...@@ -7,7 +7,7 @@ Every API call to suggestions must be authenticated.
Applies a suggested patch in a merge request. Users must be Applies a suggested patch in a merge request. Users must be
at least [Developer](../user/permissions.md) to perform such action. at least [Developer](../user/permissions.md) to perform such action.
``` ```plaintext
PUT /suggestions/:id/apply PUT /suggestions/:id/apply
``` ```
......
...@@ -11,7 +11,7 @@ Read more about [system hooks](../system_hooks/system_hooks.md). ...@@ -11,7 +11,7 @@ Read more about [system hooks](../system_hooks/system_hooks.md).
Get a list of all system hooks. Get a list of all system hooks.
``` ```plaintext
GET /hooks GET /hooks
``` ```
...@@ -42,7 +42,7 @@ Example response: ...@@ -42,7 +42,7 @@ Example response:
Add a new system hook. Add a new system hook.
``` ```plaintext
POST /hooks POST /hooks
``` ```
...@@ -81,7 +81,7 @@ Example response: ...@@ -81,7 +81,7 @@ Example response:
## Test system hook ## Test system hook
``` ```plaintext
GET /hooks/:id GET /hooks/:id
``` ```
...@@ -112,7 +112,7 @@ Example response: ...@@ -112,7 +112,7 @@ Example response:
Deletes a system hook. Deletes a system hook.
``` ```plaintext
DELETE /hooks/:id DELETE /hooks/:id
``` ```
......
...@@ -6,7 +6,7 @@ Get a list of repository tags from a project, sorted by name in reverse ...@@ -6,7 +6,7 @@ Get a list of repository tags from a project, sorted by name in reverse
alphabetical order. This endpoint can be accessed without authentication if the alphabetical order. This endpoint can be accessed without authentication if the
repository is publicly accessible. repository is publicly accessible.
``` ```plaintext
GET /projects/:id/repository/tags GET /projects/:id/repository/tags
``` ```
...@@ -57,7 +57,7 @@ Parameters: ...@@ -57,7 +57,7 @@ Parameters:
Get a specific repository tag determined by its name. This endpoint can be Get a specific repository tag determined by its name. This endpoint can be
accessed without authentication if the repository is publicly accessible. accessed without authentication if the repository is publicly accessible.
``` ```plaintext
GET /projects/:id/repository/tags/:tag_name GET /projects/:id/repository/tags/:tag_name
``` ```
...@@ -104,7 +104,7 @@ Example Response: ...@@ -104,7 +104,7 @@ Example Response:
Creates a new tag in the repository that points to the supplied ref. Creates a new tag in the repository that points to the supplied ref.
``` ```plaintext
POST /projects/:id/repository/tags POST /projects/:id/repository/tags
``` ```
...@@ -164,7 +164,7 @@ status code `405` with an explaining error message is returned. ...@@ -164,7 +164,7 @@ status code `405` with an explaining error message is returned.
Deletes a tag of a repository with given name. Deletes a tag of a repository with given name.
``` ```plaintext
DELETE /projects/:id/repository/tags/:tag_name DELETE /projects/:id/repository/tags/:tag_name
``` ```
...@@ -178,7 +178,7 @@ Parameters: ...@@ -178,7 +178,7 @@ Parameters:
Add release notes to the existing Git tag. If there Add release notes to the existing Git tag. If there
already exists a release for the given tag, status code `409` is returned. already exists a release for the given tag, status code `409` is returned.
``` ```plaintext
POST /projects/:id/repository/tags/:tag_name/release POST /projects/:id/repository/tags/:tag_name/release
``` ```
...@@ -210,7 +210,7 @@ Response: ...@@ -210,7 +210,7 @@ Response:
Updates the release notes of a given release. Updates the release notes of a given release.
``` ```plaintext
PUT /projects/:id/repository/tags/:tag_name/release PUT /projects/:id/repository/tags/:tag_name/release
``` ```
......
...@@ -12,7 +12,7 @@ information on Dockerfiles, see the ...@@ -12,7 +12,7 @@ information on Dockerfiles, see the
Get all Dockerfile templates. Get all Dockerfile templates.
``` ```plaintext
GET /templates/dockerfiles GET /templates/dockerfiles
``` ```
...@@ -99,7 +99,7 @@ Example response: ...@@ -99,7 +99,7 @@ Example response:
Get a single Dockerfile template. Get a single Dockerfile template.
``` ```plaintext
GET /templates/dockerfiles/:key GET /templates/dockerfiles/:key
``` ```
......
...@@ -13,7 +13,7 @@ resources available online. ...@@ -13,7 +13,7 @@ resources available online.
Get all license templates. Get all license templates.
``` ```plaintext
GET /templates/licenses GET /templates/licenses
``` ```
...@@ -110,7 +110,7 @@ Example response: ...@@ -110,7 +110,7 @@ Example response:
Get a single license template. You can pass parameters to replace the license Get a single license template. You can pass parameters to replace the license
placeholder. placeholder.
``` ```plaintext
GET /templates/licenses/:key GET /templates/licenses/:key
``` ```
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
Returns a list of todos. When no filter is applied, it returns all pending todos Returns a list of todos. When no filter is applied, it returns all pending todos
for the current user. Different filters allow the user to precise the request. for the current user. Different filters allow the user to precise the request.
``` ```plaintext
GET /todos GET /todos
``` ```
...@@ -184,7 +184,7 @@ Example Response: ...@@ -184,7 +184,7 @@ Example Response:
Marks a single pending todo given by its ID for the current user as done. The Marks a single pending todo given by its ID for the current user as done. The
todo marked as done is returned in the response. todo marked as done is returned in the response.
``` ```plaintext
POST /todos/:id/mark_as_done POST /todos/:id/mark_as_done
``` ```
...@@ -280,7 +280,7 @@ Example Response: ...@@ -280,7 +280,7 @@ Example Response:
Marks all pending todos for the current user as done. It returns the HTTP status code `204` with an empty response. Marks all pending todos for the current user as done. It returns the HTTP status code `204` with an empty response.
``` ```plaintext
POST /todos/mark_as_done POST /todos/mark_as_done
``` ```
......
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