Commit 3cbf2ff7 authored by Amy Qualls's avatar Amy Qualls

Add language identifiers to code blocks

These API pages had code blocks that were missing language
declarations.
parent 54cd52b6
......@@ -15,7 +15,7 @@ Epics are available only in the [Ultimate/Gold tier](https://about.gitlab.com/pr
Gets all child epics of an epic.
```
```plaintext
GET /groups/:id/epics/:epic_iid/epics
```
......@@ -69,7 +69,7 @@ Example response:
Creates an association between two epics, designating one as the parent epic and the other as the child epic. A parent epic can have multiple child epics. If the new child epic already belonged to another epic, it is unassigned from that previous parent.
```
```plaintext
POST /groups/:id/epics/:epic_iid/epics
```
......@@ -122,7 +122,7 @@ Example response:
Creates a a new epic and associates it with provided parent epic. The response is LinkedEpic object.
```
```plaintext
POST /groups/:id/epics/:epic_iid/epics
```
......@@ -155,7 +155,7 @@ Example response:
## Re-order a child epic
```
```plaintext
PUT /groups/:id/epics/:epic_iid/epics/:child_epic_id
```
......@@ -212,7 +212,7 @@ Example response:
Unassigns a child epic from a parent epic.
```
```plaintext
DELETE /groups/:id/epics/:epic_iid/epics/:child_epic_id
```
......
......@@ -15,7 +15,7 @@ are [paginated](README.md#pagination).
Gets all feature flags of the requested project.
```
```plaintext
GET /projects/:id/feature_flags
```
......@@ -145,7 +145,7 @@ Example response:
Creates a new feature flag.
```
```plaintext
POST /projects/:id/feature_flags
```
......@@ -219,7 +219,7 @@ Example response:
Gets a single feature flag.
```
```plaintext
GET /projects/:id/feature_flags/:name
```
......@@ -294,7 +294,7 @@ Example response:
Deletes a feature flag.
```
```plaintext
DELETE /projects/:id/feature_flags/:name
```
......
......@@ -123,7 +123,7 @@ Example response:
Gets issues count statistics for given project.
```
```plaintext
GET /projects/:id/issues_statistics
GET /projects/:id/issues_statistics?labels=foo
GET /projects/:id/issues_statistics?labels=foo,bar
......
......@@ -4,7 +4,7 @@
The access levels are defined in the `Gitlab::Access` module. Currently, these levels are recognized:
```
```plaintext
10 => Guest access
20 => Reporter access
30 => Developer access
......
......@@ -112,7 +112,7 @@ easily accessible, therefore secrets can leak easily.
To request the access token, you should redirect the user to the
`/oauth/authorize` endpoint using `token` response type:
```
```plaintext
https://gitlab.example.com/oauth/authorize?client_id=APP_ID&redirect_uri=REDIRECT_URI&response_type=token&state=YOUR_UNIQUE_STATE_HASH&scope=REQUESTED_SCOPES
```
......@@ -124,7 +124,7 @@ would request `read_user` and `profile` scopes). The redirect
will include a fragment with `access_token` as well as token details in GET
parameters, for example:
```
```plaintext
http://myapp.com/oauth/redirect#access_token=ABCDExyz123&state=YOUR_UNIQUE_STATE_HASH&token_type=bearer&expires_in=3600
```
......@@ -182,7 +182,7 @@ curl --data "@auth.txt" --request POST https://gitlab.example.com/oauth/token
Then, you'll receive the access token back in the response:
```
```json
{
"access_token": "1f0af717251950dbd4d73154fdf0a474a5c5119adad999683f5b450c460726aa",
"token_type": "bearer",
......@@ -192,7 +192,7 @@ Then, you'll receive the access token back in the response:
For testing, you can use the `oauth2` Ruby gem:
```
```ruby
client = OAuth2::Client.new('the_client_id', 'the_client_secret', :site => "http://example.com")
access_token = client.password.get_token('user@example.com', 'secret')
puts access_token.token
......@@ -203,13 +203,13 @@ puts access_token.token
The `access token` allows you to make requests to the API on behalf of a user.
You can pass the token either as GET parameter:
```
```plaintext
GET https://gitlab.example.com/api/v4/user?access_token=OAUTH-TOKEN
```
or you can put the token to the Authorization header:
```
```shell
curl --header "Authorization: Bearer OAUTH-TOKEN" https://gitlab.example.com/api/v4/user
```
......@@ -222,7 +222,7 @@ You must supply the access token, either:
- As a parameter:
```
```plaintext
GET https://gitlab.example.com/oauth/token/info?access_token=<OAUTH-TOKEN>
```
......
......@@ -11,7 +11,7 @@ This is the API docs of [GitLab Packages](../administration/packages/index.md).
Get a list of project packages. Both Maven and NPM packages are included in results.
When accessed without authentication, only packages of public projects are returned.
```
```plaintext
GET /projects/:id/packages
```
......@@ -55,7 +55,7 @@ By default, the `GET` request will return 20 results, since the API is [paginate
Get a list of project packages at the group level.
When accessed without authentication, only packages of public projects are returned.
```
```plaintext
GET /groups/:id/packages
```
......@@ -134,7 +134,7 @@ The `_links` object contains the following properties:
Get a single project package.
```
```plaintext
GET /projects/:id/packages/:package_id
```
......@@ -185,7 +185,7 @@ The `_links` object contains the following properties:
Get a list of package files of a single package.
```
```plaintext
GET /projects/:id/packages/:package_id/package_files
```
......@@ -240,7 +240,7 @@ By default, the `GET` request will return 20 results, since the API is [paginate
Deletes a project package.
```
```plaintext
DELETE /projects/:id/packages/:package_id
```
......
......@@ -6,7 +6,7 @@ You can read more about [pipeline schedules](../user/project/pipelines/schedules
Get a list of the pipeline schedules of a project.
```
```plaintext
GET /projects/:id/pipeline_schedules
```
......@@ -47,7 +47,7 @@ curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "https://gitlab.example.com/
Get the pipeline schedule of a project.
```
```plaintext
GET /projects/:id/pipeline_schedules/:pipeline_schedule_id
```
......@@ -99,7 +99,7 @@ curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "https://gitlab.example.com/
Create a new pipeline schedule of a project.
```
```plaintext
POST /projects/:id/pipeline_schedules
```
......@@ -143,7 +143,7 @@ curl --request POST --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form descri
Updates the pipeline schedule of a project. Once the update is done, it will be rescheduled automatically.
```
```plaintext
PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id
```
......@@ -193,7 +193,7 @@ curl --request PUT --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form cron="0
Update the owner of the pipeline schedule of a project.
```
```plaintext
POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership
```
......@@ -238,7 +238,7 @@ curl --request POST --header "PRIVATE-TOKEN: hf2CvZXB9w8Uc5pZKpSB" "https://gitl
Delete the pipeline schedule of a project.
```
```plaintext
DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id
```
......@@ -317,7 +317,7 @@ Example response:
Create a new variable of a pipeline schedule.
```
```plaintext
POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables
```
......@@ -345,7 +345,7 @@ curl --request POST --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form "key=N
Updates the variable of a pipeline schedule.
```
```plaintext
PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key
```
......@@ -373,7 +373,7 @@ curl --request PUT --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form "value=
Delete the variable of a pipeline schedule.
```
```plaintext
DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key
```
......
......@@ -4,7 +4,7 @@
> [Introduced][ce-5837] in GitLab 8.11
```
```plaintext
GET /projects/:id/pipelines
```
......@@ -23,7 +23,7 @@ GET /projects/:id/pipelines
| `order_by`| string | no | Order pipelines by `id`, `status`, `ref`, `updated_at` or `user_id` (default: `id`) |
| `sort` | string | no | Sort pipelines in `asc` or `desc` order (default: `desc`) |
```
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines"
```
......@@ -56,7 +56,7 @@ Example of response
> [Introduced][ce-5837] in GitLab 8.11
```
```plaintext
GET /projects/:id/pipelines/:pipeline_id
```
......@@ -65,7 +65,7 @@ GET /projects/:id/pipelines/:pipeline_id
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `pipeline_id` | integer | yes | The ID of a pipeline |
```
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46"
```
......@@ -101,7 +101,7 @@ Example of response
### Get variables of a pipeline
```
```plaintext
GET /projects/:id/pipelines/:pipeline_id/variables
```
......@@ -110,7 +110,7 @@ GET /projects/:id/pipelines/:pipeline_id/variables
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `pipeline_id` | integer | yes | The ID of a pipeline |
```
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46/variables"
```
......@@ -134,7 +134,7 @@ Example of response
> [Introduced][ce-7209] in GitLab 8.14
```
```plaintext
POST /projects/:id/pipeline
```
......@@ -144,7 +144,7 @@ POST /projects/:id/pipeline
| `ref` | string | yes | Reference to commit |
| `variables` | array | no | An array containing the variables available in the pipeline, matching the structure `[{ 'key' => 'UPLOAD_TO_S3', 'variable_type' => 'file', 'value' => 'true' }]` |
```
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipeline?ref=master"
```
......@@ -182,7 +182,7 @@ Example of response
> [Introduced][ce-5837] in GitLab 8.11
```
```plaintext
POST /projects/:id/pipelines/:pipeline_id/retry
```
......@@ -191,7 +191,7 @@ POST /projects/:id/pipelines/:pipeline_id/retry
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `pipeline_id` | integer | yes | The ID of a pipeline |
```
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46/retry"
```
......@@ -229,7 +229,7 @@ Response:
> [Introduced][ce-5837] in GitLab 8.11
```
```plaintext
POST /projects/:id/pipelines/:pipeline_id/cancel
```
......@@ -238,7 +238,7 @@ POST /projects/:id/pipelines/:pipeline_id/cancel
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `pipeline_id` | integer | yes | The ID of a pipeline |
```
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46/cancel"
```
......@@ -276,7 +276,7 @@ Response:
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/22988) in GitLab 11.6.
```
```plaintext
DELETE /projects/:id/pipelines/:pipeline_id
```
......@@ -285,7 +285,7 @@ DELETE /projects/:id/pipelines/:pipeline_id
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `pipeline_id` | integer | yes | The ID of a pipeline |
```
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" --request "DELETE" "https://gitlab.example.com/api/v4/projects/1/pipelines/46"
```
......
......@@ -8,11 +8,11 @@ All methods require administrator authorization.
Get a list of all project aliases:
```
```plaintext
GET /project_aliases
```
```
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases"
```
......@@ -37,7 +37,7 @@ Example response:
Get details of a project alias:
```
```plaintext
GET /project_aliases/:name
```
......@@ -45,7 +45,7 @@ GET /project_aliases/:name
|-----------|--------|----------|-----------------------|
| `name` | string | yes | The name of the alias |
```
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases/gitlab"
```
......@@ -64,7 +64,7 @@ Example response:
Add a new alias for a project. Responds with a 201 when successful,
400 when there are validation errors (e.g. alias already exists):
```
```plaintext
POST /project_aliases
```
......@@ -73,13 +73,13 @@ POST /project_aliases
| `project_id` | integer/string | yes | The ID or path of the project. |
| `name` | string | yes | The name of the alias. Must be unique. |
```
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases" --form "project_id=1" --form "name=gitlab"
```
or
```
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases" --form "project_id=gitlab-org/gitlab" --form "name=gitlab"
```
......@@ -98,7 +98,7 @@ Example response:
Removes a project aliases. Responds with a 204 when project alias
exists, 404 when it doesn't:
```
```plaintext
DELETE /project_aliases/:name
```
......@@ -106,6 +106,6 @@ DELETE /project_aliases/:name
|-----------|--------|----------|-----------------------|
| `name` | string | yes | The name of the alias |
```
```shell
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases/gitlab"
```
......@@ -16,7 +16,7 @@ Badges support placeholders that will be replaced in real time in both the link
Gets a list of a project's badges and its group badges.
```
```plaintext
GET /projects/:id/badges
```
......@@ -58,7 +58,7 @@ Example response:
Gets a badge of a project.
```
```plaintext
GET /projects/:id/badges/:badge_id
```
......@@ -88,7 +88,7 @@ Example response:
Adds a badge to a project.
```
```plaintext
POST /projects/:id/badges
```
......@@ -119,7 +119,7 @@ Example response:
Updates a badge of a project.
```
```plaintext
PUT /projects/:id/badges/:badge_id
```
......@@ -151,7 +151,7 @@ Example response:
Removes a badge from a project. Only project's badges will be removed by using this endpoint.
```
```plaintext
DELETE /projects/:id/badges/:badge_id
```
......@@ -168,7 +168,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Returns how the `link_url` and `image_url` final URLs would be after resolving the placeholder interpolation.
```
```plaintext
GET /projects/:id/badges/render
```
......
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