Commit dfa81327 authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'docs-aqualls-20200227-api-blocks' into 'master'

Docs: Add language identifiers to code blocks

See merge request gitlab-org/gitlab!26094
parents b0b1b3de 3cbf2ff7
...@@ -15,7 +15,7 @@ Epics are available only in the [Ultimate/Gold tier](https://about.gitlab.com/pr ...@@ -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. Gets all child epics of an epic.
``` ```plaintext
GET /groups/:id/epics/:epic_iid/epics GET /groups/:id/epics/:epic_iid/epics
``` ```
...@@ -69,7 +69,7 @@ Example response: ...@@ -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. 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 POST /groups/:id/epics/:epic_iid/epics
``` ```
...@@ -122,7 +122,7 @@ Example response: ...@@ -122,7 +122,7 @@ Example response:
Creates a a new epic and associates it with provided parent epic. The response is LinkedEpic object. 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 POST /groups/:id/epics/:epic_iid/epics
``` ```
...@@ -155,7 +155,7 @@ Example response: ...@@ -155,7 +155,7 @@ Example response:
## Re-order a child epic ## Re-order a child epic
``` ```plaintext
PUT /groups/:id/epics/:epic_iid/epics/:child_epic_id PUT /groups/:id/epics/:epic_iid/epics/:child_epic_id
``` ```
...@@ -212,7 +212,7 @@ Example response: ...@@ -212,7 +212,7 @@ Example response:
Unassigns a child epic from a parent epic. Unassigns a child epic from a parent epic.
``` ```plaintext
DELETE /groups/:id/epics/:epic_iid/epics/:child_epic_id DELETE /groups/:id/epics/:epic_iid/epics/:child_epic_id
``` ```
......
...@@ -15,7 +15,7 @@ are [paginated](README.md#pagination). ...@@ -15,7 +15,7 @@ are [paginated](README.md#pagination).
Gets all feature flags of the requested project. Gets all feature flags of the requested project.
``` ```plaintext
GET /projects/:id/feature_flags GET /projects/:id/feature_flags
``` ```
...@@ -145,7 +145,7 @@ Example response: ...@@ -145,7 +145,7 @@ Example response:
Creates a new feature flag. Creates a new feature flag.
``` ```plaintext
POST /projects/:id/feature_flags POST /projects/:id/feature_flags
``` ```
...@@ -219,7 +219,7 @@ Example response: ...@@ -219,7 +219,7 @@ Example response:
Gets a single feature flag. Gets a single feature flag.
``` ```plaintext
GET /projects/:id/feature_flags/:name GET /projects/:id/feature_flags/:name
``` ```
...@@ -294,7 +294,7 @@ Example response: ...@@ -294,7 +294,7 @@ Example response:
Deletes a feature flag. Deletes a feature flag.
``` ```plaintext
DELETE /projects/:id/feature_flags/:name DELETE /projects/:id/feature_flags/:name
``` ```
......
...@@ -123,7 +123,7 @@ Example response: ...@@ -123,7 +123,7 @@ Example response:
Gets issues count statistics for given project. Gets issues count statistics for given project.
``` ```plaintext
GET /projects/:id/issues_statistics GET /projects/:id/issues_statistics
GET /projects/:id/issues_statistics?labels=foo GET /projects/:id/issues_statistics?labels=foo
GET /projects/:id/issues_statistics?labels=foo,bar GET /projects/:id/issues_statistics?labels=foo,bar
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
The access levels are defined in the `Gitlab::Access` module. Currently, these levels are recognized: The access levels are defined in the `Gitlab::Access` module. Currently, these levels are recognized:
``` ```plaintext
10 => Guest access 10 => Guest access
20 => Reporter access 20 => Reporter access
30 => Developer access 30 => Developer access
......
...@@ -112,7 +112,7 @@ easily accessible, therefore secrets can leak easily. ...@@ -112,7 +112,7 @@ easily accessible, therefore secrets can leak easily.
To request the access token, you should redirect the user to the To request the access token, you should redirect the user to the
`/oauth/authorize` endpoint using `token` response type: `/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 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 ...@@ -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 will include a fragment with `access_token` as well as token details in GET
parameters, for example: parameters, for example:
``` ```plaintext
http://myapp.com/oauth/redirect#access_token=ABCDExyz123&state=YOUR_UNIQUE_STATE_HASH&token_type=bearer&expires_in=3600 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 ...@@ -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: Then, you'll receive the access token back in the response:
``` ```json
{ {
"access_token": "1f0af717251950dbd4d73154fdf0a474a5c5119adad999683f5b450c460726aa", "access_token": "1f0af717251950dbd4d73154fdf0a474a5c5119adad999683f5b450c460726aa",
"token_type": "bearer", "token_type": "bearer",
...@@ -192,7 +192,7 @@ Then, you'll receive the access token back in the response: ...@@ -192,7 +192,7 @@ Then, you'll receive the access token back in the response:
For testing, you can use the `oauth2` Ruby gem: For testing, you can use the `oauth2` Ruby gem:
``` ```ruby
client = OAuth2::Client.new('the_client_id', 'the_client_secret', :site => "http://example.com") client = OAuth2::Client.new('the_client_id', 'the_client_secret', :site => "http://example.com")
access_token = client.password.get_token('user@example.com', 'secret') access_token = client.password.get_token('user@example.com', 'secret')
puts access_token.token puts access_token.token
...@@ -203,13 +203,13 @@ 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. 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: You can pass the token either as GET parameter:
``` ```plaintext
GET https://gitlab.example.com/api/v4/user?access_token=OAUTH-TOKEN GET https://gitlab.example.com/api/v4/user?access_token=OAUTH-TOKEN
``` ```
or you can put the token to the Authorization header: or you can put the token to the Authorization header:
``` ```shell
curl --header "Authorization: Bearer OAUTH-TOKEN" https://gitlab.example.com/api/v4/user curl --header "Authorization: Bearer OAUTH-TOKEN" https://gitlab.example.com/api/v4/user
``` ```
...@@ -222,7 +222,7 @@ You must supply the access token, either: ...@@ -222,7 +222,7 @@ You must supply the access token, either:
- As a parameter: - As a parameter:
``` ```plaintext
GET https://gitlab.example.com/oauth/token/info?access_token=<OAUTH-TOKEN> 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). ...@@ -11,7 +11,7 @@ This is the API docs of [GitLab Packages](../administration/packages/index.md).
Get a list of project packages. All package types are included in results. When Get a list of project packages. All package types are included in results. When
accessed without authentication, only packages of public projects are returned. accessed without authentication, only packages of public projects are returned.
``` ```plaintext
GET /projects/:id/packages GET /projects/:id/packages
``` ```
...@@ -56,7 +56,7 @@ By default, the `GET` request will return 20 results, since the API is [paginate ...@@ -56,7 +56,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. Get a list of project packages at the group level.
When accessed without authentication, only packages of public projects are returned. When accessed without authentication, only packages of public projects are returned.
``` ```plaintext
GET /groups/:id/packages GET /groups/:id/packages
``` ```
...@@ -135,7 +135,7 @@ The `_links` object contains the following properties: ...@@ -135,7 +135,7 @@ The `_links` object contains the following properties:
Get a single project package. Get a single project package.
``` ```plaintext
GET /projects/:id/packages/:package_id GET /projects/:id/packages/:package_id
``` ```
...@@ -186,7 +186,7 @@ The `_links` object contains the following properties: ...@@ -186,7 +186,7 @@ The `_links` object contains the following properties:
Get a list of package files of a single package. Get a list of package files of a single package.
``` ```plaintext
GET /projects/:id/packages/:package_id/package_files GET /projects/:id/packages/:package_id/package_files
``` ```
...@@ -241,7 +241,7 @@ By default, the `GET` request will return 20 results, since the API is [paginate ...@@ -241,7 +241,7 @@ By default, the `GET` request will return 20 results, since the API is [paginate
Deletes a project package. Deletes a project package.
``` ```plaintext
DELETE /projects/:id/packages/:package_id DELETE /projects/:id/packages/:package_id
``` ```
......
...@@ -6,7 +6,7 @@ You can read more about [pipeline schedules](../user/project/pipelines/schedules ...@@ -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. Get a list of the pipeline schedules of a project.
``` ```plaintext
GET /projects/:id/pipeline_schedules GET /projects/:id/pipeline_schedules
``` ```
...@@ -47,7 +47,7 @@ curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "https://gitlab.example.com/ ...@@ -47,7 +47,7 @@ curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "https://gitlab.example.com/
Get the pipeline schedule of a project. Get the pipeline schedule of a project.
``` ```plaintext
GET /projects/:id/pipeline_schedules/:pipeline_schedule_id GET /projects/:id/pipeline_schedules/:pipeline_schedule_id
``` ```
...@@ -99,7 +99,7 @@ curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "https://gitlab.example.com/ ...@@ -99,7 +99,7 @@ curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "https://gitlab.example.com/
Create a new pipeline schedule of a project. Create a new pipeline schedule of a project.
``` ```plaintext
POST /projects/:id/pipeline_schedules POST /projects/:id/pipeline_schedules
``` ```
...@@ -143,7 +143,7 @@ curl --request POST --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form descri ...@@ -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. 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 PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id
``` ```
...@@ -193,7 +193,7 @@ curl --request PUT --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form cron="0 ...@@ -193,7 +193,7 @@ curl --request PUT --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form cron="0
Update the owner of the pipeline schedule of a project. Update the owner of the pipeline schedule of a project.
``` ```plaintext
POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership
``` ```
...@@ -238,7 +238,7 @@ curl --request POST --header "PRIVATE-TOKEN: hf2CvZXB9w8Uc5pZKpSB" "https://gitl ...@@ -238,7 +238,7 @@ curl --request POST --header "PRIVATE-TOKEN: hf2CvZXB9w8Uc5pZKpSB" "https://gitl
Delete the pipeline schedule of a project. Delete the pipeline schedule of a project.
``` ```plaintext
DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id
``` ```
...@@ -317,7 +317,7 @@ Example response: ...@@ -317,7 +317,7 @@ Example response:
Create a new variable of a pipeline schedule. Create a new variable of a pipeline schedule.
``` ```plaintext
POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables
``` ```
...@@ -345,7 +345,7 @@ curl --request POST --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form "key=N ...@@ -345,7 +345,7 @@ curl --request POST --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form "key=N
Updates the variable of a pipeline schedule. Updates the variable of a pipeline schedule.
``` ```plaintext
PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key
``` ```
...@@ -373,7 +373,7 @@ curl --request PUT --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form "value= ...@@ -373,7 +373,7 @@ curl --request PUT --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form "value=
Delete the variable of a pipeline schedule. Delete the variable of a pipeline schedule.
``` ```plaintext
DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key
``` ```
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
> [Introduced][ce-5837] in GitLab 8.11 > [Introduced][ce-5837] in GitLab 8.11
``` ```plaintext
GET /projects/:id/pipelines GET /projects/:id/pipelines
``` ```
...@@ -23,7 +23,7 @@ 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`) | | `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`) | | `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" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines"
``` ```
...@@ -56,7 +56,7 @@ Example of response ...@@ -56,7 +56,7 @@ Example of response
> [Introduced][ce-5837] in GitLab 8.11 > [Introduced][ce-5837] in GitLab 8.11
``` ```plaintext
GET /projects/:id/pipelines/:pipeline_id GET /projects/:id/pipelines/:pipeline_id
``` ```
...@@ -65,7 +65,7 @@ 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 | | `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 | | `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" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46"
``` ```
...@@ -101,7 +101,7 @@ Example of response ...@@ -101,7 +101,7 @@ Example of response
### Get variables of a pipeline ### Get variables of a pipeline
``` ```plaintext
GET /projects/:id/pipelines/:pipeline_id/variables GET /projects/:id/pipelines/:pipeline_id/variables
``` ```
...@@ -110,7 +110,7 @@ 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 | | `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 | | `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" 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 ...@@ -134,7 +134,7 @@ Example of response
> [Introduced][ce-7209] in GitLab 8.14 > [Introduced][ce-7209] in GitLab 8.14
``` ```plaintext
POST /projects/:id/pipeline POST /projects/:id/pipeline
``` ```
...@@ -144,7 +144,7 @@ POST /projects/:id/pipeline ...@@ -144,7 +144,7 @@ POST /projects/:id/pipeline
| `ref` | string | yes | Reference to commit | | `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' }]` | | `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" 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 ...@@ -182,7 +182,7 @@ Example of response
> [Introduced][ce-5837] in GitLab 8.11 > [Introduced][ce-5837] in GitLab 8.11
``` ```plaintext
POST /projects/:id/pipelines/:pipeline_id/retry POST /projects/:id/pipelines/:pipeline_id/retry
``` ```
...@@ -191,7 +191,7 @@ 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 | | `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 | | `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" 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: ...@@ -229,7 +229,7 @@ Response:
> [Introduced][ce-5837] in GitLab 8.11 > [Introduced][ce-5837] in GitLab 8.11
``` ```plaintext
POST /projects/:id/pipelines/:pipeline_id/cancel POST /projects/:id/pipelines/:pipeline_id/cancel
``` ```
...@@ -238,7 +238,7 @@ 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 | | `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 | | `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" 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: ...@@ -276,7 +276,7 @@ Response:
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/22988) in GitLab 11.6. > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/22988) in GitLab 11.6.
``` ```plaintext
DELETE /projects/:id/pipelines/:pipeline_id DELETE /projects/:id/pipelines/:pipeline_id
``` ```
...@@ -285,7 +285,7 @@ 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 | | `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 | | `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" 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. ...@@ -8,11 +8,11 @@ All methods require administrator authorization.
Get a list of all project aliases: Get a list of all project aliases:
``` ```plaintext
GET /project_aliases GET /project_aliases
``` ```
``` ```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases"
``` ```
...@@ -37,7 +37,7 @@ Example response: ...@@ -37,7 +37,7 @@ Example response:
Get details of a project alias: Get details of a project alias:
``` ```plaintext
GET /project_aliases/:name GET /project_aliases/:name
``` ```
...@@ -45,7 +45,7 @@ GET /project_aliases/:name ...@@ -45,7 +45,7 @@ GET /project_aliases/:name
|-----------|--------|----------|-----------------------| |-----------|--------|----------|-----------------------|
| `name` | string | yes | The name of the alias | | `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" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases/gitlab"
``` ```
...@@ -64,7 +64,7 @@ Example response: ...@@ -64,7 +64,7 @@ Example response:
Add a new alias for a project. Responds with a 201 when successful, Add a new alias for a project. Responds with a 201 when successful,
400 when there are validation errors (e.g. alias already exists): 400 when there are validation errors (e.g. alias already exists):
``` ```plaintext
POST /project_aliases POST /project_aliases
``` ```
...@@ -73,13 +73,13 @@ POST /project_aliases ...@@ -73,13 +73,13 @@ POST /project_aliases
| `project_id` | integer/string | yes | The ID or path of the project. | | `project_id` | integer/string | yes | The ID or path of the project. |
| `name` | string | yes | The name of the alias. Must be unique. | | `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" 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 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" 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: ...@@ -98,7 +98,7 @@ Example response:
Removes a project aliases. Responds with a 204 when project alias Removes a project aliases. Responds with a 204 when project alias
exists, 404 when it doesn't: exists, 404 when it doesn't:
``` ```plaintext
DELETE /project_aliases/:name DELETE /project_aliases/:name
``` ```
...@@ -106,6 +106,6 @@ DELETE /project_aliases/:name ...@@ -106,6 +106,6 @@ DELETE /project_aliases/:name
|-----------|--------|----------|-----------------------| |-----------|--------|----------|-----------------------|
| `name` | string | yes | The name of the alias | | `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" 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 ...@@ -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. Gets a list of a project's badges and its group badges.
``` ```plaintext
GET /projects/:id/badges GET /projects/:id/badges
``` ```
...@@ -58,7 +58,7 @@ Example response: ...@@ -58,7 +58,7 @@ Example response:
Gets a badge of a project. Gets a badge of a project.
``` ```plaintext
GET /projects/:id/badges/:badge_id GET /projects/:id/badges/:badge_id
``` ```
...@@ -88,7 +88,7 @@ Example response: ...@@ -88,7 +88,7 @@ Example response:
Adds a badge to a project. Adds a badge to a project.
``` ```plaintext
POST /projects/:id/badges POST /projects/:id/badges
``` ```
...@@ -119,7 +119,7 @@ Example response: ...@@ -119,7 +119,7 @@ Example response:
Updates a badge of a project. Updates a badge of a project.
``` ```plaintext
PUT /projects/:id/badges/:badge_id PUT /projects/:id/badges/:badge_id
``` ```
...@@ -151,7 +151,7 @@ Example response: ...@@ -151,7 +151,7 @@ Example response:
Removes a badge from a project. Only project's badges will be removed by using this endpoint. Removes a badge from a project. Only project's badges will be removed by using this endpoint.
``` ```plaintext
DELETE /projects/:id/badges/:badge_id DELETE /projects/:id/badges/:badge_id
``` ```
...@@ -168,7 +168,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl ...@@ -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. Returns how the `link_url` and `image_url` final URLs would be after resolving the placeholder interpolation.
``` ```plaintext
GET /projects/:id/badges/render 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