Commit c72e5ebe authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent ffc43b86
...@@ -8,6 +8,7 @@ module Projects ...@@ -8,6 +8,7 @@ module Projects
helper_method :error_tracking_setting helper_method :error_tracking_setting
def show def show
render locals: { prometheus_service: prometheus_service }
end end
def update def update
...@@ -28,6 +29,10 @@ module Projects ...@@ -28,6 +29,10 @@ module Projects
private private
def prometheus_service
project.find_or_initialize_service(::PrometheusService.to_param)
end
def render_update_response(result) def render_update_response(result)
respond_to do |format| respond_to do |format|
format.html do format.html do
......
...@@ -202,10 +202,6 @@ class Label < ApplicationRecord ...@@ -202,10 +202,6 @@ class Label < ApplicationRecord
priorities.present? priorities.present?
end end
def template?
template
end
def color def color
super || DEFAULT_COLOR super || DEFAULT_COLOR
end end
......
...@@ -323,8 +323,8 @@ ...@@ -323,8 +323,8 @@
.dropdown-footer .dropdown-footer
%strong Tip: %strong Tip:
If an author is not a member of this project, you can still filter by their name while using the search field. If an author is not a member of this project, you can still filter by their name while using the search field.
.dropdown-loading .dropdown-loading.text-center
= icon('spinner spin') .spinner.spinner-md.mt-8
.example .example
%div %div
...@@ -404,8 +404,8 @@ ...@@ -404,8 +404,8 @@
%input.dropdown-input-field{ type: "search", placeholder: "Filter results" } %input.dropdown-input-field{ type: "search", placeholder: "Filter results" }
= icon('search') = icon('search')
.dropdown-content .dropdown-content
.dropdown-loading .dropdown-loading.text-center
= icon('spinner spin') .spinner.spinner-md.mt-8
.example .example
%div %div
......
%b
= s_('PrometheusService|Auto configuration')
- if service.manual_configuration?
.info-well.p-2.mt-2
= s_('PrometheusService|To enable the installation of Prometheus on your clusters, deactivate the manual configuration below')
- else
.container-fluid
.row
- if service.prometheus_available?
.col-sm-2
.svg-container
= image_tag 'illustrations/monitoring/getting_started.svg'
.col-sm-10
%p.text-success.prepend-top-default
= s_('PrometheusService|Prometheus is being automatically managed on your clusters')
= link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn'
- else
.col-sm-2
= image_tag 'illustrations/monitoring/loading.svg'
.col-sm-10
%p.prepend-top-default
= s_('PrometheusService|Automatically deploy and configure Prometheus on your clusters to monitor your project’s environments')
= link_to s_('PrometheusService|Install Prometheus on clusters'), project_clusters_path(project), class: 'btn btn-success'
%section.settings.no-animate.js-prometheus-settings
.settings-header
%h4
= _('Prometheus')
%button.btn.js-settings-toggle{ type: 'button' }
= _('Expand')
%p
= _('Link Prometheus monitoring to GitLab.')
= link_to _('More information'), help_page_path('user/project/integrations/prometheus'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
- if @project
= render 'projects/settings/operations/configuration_banner', project: @project, service: service
%b.append-bottom-default
= s_('PrometheusService|Manual configuration')
- unless service.editable?
.info-well
= s_('PrometheusService|To enable manual configuration, uninstall Prometheus from your clusters')
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
= render 'projects/settings/operations/incidents' = render 'projects/settings/operations/incidents'
= render 'projects/settings/operations/error_tracking' = render 'projects/settings/operations/error_tracking'
= render 'projects/settings/operations/prometheus', service: prometheus_service if Feature.enabled?(:settings_operations_prometheus_service)
= render 'projects/settings/operations/external_dashboard' = render 'projects/settings/operations/external_dashboard'
= render 'projects/settings/operations/grafana_integration' = render 'projects/settings/operations/grafana_integration'
= render_if_exists 'projects/settings/operations/tracing' = render_if_exists 'projects/settings/operations/tracing'
---
title: Enable Workhorse upload acceleration for Project Import API
merge_request: 25361
author:
type: performance
---
title: Migrate .fa-spinner to .spinner for app/views/help
merge_request: 25037
author: nuwe1
type: other
...@@ -9,7 +9,7 @@ Appearance API allows you to maintain GitLab's appearance as if using the GitLab ...@@ -9,7 +9,7 @@ Appearance API allows you to maintain GitLab's appearance as if using the GitLab
List the current appearance configuration of the GitLab instance. List the current appearance configuration of the GitLab instance.
``` ```plaintext
GET /application/appearance GET /application/appearance
``` ```
...@@ -39,7 +39,7 @@ Example response: ...@@ -39,7 +39,7 @@ Example response:
Use an API call to modify GitLab instance appearance configuration. Use an API call to modify GitLab instance appearance configuration.
``` ```plaintext
PUT /application/appearance PUT /application/appearance
``` ```
......
...@@ -8,7 +8,7 @@ To retrieve audit events using the API, you must [authenticate yourself](README. ...@@ -8,7 +8,7 @@ To retrieve audit events using the API, you must [authenticate yourself](README.
### Retrieve all instance audit events ### Retrieve all instance audit events
``` ```plaintext
GET /audit_events GET /audit_events
``` ```
...@@ -87,7 +87,7 @@ Example response: ...@@ -87,7 +87,7 @@ Example response:
### Retrieve single instance audit event ### Retrieve single instance audit event
``` ```plaintext
GET /audit_events/:id GET /audit_events/:id
``` ```
...@@ -126,7 +126,7 @@ To retrieve group audit events using the API, you must [authenticate yourself](R ...@@ -126,7 +126,7 @@ To retrieve group audit events using the API, you must [authenticate yourself](R
### Retrieve all group audit events ### Retrieve all group audit events
``` ```plaintext
GET /groups/:id/audit_events GET /groups/:id/audit_events
``` ```
...@@ -188,7 +188,7 @@ Example response: ...@@ -188,7 +188,7 @@ Example response:
Only available to group owners and administrators. Only available to group owners and administrators.
``` ```plaintext
GET /groups/:id/audit_events/:audit_event_id GET /groups/:id/audit_events/:audit_event_id
``` ```
......
...@@ -9,7 +9,7 @@ request on that project will result to a `404` status code. ...@@ -9,7 +9,7 @@ request on that project will result to a `404` status code.
Lists Issue Boards in the given project. Lists Issue Boards in the given project.
``` ```plaintext
GET /projects/:id/boards GET /projects/:id/boards
``` ```
...@@ -83,7 +83,7 @@ Example response: ...@@ -83,7 +83,7 @@ Example response:
Get a single board. Get a single board.
``` ```plaintext
GET /projects/:id/boards/:board_id GET /projects/:id/boards/:board_id
``` ```
...@@ -157,7 +157,7 @@ Example response: ...@@ -157,7 +157,7 @@ Example response:
Creates a board. Creates a board.
``` ```plaintext
POST /projects/:id/boards POST /projects/:id/boards
``` ```
...@@ -233,7 +233,7 @@ Example response: ...@@ -233,7 +233,7 @@ Example response:
Updates a board. Updates a board.
``` ```plaintext
PUT /projects/:id/boards/:board_id PUT /projects/:id/boards/:board_id
``` ```
...@@ -312,7 +312,7 @@ Example response: ...@@ -312,7 +312,7 @@ Example response:
Deletes a board. Deletes a board.
``` ```plaintext
DELETE /projects/:id/boards/:board_id DELETE /projects/:id/boards/:board_id
``` ```
...@@ -330,7 +330,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl ...@@ -330,7 +330,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Get a list of the board's lists. Get a list of the board's lists.
Does not include `open` and `closed` lists Does not include `open` and `closed` lists
``` ```plaintext
GET /projects/:id/boards/:board_id/lists GET /projects/:id/boards/:board_id/lists
``` ```
...@@ -387,7 +387,7 @@ Example response: ...@@ -387,7 +387,7 @@ Example response:
Get a single board list. Get a single board list.
``` ```plaintext
GET /projects/:id/boards/:board_id/lists/:list_id GET /projects/:id/boards/:board_id/lists/:list_id
``` ```
...@@ -421,7 +421,7 @@ Example response: ...@@ -421,7 +421,7 @@ Example response:
Creates a new Issue Board list. Creates a new Issue Board list.
``` ```plaintext
POST /projects/:id/boards/:board_id/lists POST /projects/:id/boards/:board_id/lists
``` ```
...@@ -463,7 +463,7 @@ Example response: ...@@ -463,7 +463,7 @@ Example response:
Updates an existing Issue Board list. This call is used to change list position. Updates an existing Issue Board list. This call is used to change list position.
``` ```plaintext
PUT /projects/:id/boards/:board_id/lists/:list_id PUT /projects/:id/boards/:board_id/lists/:list_id
``` ```
...@@ -498,7 +498,7 @@ Example response: ...@@ -498,7 +498,7 @@ Example response:
Only for admins and project owners. Deletes the board list in question. Only for admins and project owners. Deletes the board list in question.
``` ```plaintext
DELETE /projects/:id/boards/:board_id/lists/:list_id DELETE /projects/:id/boards/:board_id/lists/:list_id
``` ```
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Get a list of repository commits in a project. Get a list of repository commits in a project.
``` ```plaintext
GET /projects/:id/repository/commits GET /projects/:id/repository/commits
``` ```
...@@ -67,7 +67,7 @@ Example response: ...@@ -67,7 +67,7 @@ Example response:
Create a commit by posting a JSON payload Create a commit by posting a JSON payload
``` ```plaintext
POST /projects/:id/repository/commits POST /projects/:id/repository/commits
``` ```
...@@ -190,7 +190,7 @@ curl --request POST \ ...@@ -190,7 +190,7 @@ curl --request POST \
Get a specific commit identified by the commit hash or name of a branch or tag. Get a specific commit identified by the commit hash or name of a branch or tag.
``` ```plaintext
GET /projects/:id/repository/commits/:sha GET /projects/:id/repository/commits/:sha
``` ```
...@@ -246,7 +246,7 @@ Example response: ...@@ -246,7 +246,7 @@ Example response:
Get all references (from branches or tags) a commit is pushed to. Get all references (from branches or tags) a commit is pushed to.
The pagination parameters `page` and `per_page` can be used to restrict the list of references. The pagination parameters `page` and `per_page` can be used to restrict the list of references.
``` ```plaintext
GET /projects/:id/repository/commits/:sha/refs GET /projects/:id/repository/commits/:sha/refs
``` ```
...@@ -280,7 +280,7 @@ Example response: ...@@ -280,7 +280,7 @@ Example response:
Cherry picks a commit to a given branch. Cherry picks a commit to a given branch.
``` ```plaintext
POST /projects/:id/repository/commits/:sha/cherry_pick POST /projects/:id/repository/commits/:sha/cherry_pick
``` ```
...@@ -339,7 +339,7 @@ conflict. ...@@ -339,7 +339,7 @@ conflict.
Reverts a commit in a given branch. Reverts a commit in a given branch.
``` ```plaintext
POST /projects/:id/repository/commits/:sha/revert POST /projects/:id/repository/commits/:sha/revert
``` ```
...@@ -391,7 +391,7 @@ changeset was empty, likely due to the change having already been reverted. ...@@ -391,7 +391,7 @@ changeset was empty, likely due to the change having already been reverted.
Get the diff of a commit in a project. Get the diff of a commit in a project.
``` ```plaintext
GET /projects/:id/repository/commits/:sha/diff GET /projects/:id/repository/commits/:sha/diff
``` ```
...@@ -427,7 +427,7 @@ Example response: ...@@ -427,7 +427,7 @@ Example response:
Get the comments of a commit in a project. Get the comments of a commit in a project.
``` ```plaintext
GET /projects/:id/repository/commits/:sha/comments GET /projects/:id/repository/commits/:sha/comments
``` ```
...@@ -478,7 +478,7 @@ cases below is valid: ...@@ -478,7 +478,7 @@ cases below is valid:
In any of the above cases, the response of `line`, `line_type` and `path` is In any of the above cases, the response of `line`, `line_type` and `path` is
set to `null`. set to `null`.
``` ```plaintext
POST /projects/:id/repository/commits/:sha/comments POST /projects/:id/repository/commits/:sha/comments
``` ```
...@@ -524,7 +524,7 @@ Since GitLab 8.1, this is the new commit status API. ...@@ -524,7 +524,7 @@ Since GitLab 8.1, this is the new commit status API.
List the statuses of a commit in a project. List the statuses of a commit in a project.
The pagination parameters `page` and `per_page` can be used to restrict the list of references. The pagination parameters `page` and `per_page` can be used to restrict the list of references.
``` ```plaintext
GET /projects/:id/repository/commits/:sha/statuses GET /projects/:id/repository/commits/:sha/statuses
``` ```
...@@ -598,7 +598,7 @@ Example response: ...@@ -598,7 +598,7 @@ Example response:
Adds or updates a build status of a commit. Adds or updates a build status of a commit.
``` ```plaintext
POST /projects/:id/statuses/:sha POST /projects/:id/statuses/:sha
``` ```
...@@ -651,7 +651,7 @@ Example response: ...@@ -651,7 +651,7 @@ Example response:
Get a list of Merge Requests related to the specified commit. Get a list of Merge Requests related to the specified commit.
``` ```plaintext
GET /projects/:id/repository/commits/:sha/merge_requests GET /projects/:id/repository/commits/:sha/merge_requests
``` ```
...@@ -720,7 +720,7 @@ Example response: ...@@ -720,7 +720,7 @@ Example response:
Get the [GPG signature from a commit](../user/project/repository/gpg_signed_commits/index.md), Get the [GPG signature from a commit](../user/project/repository/gpg_signed_commits/index.md),
if it is signed. For unsigned commits, it results in a 404 response. if it is signed. For unsigned commits, it results in a 404 response.
``` ```plaintext
GET /projects/:id/repository/commits/:sha/signature GET /projects/:id/repository/commits/:sha/signature
``` ```
......
...@@ -10,7 +10,7 @@ This is the API docs of the [GitLab Container Registry](../user/packages/contain ...@@ -10,7 +10,7 @@ This is the API docs of the [GitLab Container Registry](../user/packages/contain
Get a list of registry repositories in a project. Get a list of registry repositories in a project.
``` ```plaintext
GET /projects/:id/registry/repositories GET /projects/:id/registry/repositories
``` ```
...@@ -50,7 +50,7 @@ Example response: ...@@ -50,7 +50,7 @@ Example response:
Get a list of registry repositories in a group. Get a list of registry repositories in a group.
``` ```plaintext
GET /groups/:id/registry/repositories GET /groups/:id/registry/repositories
``` ```
...@@ -116,7 +116,7 @@ Delete a repository in registry. ...@@ -116,7 +116,7 @@ Delete a repository in registry.
This operation is executed asynchronously and might take some time to get executed. This operation is executed asynchronously and might take some time to get executed.
``` ```plaintext
DELETE /projects/:id/registry/repositories/:repository_id DELETE /projects/:id/registry/repositories/:repository_id
``` ```
...@@ -135,7 +135,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://git ...@@ -135,7 +135,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://git
Get a list of tags for given registry repository. Get a list of tags for given registry repository.
``` ```plaintext
GET /projects/:id/registry/repositories/:repository_id/tags GET /projects/:id/registry/repositories/:repository_id/tags
``` ```
...@@ -169,7 +169,7 @@ Example response: ...@@ -169,7 +169,7 @@ Example response:
Get details of a registry repository tag. Get details of a registry repository tag.
``` ```plaintext
GET /projects/:id/registry/repositories/:repository_id/tags/:tag_name GET /projects/:id/registry/repositories/:repository_id/tags/:tag_name
``` ```
...@@ -202,7 +202,7 @@ Example response: ...@@ -202,7 +202,7 @@ Example response:
Delete a registry repository tag. Delete a registry repository tag.
``` ```plaintext
DELETE /projects/:id/registry/repositories/:repository_id/tags/:tag_name DELETE /projects/:id/registry/repositories/:repository_id/tags/:tag_name
``` ```
...@@ -223,7 +223,7 @@ This action does not delete blobs. In order to delete them and recycle disk spac ...@@ -223,7 +223,7 @@ This action does not delete blobs. In order to delete them and recycle disk spac
Delete registry repository tags in bulk based on given criteria. Delete registry repository tags in bulk based on given criteria.
``` ```plaintext
DELETE /projects/:id/registry/repositories/:repository_id/tags DELETE /projects/:id/registry/repositories/:repository_id/tags
``` ```
......
...@@ -9,7 +9,7 @@ which will be referred to as "resource" in this documentation. ...@@ -9,7 +9,7 @@ which will be referred to as "resource" in this documentation.
Get all custom attributes on a resource. Get all custom attributes on a resource.
``` ```plaintext
GET /users/:id/custom_attributes GET /users/:id/custom_attributes
GET /groups/:id/custom_attributes GET /groups/:id/custom_attributes
GET /projects/:id/custom_attributes GET /projects/:id/custom_attributes
...@@ -42,7 +42,7 @@ Example response: ...@@ -42,7 +42,7 @@ Example response:
Get a single custom attribute on a resource. Get a single custom attribute on a resource.
``` ```plaintext
GET /users/:id/custom_attributes/:key GET /users/:id/custom_attributes/:key
GET /groups/:id/custom_attributes/:key GET /groups/:id/custom_attributes/:key
GET /projects/:id/custom_attributes/:key GET /projects/:id/custom_attributes/:key
...@@ -71,7 +71,7 @@ Example response: ...@@ -71,7 +71,7 @@ Example response:
Set a custom attribute on a resource. The attribute will be updated if it already exists, Set a custom attribute on a resource. The attribute will be updated if it already exists,
or newly created otherwise. or newly created otherwise.
``` ```plaintext
PUT /users/:id/custom_attributes/:key PUT /users/:id/custom_attributes/:key
PUT /groups/:id/custom_attributes/:key PUT /groups/:id/custom_attributes/:key
PUT /projects/:id/custom_attributes/:key PUT /projects/:id/custom_attributes/:key
...@@ -100,7 +100,7 @@ Example response: ...@@ -100,7 +100,7 @@ Example response:
Delete a custom attribute on a resource. Delete a custom attribute on a resource.
``` ```plaintext
DELETE /users/:id/custom_attributes/:key DELETE /users/:id/custom_attributes/:key
DELETE /groups/:id/custom_attributes/:key DELETE /groups/:id/custom_attributes/:key
DELETE /projects/:id/custom_attributes/:key DELETE /projects/:id/custom_attributes/:key
......
...@@ -16,7 +16,7 @@ Get a list of project dependencies. This API partially mirroring ...@@ -16,7 +16,7 @@ Get a list of project dependencies. This API partially mirroring
This list can be generated only for [languages and package managers](../user/application_security/dependency_scanning/index.md#supported-languages-and-package-managers) This list can be generated only for [languages and package managers](../user/application_security/dependency_scanning/index.md#supported-languages-and-package-managers)
supported by Gemnasium. supported by Gemnasium.
``` ```plaintext
GET /projects/:id/dependencies GET /projects/:id/dependencies
GET /projects/:id/dependencies?package_manager=maven GET /projects/:id/dependencies?package_manager=maven
GET /projects/:id/dependencies?package_manager=yarn,bundler GET /projects/:id/dependencies?package_manager=yarn,bundler
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Get a list of all deploy keys across all projects of the GitLab instance. This endpoint requires admin access. Get a list of all deploy keys across all projects of the GitLab instance. This endpoint requires admin access.
``` ```plaintext
GET /deploy_keys GET /deploy_keys
``` ```
...@@ -35,7 +35,7 @@ Example response: ...@@ -35,7 +35,7 @@ Example response:
Get a list of a project's deploy keys. Get a list of a project's deploy keys.
``` ```plaintext
GET /projects/:id/deploy_keys GET /projects/:id/deploy_keys
``` ```
...@@ -72,7 +72,7 @@ Example response: ...@@ -72,7 +72,7 @@ Example response:
Get a single key. Get a single key.
``` ```plaintext
GET /projects/:id/deploy_keys/:key_id GET /projects/:id/deploy_keys/:key_id
``` ```
...@@ -106,7 +106,7 @@ Creates a new deploy key for a project. ...@@ -106,7 +106,7 @@ Creates a new deploy key for a project.
If the deploy key already exists in another project, it will be joined to current If the deploy key already exists in another project, it will be joined to current
project only if original one is accessible by the same user. project only if original one is accessible by the same user.
``` ```plaintext
POST /projects/:id/deploy_keys POST /projects/:id/deploy_keys
``` ```
...@@ -137,7 +137,7 @@ Example response: ...@@ -137,7 +137,7 @@ Example response:
Updates a deploy key for a project. Updates a deploy key for a project.
``` ```plaintext
PUT /projects/:id/deploy_keys/:key_id PUT /projects/:id/deploy_keys/:key_id
``` ```
...@@ -167,7 +167,7 @@ Example response: ...@@ -167,7 +167,7 @@ Example response:
Removes a deploy key from the project. If the deploy key is used only for this project, it will be deleted from the system. Removes a deploy key from the project. If the deploy key is used only for this project, it will be deleted from the system.
``` ```plaintext
DELETE /projects/:id/deploy_keys/:key_id DELETE /projects/:id/deploy_keys/:key_id
``` ```
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Get a list of deployments in a project. Get a list of deployments in a project.
``` ```plaintext
GET /projects/:id/deployments GET /projects/:id/deployments
``` ```
...@@ -177,7 +177,7 @@ Example of response ...@@ -177,7 +177,7 @@ Example of response
## Get a specific deployment ## Get a specific deployment
``` ```plaintext
GET /projects/:id/deployments/:deployment_id GET /projects/:id/deployments/:deployment_id
``` ```
...@@ -265,7 +265,7 @@ Example of response ...@@ -265,7 +265,7 @@ Example of response
## Create a deployment ## Create a deployment
``` ```plaintext
POST /projects/:id/deployments POST /projects/:id/deployments
``` ```
...@@ -319,7 +319,7 @@ Example of a response: ...@@ -319,7 +319,7 @@ Example of a response:
## Updating a deployment ## Updating a deployment
``` ```plaintext
PUT /projects/:id/deployments/:deployment_id PUT /projects/:id/deployments/:deployment_id
``` ```
...@@ -366,7 +366,7 @@ Example of a response: ...@@ -366,7 +366,7 @@ Example of a response:
This API retrieves the list of merge requests shipped with a given deployment: This API retrieves the list of merge requests shipped with a given deployment:
``` ```plaintext
GET /projects/:id/deployments/:deployment_id/merge_requests GET /projects/:id/deployments/:deployment_id/merge_requests
``` ```
......
...@@ -22,7 +22,7 @@ Read more on [pagination](README.md#pagination). ...@@ -22,7 +22,7 @@ Read more on [pagination](README.md#pagination).
Gets a list of all discussion items for a single issue. Gets a list of all discussion items for a single issue.
``` ```plaintext
GET /projects/:id/issues/:issue_iid/discussions GET /projects/:id/issues/:issue_iid/discussions
``` ```
...@@ -118,7 +118,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -118,7 +118,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single discussion item for a specific project issue Returns a single discussion item for a specific project issue
``` ```plaintext
GET /projects/:id/issues/:issue_iid/discussions/:discussion_id GET /projects/:id/issues/:issue_iid/discussions/:discussion_id
``` ```
...@@ -138,7 +138,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -138,7 +138,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Creates a new thread to a single project issue. This is similar to creating a note but other comments (replies) can be added to it later. Creates a new thread to a single project issue. This is similar to creating a note but other comments (replies) can be added to it later.
``` ```plaintext
POST /projects/:id/issues/:issue_iid/discussions POST /projects/:id/issues/:issue_iid/discussions
``` ```
...@@ -162,7 +162,7 @@ Adds a new note to the thread. This can also [create a thread from a single comm ...@@ -162,7 +162,7 @@ Adds a new note to the thread. This can also [create a thread from a single comm
**WARNING** **WARNING**
Notes can be added to other items than comments (system notes, etc.) making them threads. Notes can be added to other items than comments (system notes, etc.) making them threads.
``` ```plaintext
POST /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes POST /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes
``` ```
...@@ -185,7 +185,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -185,7 +185,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Modify existing thread note of an issue. Modify existing thread note of an issue.
``` ```plaintext
PUT /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id PUT /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id
``` ```
...@@ -207,7 +207,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab. ...@@ -207,7 +207,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing thread note of an issue. Deletes an existing thread note of an issue.
``` ```plaintext
DELETE /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id DELETE /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id
``` ```
...@@ -230,7 +230,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl ...@@ -230,7 +230,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Gets a list of all discussion items for a single snippet. Gets a list of all discussion items for a single snippet.
``` ```plaintext
GET /projects/:id/snippets/:snippet_id/discussions GET /projects/:id/snippets/:snippet_id/discussions
``` ```
...@@ -326,7 +326,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -326,7 +326,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single discussion item for a specific project snippet Returns a single discussion item for a specific project snippet
``` ```plaintext
GET /projects/:id/snippets/:snippet_id/discussions/:discussion_id GET /projects/:id/snippets/:snippet_id/discussions/:discussion_id
``` ```
...@@ -347,7 +347,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -347,7 +347,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Creates a new thread to a single project snippet. This is similar to creating Creates a new thread to a single project snippet. This is similar to creating
a note but other comments (replies) can be added to it later. a note but other comments (replies) can be added to it later.
``` ```plaintext
POST /projects/:id/snippets/:snippet_id/discussions POST /projects/:id/snippets/:snippet_id/discussions
``` ```
...@@ -368,7 +368,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -368,7 +368,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Adds a new note to the thread. Adds a new note to the thread.
``` ```plaintext
POST /projects/:id/snippets/:snippet_id/discussions/:discussion_id/notes POST /projects/:id/snippets/:snippet_id/discussions/:discussion_id/notes
``` ```
...@@ -391,7 +391,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -391,7 +391,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Modify existing thread note of a snippet. Modify existing thread note of a snippet.
``` ```plaintext
PUT /projects/:id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id PUT /projects/:id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id
``` ```
...@@ -413,7 +413,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab. ...@@ -413,7 +413,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing thread note of a snippet. Deletes an existing thread note of a snippet.
``` ```plaintext
DELETE /projects/:id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id DELETE /projects/:id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id
``` ```
...@@ -436,7 +436,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl ...@@ -436,7 +436,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Gets a list of all discussion items for a single epic. Gets a list of all discussion items for a single epic.
``` ```plaintext
GET /groups/:id/epics/:epic_id/discussions GET /groups/:id/epics/:epic_id/discussions
``` ```
...@@ -533,7 +533,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -533,7 +533,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single discussion item for a specific group epic Returns a single discussion item for a specific group epic
``` ```plaintext
GET /groups/:id/epics/:epic_id/discussions/:discussion_id GET /groups/:id/epics/:epic_id/discussions/:discussion_id
``` ```
...@@ -554,7 +554,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -554,7 +554,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Creates a new thread to a single group epic. This is similar to creating Creates a new thread to a single group epic. This is similar to creating
a note but but other comments (replies) can be added to it later. a note but but other comments (replies) can be added to it later.
``` ```plaintext
POST /groups/:id/epics/:epic_id/discussions POST /groups/:id/epics/:epic_id/discussions
``` ```
...@@ -576,7 +576,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -576,7 +576,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Adds a new note to the thread. This can also Adds a new note to the thread. This can also
[create a thread from a single comment](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment). [create a thread from a single comment](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment).
``` ```plaintext
POST /groups/:id/epics/:epic_id/discussions/:discussion_id/notes POST /groups/:id/epics/:epic_id/discussions/:discussion_id/notes
``` ```
...@@ -599,7 +599,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -599,7 +599,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Modify existing thread note of an epic. Modify existing thread note of an epic.
``` ```plaintext
PUT /groups/:id/epics/:epic_id/discussions/:discussion_id/notes/:note_id PUT /groups/:id/epics/:epic_id/discussions/:discussion_id/notes/:note_id
``` ```
...@@ -621,7 +621,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab. ...@@ -621,7 +621,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing thread note of an epic. Deletes an existing thread note of an epic.
``` ```plaintext
DELETE /groups/:id/epics/:epic_id/discussions/:discussion_id/notes/:note_id DELETE /groups/:id/epics/:epic_id/discussions/:discussion_id/notes/:note_id
``` ```
...@@ -644,7 +644,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl ...@@ -644,7 +644,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Gets a list of all discussion items for a single merge request. Gets a list of all discussion items for a single merge request.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/discussions GET /projects/:id/merge_requests/:merge_request_iid/discussions
``` ```
...@@ -793,7 +793,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -793,7 +793,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single discussion item for a specific project merge request Returns a single discussion item for a specific project merge request
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id GET /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id
``` ```
...@@ -814,7 +814,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -814,7 +814,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Creates a new thread to a single project merge request. This is similar to creating Creates a new thread to a single project merge request. This is similar to creating
a note but other comments (replies) can be added to it later. a note but other comments (replies) can be added to it later.
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/discussions POST /projects/:id/merge_requests/:merge_request_iid/discussions
``` ```
...@@ -848,7 +848,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -848,7 +848,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Resolve/unresolve whole thread of a merge request. Resolve/unresolve whole thread of a merge request.
``` ```plaintext
PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id
``` ```
...@@ -870,7 +870,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab. ...@@ -870,7 +870,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Adds a new note to the thread. This can also Adds a new note to the thread. This can also
[create a thread from a single comment](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment). [create a thread from a single comment](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment).
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes POST /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes
``` ```
...@@ -893,7 +893,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -893,7 +893,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Modify or resolve an existing thread note of a merge request. Modify or resolve an existing thread note of a merge request.
``` ```plaintext
PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id
``` ```
...@@ -922,7 +922,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab. ...@@ -922,7 +922,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing thread note of a merge request. Deletes an existing thread note of a merge request.
``` ```plaintext
DELETE /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id DELETE /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id
``` ```
...@@ -945,7 +945,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl ...@@ -945,7 +945,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Gets a list of all discussion items for a single commit. Gets a list of all discussion items for a single commit.
``` ```plaintext
GET /projects/:id/commits/:commit_id/discussions GET /projects/:id/commits/:commit_id/discussions
``` ```
...@@ -1086,7 +1086,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -1086,7 +1086,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single discussion item for a specific project commit Returns a single discussion item for a specific project commit
``` ```plaintext
GET /projects/:id/commits/:commit_id/discussions/:discussion_id GET /projects/:id/commits/:commit_id/discussions/:discussion_id
``` ```
...@@ -1107,7 +1107,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -1107,7 +1107,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Creates a new thread to a single project commit. This is similar to creating Creates a new thread to a single project commit. This is similar to creating
a note but other comments (replies) can be added to it later. a note but other comments (replies) can be added to it later.
``` ```plaintext
POST /projects/:id/commits/:commit_id/discussions POST /projects/:id/commits/:commit_id/discussions
``` ```
...@@ -1141,7 +1141,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -1141,7 +1141,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Adds a new note to the thread. Adds a new note to the thread.
``` ```plaintext
POST /projects/:id/commits/:commit_id/discussions/:discussion_id/notes POST /projects/:id/commits/:commit_id/discussions/:discussion_id/notes
``` ```
...@@ -1164,7 +1164,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -1164,7 +1164,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Modify or resolve an existing thread note of a commit. Modify or resolve an existing thread note of a commit.
``` ```plaintext
PUT /projects/:id/commits/:commit_id/discussions/:discussion_id/notes/:note_id PUT /projects/:id/commits/:commit_id/discussions/:discussion_id/notes/:note_id
``` ```
...@@ -1192,7 +1192,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab. ...@@ -1192,7 +1192,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing thread note of a commit. Deletes an existing thread note of a commit.
``` ```plaintext
DELETE /projects/:id/commits/:commit_id/discussions/:discussion_id/notes/:note_id DELETE /projects/:id/commits/:commit_id/discussions/:discussion_id/notes/:note_id
``` ```
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Get all environments for a given project. Get all environments for a given project.
``` ```plaintext
GET /projects/:id/environments GET /projects/:id/environments
``` ```
...@@ -34,7 +34,7 @@ Example response: ...@@ -34,7 +34,7 @@ Example response:
## Get a specific environment ## Get a specific environment
``` ```plaintext
GET /projects/:id/environments/:environment_id GET /projects/:id/environments/:environment_id
``` ```
...@@ -145,7 +145,7 @@ Creates a new environment with the given name and external_url. ...@@ -145,7 +145,7 @@ Creates a new environment with the given name and external_url.
It returns `201` if the environment was successfully created, `400` for wrong parameters. It returns `201` if the environment was successfully created, `400` for wrong parameters.
``` ```plaintext
POST /projects/:id/environments POST /projects/:id/environments
``` ```
...@@ -177,7 +177,7 @@ Updates an existing environment's name and/or external_url. ...@@ -177,7 +177,7 @@ Updates an existing environment's name and/or external_url.
It returns `200` if the environment was successfully updated. In case of an error, a status code `400` is returned. It returns `200` if the environment was successfully updated. In case of an error, a status code `400` is returned.
``` ```plaintext
PUT /projects/:id/environments/:environments_id PUT /projects/:id/environments/:environments_id
``` ```
...@@ -208,7 +208,7 @@ Example response: ...@@ -208,7 +208,7 @@ Example response:
It returns `204` if the environment was successfully deleted, and `404` if the environment does not exist. It returns `204` if the environment was successfully deleted, and `404` if the environment does not exist.
``` ```plaintext
DELETE /projects/:id/environments/:environment_id DELETE /projects/:id/environments/:environment_id
``` ```
...@@ -225,7 +225,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://git ...@@ -225,7 +225,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://git
It returns `200` if the environment was successfully stopped, and `404` if the environment does not exist. It returns `200` if the environment was successfully stopped, and `404` if the environment does not exist.
``` ```plaintext
POST /projects/:id/environments/:environment_id/stop POST /projects/:id/environments/:environment_id/stop
``` ```
......
...@@ -10,7 +10,7 @@ Epics are available only in Ultimate. If epics feature is not available a `403` ...@@ -10,7 +10,7 @@ Epics are available only in Ultimate. If epics feature is not available a `403`
Gets all issues that are assigned to an epic and the authenticated user has access to. Gets all issues that are assigned to an epic and the authenticated user has access to.
``` ```plaintext
GET /groups/:id/epics/:epic_iid/issues GET /groups/:id/epics/:epic_iid/issues
``` ```
...@@ -106,7 +106,7 @@ Example response: ...@@ -106,7 +106,7 @@ Example response:
Creates an epic - issue association. If the issue in question belongs to another epic it is unassigned from that epic. Creates an epic - issue association. If the issue in question belongs to another epic it is unassigned from that epic.
``` ```plaintext
POST /groups/:id/epics/:epic_iid/issues/:issue_id POST /groups/:id/epics/:epic_iid/issues/:issue_id
``` ```
...@@ -212,7 +212,7 @@ Example response: ...@@ -212,7 +212,7 @@ Example response:
Removes an epic - issue association. Removes an epic - issue association.
``` ```plaintext
DELETE /groups/:id/epics/:epic_iid/issues/:epic_issue_id DELETE /groups/:id/epics/:epic_iid/issues/:epic_issue_id
``` ```
...@@ -318,7 +318,7 @@ Example response: ...@@ -318,7 +318,7 @@ Example response:
Updates an epic - issue association. Updates an epic - issue association.
``` ```plaintext
PUT /groups/:id/epics/:epic_iid/issues/:epic_issue_id PUT /groups/:id/epics/:epic_iid/issues/:epic_issue_id
``` ```
......
...@@ -41,7 +41,7 @@ NOTE: **Note** ...@@ -41,7 +41,7 @@ NOTE: **Note**
Gets all epics of the requested group and its subgroups. Gets all epics of the requested group and its subgroups.
``` ```plaintext
GET /groups/:id/epics GET /groups/:id/epics
GET /groups/:id/epics?author_id=5 GET /groups/:id/epics?author_id=5
GET /groups/:id/epics?labels=bug,reproduced GET /groups/:id/epics?labels=bug,reproduced
...@@ -160,7 +160,7 @@ Example response: ...@@ -160,7 +160,7 @@ Example response:
Gets a single epic Gets a single epic
``` ```plaintext
GET /groups/:id/epics/:epic_iid GET /groups/:id/epics/:epic_iid
``` ```
...@@ -228,7 +228,7 @@ Starting with GitLab [11.3][ee-6448], `start_date` and `end_date` should no long ...@@ -228,7 +228,7 @@ Starting with GitLab [11.3][ee-6448], `start_date` and `end_date` should no long
directly, as they now represent composite values. You can configure it via the `*_is_fixed` and directly, as they now represent composite values. You can configure it via the `*_is_fixed` and
`*_fixed` fields instead. `*_fixed` fields instead.
``` ```plaintext
POST /groups/:id/epics POST /groups/:id/epics
``` ```
...@@ -302,7 +302,7 @@ Starting with GitLab [11.3][ee-6448], `start_date` and `end_date` should no long ...@@ -302,7 +302,7 @@ Starting with GitLab [11.3][ee-6448], `start_date` and `end_date` should no long
directly, as they now represent composite values. You can configure it via the `*_is_fixed` and directly, as they now represent composite values. You can configure it via the `*_is_fixed` and
`*_fixed` fields instead. `*_fixed` fields instead.
``` ```plaintext
PUT /groups/:id/epics/:epic_iid PUT /groups/:id/epics/:epic_iid
``` ```
...@@ -372,7 +372,7 @@ Example response: ...@@ -372,7 +372,7 @@ Example response:
Deletes an epic Deletes an epic
``` ```plaintext
DELETE /groups/:id/epics/:epic_iid DELETE /groups/:id/epics/:epic_iid
``` ```
...@@ -391,7 +391,7 @@ Manually creates a todo for the current user on an epic. If ...@@ -391,7 +391,7 @@ Manually creates a todo for the current user on an epic. If
there already exists a todo for the user on that epic, status code `304` is there already exists a todo for the user on that epic, status code `304` is
returned. returned.
``` ```plaintext
POST /groups/:id/epics/:epic_iid/todo POST /groups/:id/epics/:epic_iid/todo
``` ```
......
...@@ -8,7 +8,7 @@ The project settings API allows you to retrieve the Error Tracking settings for ...@@ -8,7 +8,7 @@ The project settings API allows you to retrieve the Error Tracking settings for
### Get Error Tracking settings ### Get Error Tracking settings
``` ```plaintext
GET /projects/:id/error_tracking/settings GET /projects/:id/error_tracking/settings
``` ```
...@@ -35,7 +35,7 @@ Example response: ...@@ -35,7 +35,7 @@ Example response:
The API allows you to enable or disable the Error Tracking settings for a project. Only for project maintainers. The API allows you to enable or disable the Error Tracking settings for a project. Only for project maintainers.
``` ```plaintext
PATCH /projects/:id/error_tracking/settings PATCH /projects/:id/error_tracking/settings
``` ```
......
...@@ -38,7 +38,7 @@ Note that these options are downcased. ...@@ -38,7 +38,7 @@ Note that these options are downcased.
Dates for the `before` and `after` parameters should be supplied in the following format: Dates for the `before` and `after` parameters should be supplied in the following format:
``` ```plaintext
YYYY-MM-DD YYYY-MM-DD
``` ```
...@@ -54,7 +54,7 @@ GitLab removes events older than 2 years from the events table for performance r ...@@ -54,7 +54,7 @@ GitLab removes events older than 2 years from the events table for performance r
Get a list of events for the authenticated user. Scope `read_user` or `api` is required. Get a list of events for the authenticated user. Scope `read_user` or `api` is required.
``` ```plaintext
GET /events GET /events
``` ```
...@@ -128,7 +128,7 @@ Example response: ...@@ -128,7 +128,7 @@ Example response:
Get the contribution events for the specified user, sorted from newest to oldest. Scope `read_user` or `api` is required. Get the contribution events for the specified user, sorted from newest to oldest. Scope `read_user` or `api` is required.
``` ```plaintext
GET /users/:id/events GET /users/:id/events
``` ```
...@@ -259,7 +259,7 @@ Example response: ...@@ -259,7 +259,7 @@ Example response:
Get a list of visible events for a particular project. Get a list of visible events for a particular project.
``` ```plaintext
GET /projects/:project_id/events GET /projects/:project_id/events
``` ```
......
...@@ -16,7 +16,7 @@ For instance, there are two specs, `staging` and `production`, for a feature fla ...@@ -16,7 +16,7 @@ For instance, there are two specs, `staging` and `production`, for a feature fla
When you pass `production` as a parameter to this endpoint, the system returns When you pass `production` as a parameter to this endpoint, the system returns
the `production` feature flag spec only. the `production` feature flag spec only.
``` ```plaintext
GET /projects/:id/feature_flag_scopes GET /projects/:id/feature_flag_scopes
``` ```
...@@ -84,7 +84,7 @@ Example response: ...@@ -84,7 +84,7 @@ Example response:
Get all specs of a feature flag. Get all specs of a feature flag.
``` ```plaintext
GET /projects/:id/feature_flags/:name/scopes GET /projects/:id/feature_flags/:name/scopes
``` ```
...@@ -147,7 +147,7 @@ Example response: ...@@ -147,7 +147,7 @@ Example response:
Creates a new feature flag spec. Creates a new feature flag spec.
``` ```plaintext
POST /projects/:id/feature_flags/:name/scopes POST /projects/:id/feature_flags/:name/scopes
``` ```
...@@ -194,7 +194,7 @@ Example response: ...@@ -194,7 +194,7 @@ Example response:
Gets a single feature flag spec. Gets a single feature flag spec.
``` ```plaintext
GET /projects/:id/feature_flags/:name/scopes/:environment_scope GET /projects/:id/feature_flags/:name/scopes/:environment_scope
``` ```
...@@ -230,7 +230,7 @@ Example response: ...@@ -230,7 +230,7 @@ Example response:
Updates an existing feature flag spec. Updates an existing feature flag spec.
``` ```plaintext
PUT /projects/:id/feature_flags/:name/scopes/:environment_scope PUT /projects/:id/feature_flags/:name/scopes/:environment_scope
``` ```
...@@ -276,7 +276,7 @@ Example response: ...@@ -276,7 +276,7 @@ Example response:
Deletes a feature flag spec. Deletes a feature flag spec.
``` ```plaintext
DELETE /projects/:id/feature_flags/:name/scopes/:environment_scope DELETE /projects/:id/feature_flags/:name/scopes/:environment_scope
``` ```
......
...@@ -9,7 +9,7 @@ values. ...@@ -9,7 +9,7 @@ values.
Get a list of all persisted features, with its gate values. Get a list of all persisted features, with its gate values.
``` ```plaintext
GET /features GET /features
``` ```
...@@ -50,7 +50,7 @@ Set a feature's gate value. If a feature with the given name doesn't exist yet ...@@ -50,7 +50,7 @@ Set a feature's gate value. If a feature with the given name doesn't exist yet
it will be created. The value can be a boolean, or an integer to indicate it will be created. The value can be a boolean, or an integer to indicate
percentage of time. percentage of time.
``` ```plaintext
POST /features/:name POST /features/:name
``` ```
...@@ -93,6 +93,6 @@ Example response: ...@@ -93,6 +93,6 @@ Example response:
Removes a feature gate. Response is equal when the gate exists, or doesn't. Removes a feature gate. Response is equal when the gate exists, or doesn't.
``` ```plaintext
DELETE /features/:name DELETE /features/:name
``` ```
...@@ -7,7 +7,7 @@ as an admin. ...@@ -7,7 +7,7 @@ as an admin.
Creates a new Geo node. Creates a new Geo node.
``` ```plaintext
POST /geo_nodes POST /geo_nodes
``` ```
...@@ -68,7 +68,7 @@ Example response: ...@@ -68,7 +68,7 @@ Example response:
## Retrieve configuration about all Geo nodes ## Retrieve configuration about all Geo nodes
``` ```plaintext
GET /geo_nodes GET /geo_nodes
``` ```
...@@ -135,7 +135,7 @@ Example response: ...@@ -135,7 +135,7 @@ Example response:
## Retrieve configuration about a specific Geo node ## Retrieve configuration about a specific Geo node
``` ```plaintext
GET /geo_nodes/:id GET /geo_nodes/:id
``` ```
...@@ -178,7 +178,7 @@ Updates settings of an existing Geo node. ...@@ -178,7 +178,7 @@ Updates settings of an existing Geo node.
_This can only be run against a primary Geo node._ _This can only be run against a primary Geo node._
``` ```plaintext
PUT /geo_nodes/:id PUT /geo_nodes/:id
``` ```
...@@ -237,7 +237,7 @@ Removes the Geo node. ...@@ -237,7 +237,7 @@ Removes the Geo node.
NOTE: **Note:** NOTE: **Note:**
Only a Geo primary node will accept this request. Only a Geo primary node will accept this request.
``` ```plaintext
DELETE /geo_nodes/:id DELETE /geo_nodes/:id
``` ```
...@@ -251,7 +251,7 @@ To repair the OAuth authentication of a Geo node. ...@@ -251,7 +251,7 @@ To repair the OAuth authentication of a Geo node.
_This can only be run against a primary Geo node._ _This can only be run against a primary Geo node._
``` ```plaintext
POST /geo_nodes/:id/repair POST /geo_nodes/:id/repair
``` ```
...@@ -282,7 +282,7 @@ Example response: ...@@ -282,7 +282,7 @@ Example response:
## Retrieve status about all Geo nodes ## Retrieve status about all Geo nodes
``` ```plaintext
GET /geo_nodes/status GET /geo_nodes/status
``` ```
...@@ -441,7 +441,7 @@ In GitLab 12.0, deprecated fields `wikis_count` and `repositories_count` were re ...@@ -441,7 +441,7 @@ In GitLab 12.0, deprecated fields `wikis_count` and `repositories_count` were re
## Retrieve status about a specific Geo node ## Retrieve status about a specific Geo node
``` ```plaintext
GET /geo_nodes/:id/status GET /geo_nodes/:id/status
``` ```
...@@ -512,7 +512,7 @@ In GitLab 12.0, deprecated fields `wikis_count` and `repositories_count` were re ...@@ -512,7 +512,7 @@ In GitLab 12.0, deprecated fields `wikis_count` and `repositories_count` were re
This only works on a secondary node. This only works on a secondary node.
``` ```plaintext
GET /geo_nodes/current/failures GET /geo_nodes/current/failures
``` ```
......
...@@ -19,7 +19,7 @@ from the first group's project by creation date. If the group hasn't got any pro ...@@ -19,7 +19,7 @@ from the first group's project by creation date. If the group hasn't got any pro
Gets a list of a group's badges. Gets a list of a group's badges.
``` ```plaintext
GET /groups/:id/badges GET /groups/:id/badges
``` ```
...@@ -52,7 +52,7 @@ Example response: ...@@ -52,7 +52,7 @@ Example response:
Gets a badge of a group. Gets a badge of a group.
``` ```plaintext
GET /groups/:id/badges/:badge_id GET /groups/:id/badges/:badge_id
``` ```
...@@ -82,7 +82,7 @@ Example response: ...@@ -82,7 +82,7 @@ Example response:
Adds a badge to a group. Adds a badge to a group.
``` ```plaintext
POST /groups/:id/badges POST /groups/:id/badges
``` ```
...@@ -113,7 +113,7 @@ Example response: ...@@ -113,7 +113,7 @@ Example response:
Updates a badge of a group. Updates a badge of a group.
``` ```plaintext
PUT /groups/:id/badges/:badge_id PUT /groups/:id/badges/:badge_id
``` ```
...@@ -145,7 +145,7 @@ Example response: ...@@ -145,7 +145,7 @@ Example response:
Removes a badge from a group. Removes a badge from a group.
``` ```plaintext
DELETE /groups/:id/badges/:badge_id DELETE /groups/:id/badges/:badge_id
``` ```
...@@ -162,7 +162,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl ...@@ -162,7 +162,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 /groups/:id/badges/render GET /groups/:id/badges/render
``` ```
......
...@@ -9,7 +9,7 @@ request will result in `404` status code. ...@@ -9,7 +9,7 @@ request will result in `404` status code.
Lists Issue Boards in the given group. Lists Issue Boards in the given group.
``` ```plaintext
GET /groups/:id/boards GET /groups/:id/boards
``` ```
...@@ -126,7 +126,7 @@ Example response: ...@@ -126,7 +126,7 @@ Example response:
Gets a single group issue board. Gets a single group issue board.
``` ```plaintext
GET /groups/:id/boards/:board_id GET /groups/:id/boards/:board_id
``` ```
...@@ -240,7 +240,7 @@ Example response: ...@@ -240,7 +240,7 @@ Example response:
Creates a Group Issue Board. Creates a Group Issue Board.
``` ```plaintext
POST /groups/:id/boards POST /groups/:id/boards
``` ```
...@@ -306,7 +306,7 @@ Example response: ...@@ -306,7 +306,7 @@ Example response:
Updates a Group Issue Board. Updates a Group Issue Board.
``` ```plaintext
PUT /groups/:id/boards/:board_id PUT /groups/:id/boards/:board_id
``` ```
...@@ -372,7 +372,7 @@ Example response: ...@@ -372,7 +372,7 @@ Example response:
Deletes a Group Issue Board. Deletes a Group Issue Board.
``` ```plaintext
DELETE /groups/:id/boards/:board_id DELETE /groups/:id/boards/:board_id
``` ```
...@@ -390,7 +390,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl ...@@ -390,7 +390,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Get a list of the board's lists. Get a list of the board's lists.
Does not include `open` and `closed` lists Does not include `open` and `closed` lists
``` ```plaintext
GET /groups/:id/boards/:board_id/lists GET /groups/:id/boards/:board_id/lists
``` ```
...@@ -441,7 +441,7 @@ Example response: ...@@ -441,7 +441,7 @@ Example response:
Get a single board list. Get a single board list.
``` ```plaintext
GET /groups/:id/boards/:board_id/lists/:list_id GET /groups/:id/boards/:board_id/lists/:list_id
``` ```
...@@ -473,7 +473,7 @@ Example response: ...@@ -473,7 +473,7 @@ Example response:
Creates a new Issue Board list. Creates a new Issue Board list.
``` ```plaintext
POST /groups/:id/boards/:board_id/lists POST /groups/:id/boards/:board_id/lists
``` ```
...@@ -514,7 +514,7 @@ Example response: ...@@ -514,7 +514,7 @@ Example response:
Updates an existing Issue Board list. This call is used to change list position. Updates an existing Issue Board list. This call is used to change list position.
``` ```plaintext
PUT /groups/:id/boards/:board_id/lists/:list_id PUT /groups/:id/boards/:board_id/lists/:list_id
``` ```
...@@ -547,7 +547,7 @@ Example response: ...@@ -547,7 +547,7 @@ Example response:
Only for admins and group owners. Deletes the board list in question. Only for admins and group owners. Deletes the board list in question.
``` ```plaintext
DELETE /groups/:id/boards/:board_id/lists/:list_id DELETE /groups/:id/boards/:board_id/lists/:list_id
``` ```
......
...@@ -10,7 +10,7 @@ User will need at least maintainer access for the group to use these endpoints. ...@@ -10,7 +10,7 @@ User will need at least maintainer access for the group to use these endpoints.
Returns a list of group clusters. Returns a list of group clusters.
``` ```plaintext
GET /groups/:id/clusters GET /groups/:id/clusters
``` ```
...@@ -77,7 +77,7 @@ Example response: ...@@ -77,7 +77,7 @@ Example response:
Gets a single group cluster. Gets a single group cluster.
``` ```plaintext
GET /groups/:id/clusters/:cluster_id GET /groups/:id/clusters/:cluster_id
``` ```
...@@ -144,7 +144,7 @@ Example response: ...@@ -144,7 +144,7 @@ Example response:
Adds an existing Kubernetes cluster to the group. Adds an existing Kubernetes cluster to the group.
``` ```plaintext
POST /groups/:id/clusters/user POST /groups/:id/clusters/user
``` ```
...@@ -213,7 +213,7 @@ Example response: ...@@ -213,7 +213,7 @@ Example response:
Updates an existing group cluster. Updates an existing group cluster.
``` ```plaintext
PUT /groups/:id/clusters/:cluster_id PUT /groups/:id/clusters/:cluster_id
``` ```
...@@ -287,14 +287,13 @@ Example response: ...@@ -287,14 +287,13 @@ Example response:
"web_url":"https://gitlab.example.com/group-with-clusters-api" "web_url":"https://gitlab.example.com/group-with-clusters-api"
} }
} }
``` ```
## Delete group cluster ## Delete group cluster
Deletes an existing group cluster. Deletes an existing group cluster.
``` ```plaintext
DELETE /groups/:id/clusters/:cluster_id DELETE /groups/:id/clusters/:cluster_id
``` ```
......
...@@ -19,7 +19,7 @@ Group exports include the following: ...@@ -19,7 +19,7 @@ Group exports include the following:
Start a new group export. Start a new group export.
```text ```plaintext
POST /groups/:id/export POST /groups/:id/export
``` ```
......
...@@ -11,7 +11,7 @@ The `description_html` - was added to response JSON in [GitLab 12.7](https://git ...@@ -11,7 +11,7 @@ The `description_html` - was added to response JSON in [GitLab 12.7](https://git
Get all labels for a given group. Get all labels for a given group.
``` ```plaintext
GET /groups/:id/labels GET /groups/:id/labels
``` ```
...@@ -60,7 +60,7 @@ Example response: ...@@ -60,7 +60,7 @@ Example response:
Get a single label for a given group. Get a single label for a given group.
``` ```plaintext
GET /groups/:id/labels/:label_id GET /groups/:id/labels/:label_id
``` ```
...@@ -95,7 +95,7 @@ Example response: ...@@ -95,7 +95,7 @@ Example response:
Create a new group label for a given group. Create a new group label for a given group.
``` ```plaintext
POST /groups/:id/labels POST /groups/:id/labels
``` ```
...@@ -131,7 +131,7 @@ Example response: ...@@ -131,7 +131,7 @@ Example response:
Updates an existing group label. At least one parameter is required, to update the group label. Updates an existing group label. At least one parameter is required, to update the group label.
``` ```plaintext
PUT /groups/:id/labels/:label_id PUT /groups/:id/labels/:label_id
``` ```
...@@ -170,7 +170,7 @@ NOTE: **Note:** An older endpoint `PUT /groups/:id/labels` with `name` in the pa ...@@ -170,7 +170,7 @@ NOTE: **Note:** An older endpoint `PUT /groups/:id/labels` with `name` in the pa
Deletes a group label with a given name. Deletes a group label with a given name.
``` ```plaintext
DELETE /groups/:id/labels/:label_id DELETE /groups/:id/labels/:label_id
``` ```
...@@ -190,7 +190,7 @@ NOTE: **Note:** An older endpoint `DELETE /groups/:id/labels` with `name` in the ...@@ -190,7 +190,7 @@ NOTE: **Note:** An older endpoint `DELETE /groups/:id/labels` with `name` in the
Subscribes the authenticated user to a group label to receive notifications. If Subscribes the authenticated user to a group label to receive notifications. If
the user is already subscribed to the label, the status code `304` is returned. the user is already subscribed to the label, the status code `304` is returned.
``` ```plaintext
POST /groups/:id/labels/:label_id/subscribe POST /groups/:id/labels/:label_id/subscribe
``` ```
...@@ -226,7 +226,7 @@ Unsubscribes the authenticated user from a group label to not receive ...@@ -226,7 +226,7 @@ Unsubscribes the authenticated user from a group label to not receive
notifications from it. If the user is not subscribed to the label, the status notifications from it. If the user is not subscribed to the label, the status
code `304` is returned. code `304` is returned.
``` ```plaintext
POST /groups/:id/labels/:label_id/unsubscribe POST /groups/:id/labels/:label_id/unsubscribe
``` ```
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
Get list of a group's variables. Get list of a group's variables.
``` ```plaintext
GET /groups/:id/variables GET /groups/:id/variables
``` ```
...@@ -14,7 +14,7 @@ GET /groups/:id/variables ...@@ -14,7 +14,7 @@ GET /groups/:id/variables
|-----------|---------|----------|---------------------| |-----------|---------|----------|---------------------|
| `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
``` ```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables"
``` ```
...@@ -41,7 +41,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a ...@@ -41,7 +41,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
Get the details of a group's specific variable. Get the details of a group's specific variable.
``` ```plaintext
GET /groups/:id/variables/:key GET /groups/:id/variables/:key
``` ```
...@@ -50,7 +50,7 @@ GET /groups/:id/variables/:key ...@@ -50,7 +50,7 @@ GET /groups/:id/variables/:key
| `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable | | `key` | string | yes | The `key` of a variable |
``` ```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/TEST_VARIABLE_1" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/TEST_VARIABLE_1"
``` ```
...@@ -68,7 +68,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a ...@@ -68,7 +68,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
Create a new variable. Create a new variable.
``` ```plaintext
POST /groups/:id/variables POST /groups/:id/variables
``` ```
...@@ -81,7 +81,7 @@ POST /groups/:id/variables ...@@ -81,7 +81,7 @@ POST /groups/:id/variables
| `protected` | boolean | no | Whether the variable is protected | | `protected` | boolean | no | Whether the variable is protected |
| `masked` | boolean | no | Whether the variable is masked | | `masked` | boolean | no | Whether the variable is masked |
``` ```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables" --form "key=NEW_VARIABLE" --form "value=new value" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables" --form "key=NEW_VARIABLE" --form "value=new value"
``` ```
...@@ -99,7 +99,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitla ...@@ -99,7 +99,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitla
Update a group's variable. Update a group's variable.
``` ```plaintext
PUT /groups/:id/variables/:key PUT /groups/:id/variables/:key
``` ```
...@@ -112,7 +112,7 @@ PUT /groups/:id/variables/:key ...@@ -112,7 +112,7 @@ PUT /groups/:id/variables/:key
| `protected` | boolean | no | Whether the variable is protected | | `protected` | boolean | no | Whether the variable is protected |
| `masked` | boolean | no | Whether the variable is masked | | `masked` | boolean | no | Whether the variable is masked |
``` ```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/NEW_VARIABLE" --form "value=updated value" curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/NEW_VARIABLE" --form "value=updated value"
``` ```
...@@ -130,7 +130,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab ...@@ -130,7 +130,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab
Remove a group's variable. Remove a group's variable.
``` ```plaintext
DELETE /groups/:id/variables/:key DELETE /groups/:id/variables/:key
``` ```
...@@ -139,7 +139,7 @@ DELETE /groups/:id/variables/:key ...@@ -139,7 +139,7 @@ DELETE /groups/:id/variables/:key
| `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable | | `key` | string | yes | The `key` of a variable |
``` ```shell
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/VARIABLE_1" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/VARIABLE_1"
``` ```
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
Returns a list of group milestones. Returns a list of group milestones.
``` ```plaintext
GET /groups/:id/milestones GET /groups/:id/milestones
GET /groups/:id/milestones?iids[]=42 GET /groups/:id/milestones?iids[]=42
GET /groups/:id/milestones?iids[]=42&iids[]=43 GET /groups/:id/milestones?iids[]=42&iids[]=43
...@@ -53,7 +53,7 @@ Example Response: ...@@ -53,7 +53,7 @@ Example Response:
Gets a single group milestone. Gets a single group milestone.
``` ```plaintext
GET /groups/:id/milestones/:milestone_id GET /groups/:id/milestones/:milestone_id
``` ```
...@@ -66,7 +66,7 @@ Parameters: ...@@ -66,7 +66,7 @@ Parameters:
Creates a new group milestone. Creates a new group milestone.
``` ```plaintext
POST /groups/:id/milestones POST /groups/:id/milestones
``` ```
...@@ -82,7 +82,7 @@ Parameters: ...@@ -82,7 +82,7 @@ Parameters:
Updates an existing group milestone. Updates an existing group milestone.
``` ```plaintext
PUT /groups/:id/milestones/:milestone_id PUT /groups/:id/milestones/:milestone_id
``` ```
...@@ -100,7 +100,7 @@ Parameters: ...@@ -100,7 +100,7 @@ Parameters:
Only for users with Developer access to the group. Only for users with Developer access to the group.
``` ```plaintext
DELETE /groups/:id/milestones/:milestone_id DELETE /groups/:id/milestones/:milestone_id
``` ```
...@@ -113,7 +113,7 @@ Parameters: ...@@ -113,7 +113,7 @@ Parameters:
Gets all issues assigned to a single group milestone. Gets all issues assigned to a single group milestone.
``` ```plaintext
GET /groups/:id/milestones/:milestone_id/issues GET /groups/:id/milestones/:milestone_id/issues
``` ```
...@@ -126,7 +126,7 @@ Parameters: ...@@ -126,7 +126,7 @@ Parameters:
Gets all merge requests assigned to a single group milestone. Gets all merge requests assigned to a single group milestone.
``` ```plaintext
GET /groups/:id/milestones/:milestone_id/merge_requests GET /groups/:id/milestones/:milestone_id/merge_requests
``` ```
...@@ -143,7 +143,7 @@ Parameters: ...@@ -143,7 +143,7 @@ Parameters:
Get all burndown chart events for a single milestone. Get all burndown chart events for a single milestone.
``` ```plaintext
GET /groups/:id/milestones/:milestone_id/burndown_events GET /groups/:id/milestones/:milestone_id/burndown_events
``` ```
......
...@@ -21,7 +21,7 @@ Parameters: ...@@ -21,7 +21,7 @@ Parameters:
| `owned` | boolean | no | Limit to groups explicitly owned by the current user | | `owned` | boolean | no | Limit to groups explicitly owned by the current user |
| `min_access_level` | integer | no | Limit to groups where current user has at least this [access level](members.md) | | `min_access_level` | integer | no | Limit to groups where current user has at least this [access level](members.md) |
``` ```plaintext
GET /groups GET /groups
``` ```
...@@ -55,7 +55,7 @@ GET /groups ...@@ -55,7 +55,7 @@ GET /groups
When adding the parameter `statistics=true` and the authenticated user is an admin, additional group statistics are returned. When adding the parameter `statistics=true` and the authenticated user is an admin, additional group statistics are returned.
``` ```plaintext
GET /groups?statistics=true GET /groups?statistics=true
``` ```
...@@ -99,7 +99,7 @@ You can search for groups by name or path, see below. ...@@ -99,7 +99,7 @@ You can search for groups by name or path, see below.
You can filter by [custom attributes](custom_attributes.md) with: You can filter by [custom attributes](custom_attributes.md) with:
``` ```plaintext
GET /groups?custom_attributes[key]=value&custom_attributes[other_key]=other_value GET /groups?custom_attributes[key]=value&custom_attributes[other_key]=other_value
``` ```
...@@ -127,7 +127,7 @@ Parameters: ...@@ -127,7 +127,7 @@ Parameters:
| `owned` | boolean | no | Limit to groups explicitly owned by the current user | | `owned` | boolean | no | Limit to groups explicitly owned by the current user |
| `min_access_level` | integer | no | Limit to groups where current user has at least this [access level](members.md) | | `min_access_level` | integer | no | Limit to groups where current user has at least this [access level](members.md) |
``` ```plaintext
GET /groups/:id/subgroups GET /groups/:id/subgroups
``` ```
...@@ -165,7 +165,7 @@ Get a list of projects in this group. When accessed without authentication, only ...@@ -165,7 +165,7 @@ Get a list of projects in this group. When accessed without authentication, only
By default, this request returns 20 results at a time because the API results [are paginated](README.md#pagination). By default, this request returns 20 results at a time because the API results [are paginated](README.md#pagination).
``` ```plaintext
GET /groups/:id/projects GET /groups/:id/projects
``` ```
...@@ -239,7 +239,7 @@ Example response: ...@@ -239,7 +239,7 @@ Example response:
Get all details of a group. This endpoint can be accessed without authentication Get all details of a group. This endpoint can be accessed without authentication
if the group is publicly accessible. In case the user that requests is admin of the group, it will return the `runners_token` for the group too. if the group is publicly accessible. In case the user that requests is admin of the group, it will return the `runners_token` for the group too.
``` ```plaintext
GET /groups/:id GET /groups/:id
``` ```
...@@ -470,7 +470,7 @@ Feature.disable(:limit_projects_in_groups_api) ...@@ -470,7 +470,7 @@ Feature.disable(:limit_projects_in_groups_api)
Creates a new project group. Available only for users who can create groups. Creates a new project group. Available only for users who can create groups.
``` ```plaintext
POST /groups POST /groups
``` ```
...@@ -500,7 +500,7 @@ Parameters: ...@@ -500,7 +500,7 @@ Parameters:
Transfer a project to the Group namespace. Available only to instance administrators, although an [alternative API endpoint](projects.md#transfer-a-project-to-a-new-namespace) is available which does not require instance administrator access. Transferring projects may fail when tagged packages exist in the project's repository. Transfer a project to the Group namespace. Available only to instance administrators, although an [alternative API endpoint](projects.md#transfer-a-project-to-a-new-namespace) is available which does not require instance administrator access. Transferring projects may fail when tagged packages exist in the project's repository.
``` ```plaintext
POST /groups/:id/projects/:project_id POST /groups/:id/projects/:project_id
``` ```
...@@ -519,7 +519,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -519,7 +519,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Updates the project group. Only available to group owners and administrators. Updates the project group. Only available to group owners and administrators.
``` ```plaintext
PUT /groups/:id PUT /groups/:id
``` ```
...@@ -548,7 +548,6 @@ PUT /groups/:id ...@@ -548,7 +548,6 @@ PUT /groups/:id
```shell ```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5?name=Experimental" curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5?name=Experimental"
``` ```
This endpoint returns: This endpoint returns:
...@@ -639,7 +638,7 @@ This endpoint either: ...@@ -639,7 +638,7 @@ This endpoint either:
- Removes group, and queues a background job to delete all projects in the group as well. - Removes group, and queues a background job to delete all projects in the group as well.
- Since [GitLab 12.8](https://gitlab.com/gitlab-org/gitlab/issues/33257), on [Premium or Silver](https://about.gitlab.com/pricing/) or higher tiers, marks a group for deletion. The deletion will happen 7 days later by default, but this can be changed in the [instance settings](../user/admin_area/settings/visibility_and_access_controls.md#default-deletion-adjourned-period-premium-only). - Since [GitLab 12.8](https://gitlab.com/gitlab-org/gitlab/issues/33257), on [Premium or Silver](https://about.gitlab.com/pricing/) or higher tiers, marks a group for deletion. The deletion will happen 7 days later by default, but this can be changed in the [instance settings](../user/admin_area/settings/visibility_and_access_controls.md#default-deletion-adjourned-period-premium-only).
``` ```plaintext
DELETE /groups/:id DELETE /groups/:id
``` ```
...@@ -671,7 +670,7 @@ Parameters: ...@@ -671,7 +670,7 @@ Parameters:
Get all groups that match your string in their name or path. Get all groups that match your string in their name or path.
``` ```plaintext
GET /groups?search=foobar GET /groups?search=foobar
``` ```
...@@ -695,7 +694,7 @@ These are different from [System Hooks](system_hooks.md) that are system wide an ...@@ -695,7 +694,7 @@ These are different from [System Hooks](system_hooks.md) that are system wide an
Get a list of group hooks Get a list of group hooks
``` ```plaintext
GET /groups/:id/hooks GET /groups/:id/hooks
``` ```
...@@ -712,7 +711,7 @@ Get a specific hook for a group. ...@@ -712,7 +711,7 @@ Get a specific hook for a group.
| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) | | `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) |
| `hook_id` | integer | yes | The ID of a group hook | | `hook_id` | integer | yes | The ID of a group hook |
``` ```plaintext
GET /groups/:id/hooks/:hook_id GET /groups/:id/hooks/:hook_id
``` ```
...@@ -739,7 +738,7 @@ GET /groups/:id/hooks/:hook_id ...@@ -739,7 +738,7 @@ GET /groups/:id/hooks/:hook_id
Adds a hook to a specified group. Adds a hook to a specified group.
``` ```plaintext
POST /groups/:id/hooks POST /groups/:id/hooks
``` ```
...@@ -763,7 +762,7 @@ POST /groups/:id/hooks ...@@ -763,7 +762,7 @@ POST /groups/:id/hooks
Edits a hook for a specified group. Edits a hook for a specified group.
``` ```plaintext
PUT /groups/:id/hooks/:hook_id PUT /groups/:id/hooks/:hook_id
``` ```
...@@ -789,7 +788,7 @@ PUT /groups/:id/hooks/:hook_id ...@@ -789,7 +788,7 @@ PUT /groups/:id/hooks/:hook_id
Removes a hook from a group. This is an idempotent method and can be called multiple times. Removes a hook from a group. This is an idempotent method and can be called multiple times.
Either the hook is available or not. Either the hook is available or not.
``` ```plaintext
DELETE /groups/:id/hooks/:hook_id DELETE /groups/:id/hooks/:hook_id
``` ```
...@@ -806,7 +805,7 @@ Group audit events can be accessed via the [Group Audit Events API](audit_events ...@@ -806,7 +805,7 @@ Group audit events can be accessed via the [Group Audit Events API](audit_events
Syncs the group with its linked LDAP group. Only available to group owners and administrators. Syncs the group with its linked LDAP group. Only available to group owners and administrators.
``` ```plaintext
POST /groups/:id/ldap_sync POST /groups/:id/ldap_sync
``` ```
...@@ -826,7 +825,7 @@ List, add, and delete LDAP group links. ...@@ -826,7 +825,7 @@ List, add, and delete LDAP group links.
Lists LDAP group links. Lists LDAP group links.
``` ```plaintext
GET /groups/:id/ldap_group_links GET /groups/:id/ldap_group_links
``` ```
...@@ -838,7 +837,7 @@ Parameters: ...@@ -838,7 +837,7 @@ Parameters:
Adds an LDAP group link. Adds an LDAP group link.
``` ```plaintext
POST /groups/:id/ldap_group_links POST /groups/:id/ldap_group_links
``` ```
...@@ -853,7 +852,7 @@ Parameters: ...@@ -853,7 +852,7 @@ Parameters:
Deletes an LDAP group link. Deletes an LDAP group link.
``` ```plaintext
DELETE /groups/:id/ldap_group_links/:cn DELETE /groups/:id/ldap_group_links/:cn
``` ```
...@@ -864,7 +863,7 @@ Parameters: ...@@ -864,7 +863,7 @@ Parameters:
Deletes a LDAP group link for a specific LDAP provider Deletes a LDAP group link for a specific LDAP provider
``` ```plaintext
DELETE /groups/:id/ldap_group_links/:provider/:cn DELETE /groups/:id/ldap_group_links/:provider/:cn
``` ```
...@@ -880,13 +879,13 @@ By default, groups only get 20 namespaces at a time because the API results are ...@@ -880,13 +879,13 @@ By default, groups only get 20 namespaces at a time because the API results are
To get more (up to 100), pass the following as an argument to the API call: To get more (up to 100), pass the following as an argument to the API call:
``` ```plaintext
/groups?per_page=100 /groups?per_page=100
``` ```
And to switch pages add: And to switch pages add:
``` ```plaintext
/groups?per_page=100&page=2 /groups?per_page=100&page=2
``` ```
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Import your projects from GitHub to GitLab via the API. Import your projects from GitHub to GitLab via the API.
``` ```plaintext
POST /import/github POST /import/github
``` ```
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
Get a list of related issues of a given issue, sorted by the relationship creation datetime (ascending). Get a list of related issues of a given issue, sorted by the relationship creation datetime (ascending).
Issues will be filtered according to the user authorizations. Issues will be filtered according to the user authorizations.
``` ```plaintext
GET /projects/:id/issues/:issue_iid/links GET /projects/:id/issues/:issue_iid/links
``` ```
...@@ -57,7 +57,7 @@ Parameters: ...@@ -57,7 +57,7 @@ Parameters:
Creates a two-way relation between two issues. User must be allowed to update both issues in order to succeed. Creates a two-way relation between two issues. User must be allowed to update both issues in order to succeed.
``` ```plaintext
POST /projects/:id/issues/:issue_iid/links POST /projects/:id/issues/:issue_iid/links
``` ```
...@@ -145,7 +145,7 @@ Example response: ...@@ -145,7 +145,7 @@ Example response:
Deletes an issue link, thus removes the two-way relationship. Deletes an issue link, thus removes the two-way relationship.
``` ```plaintext
DELETE /projects/:id/issues/:issue_iid/links/:issue_link_id DELETE /projects/:id/issues/:issue_iid/links/:issue_link_id
``` ```
......
...@@ -26,7 +26,7 @@ Get all issues the authenticated user has access to. By default it ...@@ -26,7 +26,7 @@ Get all issues the authenticated user has access to. By default it
returns only issues created by the current user. To get all issues, returns only issues created by the current user. To get all issues,
use parameter `scope=all`. use parameter `scope=all`.
``` ```plaintext
GET /issues GET /issues
GET /issues?state=opened GET /issues?state=opened
GET /issues?state=closed GET /issues?state=closed
...@@ -181,7 +181,7 @@ the `weight` parameter: ...@@ -181,7 +181,7 @@ the `weight` parameter:
Get a list of a group's issues. Get a list of a group's issues.
``` ```plaintext
GET /groups/:id/issues GET /groups/:id/issues
GET /groups/:id/issues?state=opened GET /groups/:id/issues?state=opened
GET /groups/:id/issues?state=closed GET /groups/:id/issues?state=closed
...@@ -336,7 +336,7 @@ the `weight` parameter: ...@@ -336,7 +336,7 @@ the `weight` parameter:
Get a list of a project's issues. Get a list of a project's issues.
``` ```plaintext
GET /projects/:id/issues GET /projects/:id/issues
GET /projects/:id/issues?state=opened GET /projects/:id/issues?state=opened
GET /projects/:id/issues?state=closed GET /projects/:id/issues?state=closed
...@@ -497,7 +497,7 @@ the `weight` parameter: ...@@ -497,7 +497,7 @@ the `weight` parameter:
Get a single project issue. Get a single project issue.
``` ```plaintext
GET /projects/:id/issues/:issue_iid GET /projects/:id/issues/:issue_iid
``` ```
...@@ -637,7 +637,7 @@ Please use `iid` of the `epic` attribute instead. ...@@ -637,7 +637,7 @@ Please use `iid` of the `epic` attribute instead.
Creates a new project issue. Creates a new project issue.
``` ```plaintext
POST /projects/:id/issues POST /projects/:id/issues
``` ```
...@@ -745,7 +745,7 @@ the `weight` parameter: ...@@ -745,7 +745,7 @@ the `weight` parameter:
Updates an existing project issue. This call is also used to mark an issue as Updates an existing project issue. This call is also used to mark an issue as
closed. closed.
``` ```plaintext
PUT /projects/:id/issues/:issue_iid PUT /projects/:id/issues/:issue_iid
``` ```
...@@ -864,7 +864,7 @@ The `closed_by` attribute was [introduced in GitLab 10.6][ce-17042]. This value ...@@ -864,7 +864,7 @@ The `closed_by` attribute was [introduced in GitLab 10.6][ce-17042]. This value
Only for admins and project owners. Deletes the issue in question. Only for admins and project owners. Deletes the issue in question.
``` ```plaintext
DELETE /projects/:id/issues/:issue_iid DELETE /projects/:id/issues/:issue_iid
``` ```
...@@ -886,7 +886,7 @@ issue, error `400` together with an explaining error message is returned. ...@@ -886,7 +886,7 @@ issue, error `400` together with an explaining error message is returned.
If a given label and/or milestone with the same name also exists in the target If a given label and/or milestone with the same name also exists in the target
project, it will then be assigned to the issue that is being moved. project, it will then be assigned to the issue that is being moved.
``` ```plaintext
POST /projects/:id/issues/:issue_iid/move POST /projects/:id/issues/:issue_iid/move
``` ```
...@@ -993,7 +993,7 @@ Subscribes the authenticated user to an issue to receive notifications. ...@@ -993,7 +993,7 @@ Subscribes the authenticated user to an issue to receive notifications.
If the user is already subscribed to the issue, the status code `304` If the user is already subscribed to the issue, the status code `304`
is returned. is returned.
``` ```plaintext
POST /projects/:id/issues/:issue_iid/subscribe POST /projects/:id/issues/:issue_iid/subscribe
``` ```
...@@ -1099,7 +1099,7 @@ Unsubscribes the authenticated user from the issue to not receive notifications ...@@ -1099,7 +1099,7 @@ Unsubscribes the authenticated user from the issue to not receive notifications
from it. If the user is not subscribed to the issue, the from it. If the user is not subscribed to the issue, the
status code `304` is returned. status code `304` is returned.
``` ```plaintext
POST /projects/:id/issues/:issue_iid/unsubscribe POST /projects/:id/issues/:issue_iid/unsubscribe
``` ```
...@@ -1170,7 +1170,7 @@ Manually creates a todo for the current user on an issue. If ...@@ -1170,7 +1170,7 @@ Manually creates a todo for the current user on an issue. If
there already exists a todo for the user on that issue, status code `304` is there already exists a todo for the user on that issue, status code `304` is
returned. returned.
``` ```plaintext
POST /projects/:id/issues/:issue_iid/todo POST /projects/:id/issues/:issue_iid/todo
``` ```
...@@ -1284,7 +1284,7 @@ Example response: ...@@ -1284,7 +1284,7 @@ Example response:
Sets an estimated time of work for this issue. Sets an estimated time of work for this issue.
``` ```plaintext
POST /projects/:id/issues/:issue_iid/time_estimate POST /projects/:id/issues/:issue_iid/time_estimate
``` ```
...@@ -1313,7 +1313,7 @@ Example response: ...@@ -1313,7 +1313,7 @@ Example response:
Resets the estimated time for this issue to 0 seconds. Resets the estimated time for this issue to 0 seconds.
``` ```plaintext
POST /projects/:id/issues/:issue_iid/reset_time_estimate POST /projects/:id/issues/:issue_iid/reset_time_estimate
``` ```
...@@ -1341,7 +1341,7 @@ Example response: ...@@ -1341,7 +1341,7 @@ Example response:
Adds spent time for this issue Adds spent time for this issue
``` ```plaintext
POST /projects/:id/issues/:issue_iid/add_spent_time POST /projects/:id/issues/:issue_iid/add_spent_time
``` ```
...@@ -1370,7 +1370,7 @@ Example response: ...@@ -1370,7 +1370,7 @@ Example response:
Resets the total spent time for this issue to 0 seconds. Resets the total spent time for this issue to 0 seconds.
``` ```plaintext
POST /projects/:id/issues/:issue_iid/reset_spent_time POST /projects/:id/issues/:issue_iid/reset_spent_time
``` ```
...@@ -1396,7 +1396,7 @@ Example response: ...@@ -1396,7 +1396,7 @@ Example response:
## Get time tracking stats ## Get time tracking stats
``` ```plaintext
GET /projects/:id/issues/:issue_iid/time_stats GET /projects/:id/issues/:issue_iid/time_stats
``` ```
...@@ -1424,7 +1424,7 @@ Example response: ...@@ -1424,7 +1424,7 @@ Example response:
Get all the merge requests that are related to the issue. Get all the merge requests that are related to the issue.
``` ```plaintext
GET /projects/:id/issues/:issue_id/related_merge_requests GET /projects/:id/issues/:issue_id/related_merge_requests
``` ```
...@@ -1580,7 +1580,7 @@ Example response: ...@@ -1580,7 +1580,7 @@ Example response:
Get all the merge requests that will close issue when merged. Get all the merge requests that will close issue when merged.
``` ```plaintext
GET /projects/:id/issues/:issue_iid/closed_by GET /projects/:id/issues/:issue_iid/closed_by
``` ```
...@@ -1653,7 +1653,7 @@ Example response: ...@@ -1653,7 +1653,7 @@ Example response:
## Participants on issues ## Participants on issues
``` ```plaintext
GET /projects/:id/issues/:issue_iid/participants GET /projects/:id/issues/:issue_iid/participants
``` ```
...@@ -1697,7 +1697,7 @@ Comments are done via the [notes](notes.md) resource. ...@@ -1697,7 +1697,7 @@ Comments are done via the [notes](notes.md) resource.
Available only for admins. Available only for admins.
``` ```plaintext
GET /projects/:id/issues/:issue_iid/user_agent_detail GET /projects/:id/issues/:issue_iid/user_agent_detail
``` ```
......
...@@ -11,7 +11,7 @@ Gets issues count statistics on all issues the authenticated user has access to. ...@@ -11,7 +11,7 @@ Gets issues count statistics on all issues the authenticated user has access to.
returns only issues created by the current user. To get all issues, returns only issues created by the current user. To get all issues,
use parameter `scope=all`. use parameter `scope=all`.
``` ```plaintext
GET /issues_statistics GET /issues_statistics
GET /issues_statistics?labels=foo GET /issues_statistics?labels=foo
GET /issues_statistics?labels=foo,bar GET /issues_statistics?labels=foo,bar
...@@ -67,7 +67,7 @@ Example response: ...@@ -67,7 +67,7 @@ Example response:
Gets issues count statistics for given group. Gets issues count statistics for given group.
``` ```plaintext
GET /groups/:id/issues_statistics GET /groups/:id/issues_statistics
GET /groups/:id/issues_statistics?labels=foo GET /groups/:id/issues_statistics?labels=foo
GET /groups/:id/issues_statistics?labels=foo,bar GET /groups/:id/issues_statistics?labels=foo,bar
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Get a list of jobs in a project. Jobs are sorted in descending order of their IDs. Get a list of jobs in a project. Jobs are sorted in descending order of their IDs.
``` ```plaintext
GET /projects/:id/jobs GET /projects/:id/jobs
``` ```
...@@ -138,7 +138,7 @@ Example of response ...@@ -138,7 +138,7 @@ Example of response
Get a list of jobs for a pipeline. Get a list of jobs for a pipeline.
``` ```plaintext
GET /projects/:id/pipelines/:pipeline_id/jobs GET /projects/:id/pipelines/:pipeline_id/jobs
``` ```
...@@ -273,7 +273,7 @@ Example of response ...@@ -273,7 +273,7 @@ Example of response
Get a single job of a project Get a single job of a project
``` ```plaintext
GET /projects/:id/jobs/:job_id GET /projects/:id/jobs/:job_id
``` ```
...@@ -351,7 +351,7 @@ Example of response ...@@ -351,7 +351,7 @@ Example of response
Get the job's artifacts zipped archive of a project. Get the job's artifacts zipped archive of a project.
``` ```plaintext
GET /projects/:id/jobs/:job_id/artifacts GET /projects/:id/jobs/:job_id/artifacts
``` ```
...@@ -414,7 +414,7 @@ the given reference name and job, provided the job finished successfully. This ...@@ -414,7 +414,7 @@ the given reference name and job, provided the job finished successfully. This
is the same as [getting the job's artifacts](#get-job-artifacts), but by is the same as [getting the job's artifacts](#get-job-artifacts), but by
defining the job's name instead of its ID. defining the job's name instead of its ID.
``` ```plaintext
GET /projects/:id/jobs/artifacts/:ref_name/download?job=name GET /projects/:id/jobs/artifacts/:ref_name/download?job=name
``` ```
...@@ -476,7 +476,7 @@ Download a single artifact file from a job with a specified ID from within ...@@ -476,7 +476,7 @@ Download a single artifact file from a job with a specified ID from within
the job's artifacts zipped archive. The file is extracted from the archive and the job's artifacts zipped archive. The file is extracted from the archive and
streamed to the client. streamed to the client.
``` ```plaintext
GET /projects/:id/jobs/:job_id/artifacts/*artifact_path GET /projects/:id/jobs/:job_id/artifacts/*artifact_path
``` ```
...@@ -510,7 +510,7 @@ Download a single artifact file for a specific job of the latest successful ...@@ -510,7 +510,7 @@ Download a single artifact file for a specific job of the latest successful
pipeline for the given reference name from within the job's artifacts archive. pipeline for the given reference name from within the job's artifacts archive.
The file is extracted from the archive and streamed to the client. The file is extracted from the archive and streamed to the client.
``` ```plaintext
GET /projects/:id/jobs/artifacts/:ref_name/raw/*artifact_path?job=name GET /projects/:id/jobs/artifacts/:ref_name/raw/*artifact_path?job=name
``` ```
...@@ -541,7 +541,7 @@ Possible response status codes: ...@@ -541,7 +541,7 @@ Possible response status codes:
Get a log (trace) of a specific job of a project: Get a log (trace) of a specific job of a project:
``` ```plaintext
GET /projects/:id/jobs/:job_id/trace GET /projects/:id/jobs/:job_id/trace
``` ```
...@@ -565,7 +565,7 @@ Possible response status codes: ...@@ -565,7 +565,7 @@ Possible response status codes:
Cancel a single job of a project Cancel a single job of a project
``` ```plaintext
POST /projects/:id/jobs/:job_id/cancel POST /projects/:id/jobs/:job_id/cancel
``` ```
...@@ -614,7 +614,7 @@ Example of response ...@@ -614,7 +614,7 @@ Example of response
Retry a single job of a project Retry a single job of a project
``` ```plaintext
POST /projects/:id/jobs/:job_id/retry POST /projects/:id/jobs/:job_id/retry
``` ```
...@@ -663,7 +663,7 @@ Example of response ...@@ -663,7 +663,7 @@ Example of response
Erase a single job of a project (remove job artifacts and a job log) Erase a single job of a project (remove job artifacts and a job log)
``` ```plaintext
POST /projects/:id/jobs/:job_id/erase POST /projects/:id/jobs/:job_id/erase
``` ```
...@@ -717,7 +717,7 @@ Example of response ...@@ -717,7 +717,7 @@ Example of response
Prevents artifacts from being deleted when expiration is set. Prevents artifacts from being deleted when expiration is set.
``` ```plaintext
POST /projects/:id/jobs/:job_id/artifacts/keep POST /projects/:id/jobs/:job_id/artifacts/keep
``` ```
...@@ -773,7 +773,7 @@ Example response: ...@@ -773,7 +773,7 @@ Example response:
Delete artifacts of a job. Delete artifacts of a job.
``` ```plaintext
DELETE /projects/:id/jobs/:job_id/artifacts DELETE /projects/:id/jobs/:job_id/artifacts
``` ```
...@@ -797,7 +797,7 @@ If the artifacts were deleted successfully, a response with status `204 No Conte ...@@ -797,7 +797,7 @@ If the artifacts were deleted successfully, a response with status `204 No Conte
Triggers a manual action to start a job. Triggers a manual action to start a job.
``` ```plaintext
POST /projects/:id/jobs/:job_id/play POST /projects/:id/jobs/:job_id/play
``` ```
......
...@@ -7,7 +7,7 @@ The `description_html` - was added to response JSON in [GitLab 12.7](https://git ...@@ -7,7 +7,7 @@ The `description_html` - was added to response JSON in [GitLab 12.7](https://git
Get all labels for a given project. Get all labels for a given project.
``` ```plaintext
GET /projects/:id/labels GET /projects/:id/labels
``` ```
...@@ -102,7 +102,7 @@ Example response: ...@@ -102,7 +102,7 @@ Example response:
Get a single label for a given project. Get a single label for a given project.
``` ```plaintext
GET /projects/:id/labels/:label_id GET /projects/:id/labels/:label_id
``` ```
...@@ -139,7 +139,7 @@ Example response: ...@@ -139,7 +139,7 @@ Example response:
Creates a new label for the given repository with the given name and color. Creates a new label for the given repository with the given name and color.
``` ```plaintext
POST /projects/:id/labels POST /projects/:id/labels
``` ```
...@@ -178,7 +178,7 @@ Example response: ...@@ -178,7 +178,7 @@ Example response:
Deletes a label with a given name. Deletes a label with a given name.
``` ```plaintext
DELETE /projects/:id/labels/:label_id DELETE /projects/:id/labels/:label_id
``` ```
...@@ -198,7 +198,7 @@ NOTE: **Note:** An older endpoint `DELETE /projects/:id/labels` with `name` in t ...@@ -198,7 +198,7 @@ NOTE: **Note:** An older endpoint `DELETE /projects/:id/labels` with `name` in t
Updates an existing label with new name or new color. At least one parameter Updates an existing label with new name or new color. At least one parameter
is required, to update the label. is required, to update the label.
``` ```plaintext
PUT /projects/:id/labels/:label_id PUT /projects/:id/labels/:label_id
``` ```
...@@ -242,7 +242,7 @@ NOTE: **Note:** An older endpoint `PUT /projects/:id/labels` with `name` or `lab ...@@ -242,7 +242,7 @@ NOTE: **Note:** An older endpoint `PUT /projects/:id/labels` with `name` or `lab
Promotes a project label to a group label. Promotes a project label to a group label.
``` ```plaintext
PUT /projects/:id/labels/:label_id/promote PUT /projects/:id/labels/:label_id/promote
``` ```
...@@ -279,7 +279,7 @@ Subscribes the authenticated user to a label to receive notifications. ...@@ -279,7 +279,7 @@ Subscribes the authenticated user to a label to receive notifications.
If the user is already subscribed to the label, the status code `304` If the user is already subscribed to the label, the status code `304`
is returned. is returned.
``` ```plaintext
POST /projects/:id/labels/:label_id/subscribe POST /projects/:id/labels/:label_id/subscribe
``` ```
...@@ -317,7 +317,7 @@ Unsubscribes the authenticated user from a label to not receive notifications ...@@ -317,7 +317,7 @@ Unsubscribes the authenticated user from a label to not receive notifications
from it. If the user is not subscribed to the label, the from it. If the user is not subscribed to the label, the
status code `304` is returned. status code `304` is returned.
``` ```plaintext
POST /projects/:id/labels/:label_id/unsubscribe POST /projects/:id/labels/:label_id/unsubscribe
``` ```
......
...@@ -5,7 +5,7 @@ as an admin. ...@@ -5,7 +5,7 @@ as an admin.
## Retrieve information about the current license ## Retrieve information about the current license
``` ```plaintext
GET /license GET /license
``` ```
...@@ -34,7 +34,7 @@ GET /license ...@@ -34,7 +34,7 @@ GET /license
## Retrieve information about all licenses ## Retrieve information about all licenses
``` ```plaintext
GET /licenses GET /licenses
``` ```
...@@ -93,7 +93,7 @@ Returns: ...@@ -93,7 +93,7 @@ Returns:
## Add a new license ## Add a new license
``` ```plaintext
POST /license POST /license
``` ```
...@@ -137,7 +137,7 @@ Returns: ...@@ -137,7 +137,7 @@ Returns:
## Delete a license ## Delete a license
``` ```plaintext
DELETE /license/:id DELETE /license/:id
``` ```
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Checks if your `.gitlab-ci.yml` file is valid. Checks if your `.gitlab-ci.yml` file is valid.
``` ```plaintext
POST /ci/lint POST /ci/lint
``` ```
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Get all managed licenses for a given project. Get all managed licenses for a given project.
``` ```plaintext
GET /projects/:id/managed_licenses GET /projects/:id/managed_licenses
``` ```
...@@ -37,7 +37,7 @@ Example response: ...@@ -37,7 +37,7 @@ Example response:
Shows an existing managed license. Shows an existing managed license.
``` ```plaintext
GET /projects/:id/managed_licenses/:managed_license_id GET /projects/:id/managed_licenses/:managed_license_id
``` ```
...@@ -64,7 +64,7 @@ Example response: ...@@ -64,7 +64,7 @@ Example response:
Creates a new managed license for the given project with the given name and approval status. Creates a new managed license for the given project with the given name and approval status.
``` ```plaintext
POST /projects/:id/managed_licenses POST /projects/:id/managed_licenses
``` ```
...@@ -92,7 +92,7 @@ Example response: ...@@ -92,7 +92,7 @@ Example response:
Deletes a managed license with a given id. Deletes a managed license with a given id.
``` ```plaintext
DELETE /projects/:id/managed_licenses/:managed_license_id DELETE /projects/:id/managed_licenses/:managed_license_id
``` ```
...@@ -111,7 +111,7 @@ When successful, it replies with an HTTP 204 response. ...@@ -111,7 +111,7 @@ When successful, it replies with an HTTP 204 response.
Updates an existing managed license with a new approval status. Updates an existing managed license with a new approval status.
``` ```plaintext
PATCH /projects/:id/managed_licenses/:managed_license_id PATCH /projects/:id/managed_licenses/:managed_license_id
``` ```
......
...@@ -6,7 +6,7 @@ Available only in APIv4. ...@@ -6,7 +6,7 @@ Available only in APIv4.
## Render an arbitrary Markdown document ## Render an arbitrary Markdown document
``` ```plaintext
POST /api/v4/markdown POST /api/v4/markdown
``` ```
......
...@@ -17,7 +17,7 @@ The access levels are defined in the `Gitlab::Access` module. Currently, these l ...@@ -17,7 +17,7 @@ The access levels are defined in the `Gitlab::Access` module. Currently, these l
Gets a list of group or project members viewable by the authenticated user. Gets a list of group or project members viewable by the authenticated user.
Returns only direct members and not inherited members through ancestors groups. Returns only direct members and not inherited members through ancestors groups.
``` ```plaintext
GET /groups/:id/members GET /groups/:id/members
GET /projects/:id/members GET /projects/:id/members
``` ```
...@@ -72,7 +72,7 @@ Gets a list of group or project members viewable by the authenticated user, incl ...@@ -72,7 +72,7 @@ Gets a list of group or project members viewable by the authenticated user, incl
When a user is a member of the project/group and of one or more ancestor groups the user is returned only once with the project `access_level` (if exists) When a user is a member of the project/group and of one or more ancestor groups the user is returned only once with the project `access_level` (if exists)
or the `access_level` for the user in the first group which they belong to in the project groups ancestors chain. or the `access_level` for the user in the first group which they belong to in the project groups ancestors chain.
``` ```plaintext
GET /groups/:id/members/all GET /groups/:id/members/all
GET /projects/:id/members/all GET /projects/:id/members/all
``` ```
...@@ -136,7 +136,7 @@ Example response: ...@@ -136,7 +136,7 @@ Example response:
Gets a member of a group or project. Returns only direct members and not inherited members through ancestor groups. Gets a member of a group or project. Returns only direct members and not inherited members through ancestor groups.
``` ```plaintext
GET /groups/:id/members/:user_id GET /groups/:id/members/:user_id
GET /projects/:id/members/:user_id GET /projects/:id/members/:user_id
``` ```
...@@ -173,7 +173,7 @@ Example response: ...@@ -173,7 +173,7 @@ Example response:
Gets a member of a group or project, including members inherited through ancestor groups. See the corresponding [endpoint to list all inherited members](#list-all-members-of-a-group-or-project-including-inherited-members) for details. Gets a member of a group or project, including members inherited through ancestor groups. See the corresponding [endpoint to list all inherited members](#list-all-members-of-a-group-or-project-including-inherited-members) for details.
``` ```plaintext
GET /groups/:id/members/all/:user_id GET /groups/:id/members/all/:user_id
GET /projects/:id/members/all/:user_id GET /projects/:id/members/all/:user_id
``` ```
...@@ -208,7 +208,7 @@ Example response: ...@@ -208,7 +208,7 @@ Example response:
Adds a member to a group or project. Adds a member to a group or project.
``` ```plaintext
POST /groups/:id/members POST /groups/:id/members
POST /projects/:id/members POST /projects/:id/members
``` ```
...@@ -245,7 +245,7 @@ Example response: ...@@ -245,7 +245,7 @@ Example response:
Updates a member of a group or project. Updates a member of a group or project.
``` ```plaintext
PUT /groups/:id/members/:user_id PUT /groups/:id/members/:user_id
PUT /projects/:id/members/:user_id PUT /projects/:id/members/:user_id
``` ```
...@@ -282,7 +282,7 @@ Example response: ...@@ -282,7 +282,7 @@ Example response:
Removes a user from a group or project. Removes a user from a group or project.
``` ```plaintext
DELETE /groups/:id/members/:user_id DELETE /groups/:id/members/:user_id
DELETE /projects/:id/members/:user_id DELETE /projects/:id/members/:user_id
``` ```
......
...@@ -11,7 +11,7 @@ Configuration for approvals on all Merge Requests (MR) in the project. Must be a ...@@ -11,7 +11,7 @@ Configuration for approvals on all Merge Requests (MR) in the project. Must be a
You can request information about a project's approval configuration using the You can request information about a project's approval configuration using the
following endpoint: following endpoint:
``` ```plaintext
GET /projects/:id/approvals GET /projects/:id/approvals
``` ```
...@@ -39,7 +39,7 @@ GET /projects/:id/approvals ...@@ -39,7 +39,7 @@ GET /projects/:id/approvals
If you are allowed to, you can change approval configuration using the following If you are allowed to, you can change approval configuration using the following
endpoint: endpoint:
``` ```plaintext
POST /projects/:id/approvals POST /projects/:id/approvals
``` ```
...@@ -73,7 +73,7 @@ POST /projects/:id/approvals ...@@ -73,7 +73,7 @@ POST /projects/:id/approvals
You can request information about a project's approval rules using the following endpoint: You can request information about a project's approval rules using the following endpoint:
``` ```plaintext
GET /projects/:id/approval_rules GET /projects/:id/approval_rules
``` ```
...@@ -172,7 +172,7 @@ GET /projects/:id/approval_rules ...@@ -172,7 +172,7 @@ GET /projects/:id/approval_rules
You can create project approval rules using the following endpoint: You can create project approval rules using the following endpoint:
``` ```plaintext
POST /projects/:id/approval_rules POST /projects/:id/approval_rules
``` ```
...@@ -274,7 +274,7 @@ POST /projects/:id/approval_rules ...@@ -274,7 +274,7 @@ POST /projects/:id/approval_rules
You can update project approval rules using the following endpoint: You can update project approval rules using the following endpoint:
``` ```plaintext
PUT /projects/:id/approval_rules/:approval_rule_id PUT /projects/:id/approval_rules/:approval_rule_id
``` ```
...@@ -379,7 +379,7 @@ PUT /projects/:id/approval_rules/:approval_rule_id ...@@ -379,7 +379,7 @@ PUT /projects/:id/approval_rules/:approval_rule_id
You can delete project approval rules using the following endpoint: You can delete project approval rules using the following endpoint:
``` ```plaintext
DELETE /projects/:id/approval_rules/:approval_rule_id DELETE /projects/:id/approval_rules/:approval_rule_id
``` ```
...@@ -398,7 +398,7 @@ DELETE /projects/:id/approval_rules/:approval_rule_id ...@@ -398,7 +398,7 @@ DELETE /projects/:id/approval_rules/:approval_rule_id
If you are allowed to, you can change approvers and approver groups using If you are allowed to, you can change approvers and approver groups using
the following endpoint: the following endpoint:
``` ```plaintext
PUT /projects/:id/approvers PUT /projects/:id/approvers
``` ```
...@@ -464,7 +464,7 @@ Configuration for approvals on a specific Merge Request. Must be authenticated f ...@@ -464,7 +464,7 @@ Configuration for approvals on a specific Merge Request. Must be authenticated f
You can request information about a merge request's approval status using the You can request information about a merge request's approval status using the
following endpoint: following endpoint:
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/approvals GET /projects/:id/merge_requests/:merge_request_iid/approvals
``` ```
...@@ -510,7 +510,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/approvals ...@@ -510,7 +510,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/approvals
If you are allowed to, you can change `approvals_required` using the following If you are allowed to, you can change `approvals_required` using the following
endpoint: endpoint:
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/approvals POST /projects/:id/merge_requests/:merge_request_iid/approvals
``` ```
...@@ -547,7 +547,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/approvals ...@@ -547,7 +547,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/approvals
If you are allowed to, you can change approvers and approver groups using If you are allowed to, you can change approvers and approver groups using
the following endpoint: the following endpoint:
``` ```plaintext
PUT /projects/:id/merge_requests/:merge_request_iid/approvers PUT /projects/:id/merge_requests/:merge_request_iid/approvers
``` ```
...@@ -617,7 +617,7 @@ PUT /projects/:id/merge_requests/:merge_request_iid/approvers ...@@ -617,7 +617,7 @@ PUT /projects/:id/merge_requests/:merge_request_iid/approvers
You can request information about a merge request's approval state by using the following endpoint: You can request information about a merge request's approval state by using the following endpoint:
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/approval_state GET /projects/:id/merge_requests/:merge_request_iid/approval_state
``` ```
...@@ -688,7 +688,7 @@ This includes additional information about the users who have already approved ...@@ -688,7 +688,7 @@ This includes additional information about the users who have already approved
You can request information about a merge request's approval rules using the following endpoint: You can request information about a merge request's approval rules using the following endpoint:
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/approval_rules GET /projects/:id/merge_requests/:merge_request_iid/approval_rules
``` ```
...@@ -764,7 +764,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/approval_rules ...@@ -764,7 +764,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/approval_rules
You can create merge request approval rules using the following endpoint: You can create merge request approval rules using the following endpoint:
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/approval_rules POST /projects/:id/merge_requests/:merge_request_iid/approval_rules
``` ```
...@@ -847,7 +847,7 @@ will be used. ...@@ -847,7 +847,7 @@ will be used.
You can update merge request approval rules using the following endpoint: You can update merge request approval rules using the following endpoint:
``` ```plaintext
PUT /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rule_id PUT /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rule_id
``` ```
...@@ -931,7 +931,7 @@ These are system generated rules. ...@@ -931,7 +931,7 @@ These are system generated rules.
You can delete merge request approval rules using the following endpoint: You can delete merge request approval rules using the following endpoint:
``` ```plaintext
DELETE /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rule_id DELETE /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rule_id
``` ```
...@@ -953,7 +953,7 @@ These are system generated rules. ...@@ -953,7 +953,7 @@ These are system generated rules.
If you are allowed to, you can approve a merge request using the following If you are allowed to, you can approve a merge request using the following
endpoint: endpoint:
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/approve POST /projects/:id/merge_requests/:merge_request_iid/approve
``` ```
...@@ -1016,7 +1016,7 @@ does not match, the response code will be `409`. ...@@ -1016,7 +1016,7 @@ does not match, the response code will be `409`.
If you did approve a merge request, you can unapprove it using the following If you did approve a merge request, you can unapprove it using the following
endpoint: endpoint:
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/unapprove POST /projects/:id/merge_requests/:merge_request_iid/unapprove
``` ```
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Get a list of merge request context commits. Get a list of merge request context commits.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/context_commits GET /projects/:id/merge_requests/:merge_request_iid/context_commits
``` ```
...@@ -36,7 +36,7 @@ Parameters: ...@@ -36,7 +36,7 @@ Parameters:
Create a list of merge request context commits. Create a list of merge request context commits.
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/context_commits POST /projects/:id/merge_requests/:merge_request_iid/context_commits
``` ```
...@@ -45,7 +45,7 @@ Parameters: ...@@ -45,7 +45,7 @@ Parameters:
- `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `merge_request_iid` (required) - The internal ID of the merge request - `merge_request_iid` (required) - The internal ID of the merge request
``` ```plaintext
POST /projects/:id/merge_requests/ POST /projects/:id/merge_requests/
``` ```
...@@ -75,7 +75,7 @@ POST /projects/:id/merge_requests/ ...@@ -75,7 +75,7 @@ POST /projects/:id/merge_requests/
Delete a list of merge request context commits. Delete a list of merge request context commits.
``` ```plaintext
DELETE /projects/:id/merge_requests/:merge_request_iid/context_commits DELETE /projects/:id/merge_requests/:merge_request_iid/context_commits
``` ```
......
...@@ -23,7 +23,7 @@ given state (`opened`, `closed`, `locked`, or `merged`) or all of them (`all`). ...@@ -23,7 +23,7 @@ given state (`opened`, `closed`, `locked`, or `merged`) or all of them (`all`).
The pagination parameters `page` and `per_page` can be used to The pagination parameters `page` and `per_page` can be used to
restrict the list of merge requests. restrict the list of merge requests.
``` ```plaintext
GET /merge_requests GET /merge_requests
GET /merge_requests?state=opened GET /merge_requests?state=opened
GET /merge_requests?state=all GET /merge_requests?state=all
...@@ -190,7 +190,7 @@ Get all merge requests for this project. ...@@ -190,7 +190,7 @@ Get all merge requests for this project.
The `state` parameter can be used to get only merge requests with a given state (`opened`, `closed`, `locked`, or `merged`) or all of them (`all`). The `state` parameter can be used to get only merge requests with a given state (`opened`, `closed`, `locked`, or `merged`) or all of them (`all`).
The pagination parameters `page` and `per_page` can be used to restrict the list of merge requests. The pagination parameters `page` and `per_page` can be used to restrict the list of merge requests.
``` ```plaintext
GET /projects/:id/merge_requests GET /projects/:id/merge_requests
GET /projects/:id/merge_requests?state=opened GET /projects/:id/merge_requests?state=opened
GET /projects/:id/merge_requests?state=all GET /projects/:id/merge_requests?state=all
...@@ -361,7 +361,7 @@ Get all merge requests for this group and its subgroups. ...@@ -361,7 +361,7 @@ Get all merge requests for this group and its subgroups.
The `state` parameter can be used to get only merge requests with a given state (`opened`, `closed`, `locked`, or `merged`) or all of them (`all`). The `state` parameter can be used to get only merge requests with a given state (`opened`, `closed`, `locked`, or `merged`) or all of them (`all`).
The pagination parameters `page` and `per_page` can be used to restrict the list of merge requests. The pagination parameters `page` and `per_page` can be used to restrict the list of merge requests.
``` ```plaintext
GET /groups/:id/merge_requests GET /groups/:id/merge_requests
GET /groups/:id/merge_requests?state=opened GET /groups/:id/merge_requests?state=opened
GET /groups/:id/merge_requests?state=all GET /groups/:id/merge_requests?state=all
...@@ -524,7 +524,7 @@ integer. This is because when an MR has too many changes to display and store, ...@@ -524,7 +524,7 @@ integer. This is because when an MR has too many changes to display and store,
it will be capped at 1,000. In that case, the API will return the string it will be capped at 1,000. In that case, the API will return the string
`"1000+"` for the changes count. `"1000+"` for the changes count.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid GET /projects/:id/merge_requests/:merge_request_iid
``` ```
...@@ -683,7 +683,7 @@ the `approvals_before_merge` parameter: ...@@ -683,7 +683,7 @@ the `approvals_before_merge` parameter:
Get a list of merge request participants. Get a list of merge request participants.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/participants GET /projects/:id/merge_requests/:merge_request_iid/participants
``` ```
...@@ -717,7 +717,7 @@ Parameters: ...@@ -717,7 +717,7 @@ Parameters:
Get a list of merge request commits. Get a list of merge request commits.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/commits GET /projects/:id/merge_requests/:merge_request_iid/commits
``` ```
...@@ -753,7 +753,7 @@ Parameters: ...@@ -753,7 +753,7 @@ Parameters:
Shows information about the merge request including its files and changes. Shows information about the merge request including its files and changes.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/changes GET /projects/:id/merge_requests/:merge_request_iid/changes
``` ```
...@@ -864,7 +864,7 @@ Parameters: ...@@ -864,7 +864,7 @@ Parameters:
Get a list of merge request pipelines. Get a list of merge request pipelines.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/pipelines GET /projects/:id/merge_requests/:merge_request_iid/pipelines
``` ```
...@@ -896,7 +896,7 @@ The new pipeline can be: ...@@ -896,7 +896,7 @@ The new pipeline can be:
- A [pipeline for merged results](../ci/merge_request_pipelines/pipelines_for_merged_results/index.md) - A [pipeline for merged results](../ci/merge_request_pipelines/pipelines_for_merged_results/index.md)
if the [project setting is enabled](../ci/merge_request_pipelines/pipelines_for_merged_results/index.md#enabling-pipelines-for-merged-results). if the [project setting is enabled](../ci/merge_request_pipelines/pipelines_for_merged_results/index.md#enabling-pipelines-for-merged-results).
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/pipelines POST /projects/:id/merge_requests/:merge_request_iid/pipelines
``` ```
...@@ -948,7 +948,7 @@ Parameters: ...@@ -948,7 +948,7 @@ Parameters:
Creates a new merge request. Creates a new merge request.
``` ```plaintext
POST /projects/:id/merge_requests POST /projects/:id/merge_requests
``` ```
...@@ -1105,7 +1105,7 @@ the `approvals_before_merge` parameter: ...@@ -1105,7 +1105,7 @@ the `approvals_before_merge` parameter:
Updates an existing merge request. You can change the target branch, title, or even close the MR. Updates an existing merge request. You can change the target branch, title, or even close the MR.
``` ```plaintext
PUT /projects/:id/merge_requests/:merge_request_iid PUT /projects/:id/merge_requests/:merge_request_iid
``` ```
...@@ -1264,7 +1264,7 @@ the `approvals_before_merge` parameter: ...@@ -1264,7 +1264,7 @@ the `approvals_before_merge` parameter:
Only for admins and project owners. Deletes the merge request in question. Only for admins and project owners. Deletes the merge request in question.
``` ```plaintext
DELETE /projects/:id/merge_requests/:merge_request_iid DELETE /projects/:id/merge_requests/:merge_request_iid
``` ```
...@@ -1289,7 +1289,7 @@ If the `sha` parameter is passed and does not match the HEAD of the source - you ...@@ -1289,7 +1289,7 @@ If the `sha` parameter is passed and does not match the HEAD of the source - you
If you don't have permissions to accept this merge request - you'll get a `401` If you don't have permissions to accept this merge request - you'll get a `401`
``` ```plaintext
PUT /projects/:id/merge_requests/:merge_request_iid/merge PUT /projects/:id/merge_requests/:merge_request_iid/merge
``` ```
...@@ -1450,7 +1450,7 @@ If the merge request has conflicts, is empty or already merged, you'll get a `40 ...@@ -1450,7 +1450,7 @@ If the merge request has conflicts, is empty or already merged, you'll get a `40
It returns the HEAD commit of `refs/merge-requests/:iid/merge` in the response body in case of `200`. It returns the HEAD commit of `refs/merge-requests/:iid/merge` in the response body in case of `200`.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/merge_ref GET /projects/:id/merge_requests/:merge_request_iid/merge_ref
``` ```
...@@ -1473,7 +1473,7 @@ If the merge request is already merged or closed - you get `405` and error messa ...@@ -1473,7 +1473,7 @@ If the merge request is already merged or closed - you get `405` and error messa
In case the merge request is not set to be merged when the pipeline succeeds, you'll also get a `406` error. In case the merge request is not set to be merged when the pipeline succeeds, you'll also get a `406` error.
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds POST /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds
``` ```
...@@ -1621,7 +1621,7 @@ Automatically rebase the `source_branch` of the merge request against its ...@@ -1621,7 +1621,7 @@ Automatically rebase the `source_branch` of the merge request against its
If you don't have permissions to push to the merge request's source branch - If you don't have permissions to push to the merge request's source branch -
you'll get a `403 Forbidden` response. you'll get a `403 Forbidden` response.
``` ```plaintext
PUT /projects/:id/merge_requests/:merge_request_iid/rebase PUT /projects/:id/merge_requests/:merge_request_iid/rebase
``` ```
...@@ -1684,7 +1684,7 @@ Comments are done via the [notes](notes.md) resource. ...@@ -1684,7 +1684,7 @@ Comments are done via the [notes](notes.md) resource.
Get all the issues that would be closed by merging the provided merge request. Get all the issues that would be closed by merging the provided merge request.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/closes_issues GET /projects/:id/merge_requests/:merge_request_iid/closes_issues
``` ```
...@@ -1760,7 +1760,7 @@ Example response when an external issue tracker (e.g. Jira) is used: ...@@ -1760,7 +1760,7 @@ Example response when an external issue tracker (e.g. Jira) is used:
Subscribes the authenticated user to a merge request to receive notification. If the user is already subscribed to the merge request, the Subscribes the authenticated user to a merge request to receive notification. If the user is already subscribed to the merge request, the
status code `304` is returned. status code `304` is returned.
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/subscribe POST /projects/:id/merge_requests/:merge_request_iid/subscribe
``` ```
...@@ -1911,7 +1911,7 @@ Unsubscribes the authenticated user from a merge request to not receive ...@@ -1911,7 +1911,7 @@ Unsubscribes the authenticated user from a merge request to not receive
notifications from that merge request. If the user is notifications from that merge request. If the user is
not subscribed to the merge request, the status code `304` is returned. not subscribed to the merge request, the status code `304` is returned.
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/unsubscribe POST /projects/:id/merge_requests/:merge_request_iid/unsubscribe
``` ```
...@@ -2062,7 +2062,7 @@ Manually creates a todo for the current user on a merge request. ...@@ -2062,7 +2062,7 @@ Manually creates a todo for the current user on a merge request.
If there already exists a todo for the user on that merge request, If there already exists a todo for the user on that merge request,
status code `304` is returned. status code `304` is returned.
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/todo POST /projects/:id/merge_requests/:merge_request_iid/todo
``` ```
...@@ -2179,7 +2179,7 @@ Example response: ...@@ -2179,7 +2179,7 @@ Example response:
Get a list of merge request diff versions. Get a list of merge request diff versions.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/versions GET /projects/:id/merge_requests/:merge_request_iid/versions
``` ```
...@@ -2220,7 +2220,7 @@ Example response: ...@@ -2220,7 +2220,7 @@ Example response:
Get a single merge request diff version. Get a single merge request diff version.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/versions/:version_id GET /projects/:id/merge_requests/:merge_request_iid/versions/:version_id
``` ```
...@@ -2288,7 +2288,7 @@ Example response: ...@@ -2288,7 +2288,7 @@ Example response:
Sets an estimated time of work for this merge request. Sets an estimated time of work for this merge request.
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/time_estimate POST /projects/:id/merge_requests/:merge_request_iid/time_estimate
``` ```
...@@ -2317,7 +2317,7 @@ Example response: ...@@ -2317,7 +2317,7 @@ Example response:
Resets the estimated time for this merge request to 0 seconds. Resets the estimated time for this merge request to 0 seconds.
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/reset_time_estimate POST /projects/:id/merge_requests/:merge_request_iid/reset_time_estimate
``` ```
...@@ -2345,7 +2345,7 @@ Example response: ...@@ -2345,7 +2345,7 @@ Example response:
Adds spent time for this merge request Adds spent time for this merge request
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/add_spent_time POST /projects/:id/merge_requests/:merge_request_iid/add_spent_time
``` ```
...@@ -2374,7 +2374,7 @@ Example response: ...@@ -2374,7 +2374,7 @@ Example response:
Resets the total spent time for this merge request to 0 seconds. Resets the total spent time for this merge request to 0 seconds.
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/reset_spent_time POST /projects/:id/merge_requests/:merge_request_iid/reset_spent_time
``` ```
...@@ -2400,7 +2400,7 @@ Example response: ...@@ -2400,7 +2400,7 @@ Example response:
## Get time tracking stats ## Get time tracking stats
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/time_stats GET /projects/:id/merge_requests/:merge_request_iid/time_stats
``` ```
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Returns a list of project milestones. Returns a list of project milestones.
``` ```plaintext
GET /projects/:id/milestones GET /projects/:id/milestones
GET /projects/:id/milestones?iids[]=42 GET /projects/:id/milestones?iids[]=42
GET /projects/:id/milestones?iids[]=42&iids[]=43 GET /projects/:id/milestones?iids[]=42&iids[]=43
...@@ -51,7 +51,7 @@ Example Response: ...@@ -51,7 +51,7 @@ Example Response:
Gets a single project milestone. Gets a single project milestone.
``` ```plaintext
GET /projects/:id/milestones/:milestone_id GET /projects/:id/milestones/:milestone_id
``` ```
...@@ -64,7 +64,7 @@ Parameters: ...@@ -64,7 +64,7 @@ Parameters:
Creates a new project milestone. Creates a new project milestone.
``` ```plaintext
POST /projects/:id/milestones POST /projects/:id/milestones
``` ```
...@@ -80,7 +80,7 @@ Parameters: ...@@ -80,7 +80,7 @@ Parameters:
Updates an existing project milestone. Updates an existing project milestone.
``` ```plaintext
PUT /projects/:id/milestones/:milestone_id PUT /projects/:id/milestones/:milestone_id
``` ```
...@@ -98,7 +98,7 @@ Parameters: ...@@ -98,7 +98,7 @@ Parameters:
Only for users with Developer access to the project. Only for users with Developer access to the project.
``` ```plaintext
DELETE /projects/:id/milestones/:milestone_id DELETE /projects/:id/milestones/:milestone_id
``` ```
...@@ -111,7 +111,7 @@ Parameters: ...@@ -111,7 +111,7 @@ Parameters:
Gets all issues assigned to a single project milestone. Gets all issues assigned to a single project milestone.
``` ```plaintext
GET /projects/:id/milestones/:milestone_id/issues GET /projects/:id/milestones/:milestone_id/issues
``` ```
...@@ -124,7 +124,7 @@ Parameters: ...@@ -124,7 +124,7 @@ Parameters:
Gets all merge requests assigned to a single project milestone. Gets all merge requests assigned to a single project milestone.
``` ```plaintext
GET /projects/:id/milestones/:milestone_id/merge_requests GET /projects/:id/milestones/:milestone_id/merge_requests
``` ```
...@@ -139,7 +139,7 @@ Parameters: ...@@ -139,7 +139,7 @@ Parameters:
Only for users with Developer access to the group. Only for users with Developer access to the group.
``` ```plaintext
POST /projects/:id/milestones/:milestone_id/promote POST /projects/:id/milestones/:milestone_id/promote
``` ```
...@@ -154,7 +154,7 @@ Parameters: ...@@ -154,7 +154,7 @@ Parameters:
Gets all burndown chart events for a single milestone. Gets all burndown chart events for a single milestone.
``` ```plaintext
GET /projects/:id/milestones/:milestone_id/burndown_events GET /projects/:id/milestones/:milestone_id/burndown_events
``` ```
......
...@@ -12,7 +12,7 @@ For users and groups supported API calls see the [users](users.md) and ...@@ -12,7 +12,7 @@ For users and groups supported API calls see the [users](users.md) and
Get a list of the namespaces of the authenticated user. If the user is an Get a list of the namespaces of the authenticated user. If the user is an
administrator, a list of all namespaces in the GitLab instance is shown. administrator, a list of all namespaces in the GitLab instance is shown.
``` ```plaintext
GET /namespaces GET /namespaces
``` ```
...@@ -74,7 +74,7 @@ NOTE: **Note:** Only group maintainers/owners are presented with `members_count_ ...@@ -74,7 +74,7 @@ NOTE: **Note:** Only group maintainers/owners are presented with `members_count_
Get all namespaces that match a string in their name or path. Get all namespaces that match a string in their name or path.
``` ```plaintext
GET /namespaces?search=foobar GET /namespaces?search=foobar
``` ```
...@@ -108,7 +108,7 @@ Example response: ...@@ -108,7 +108,7 @@ Example response:
Get a namespace by ID. Get a namespace by ID.
``` ```plaintext
GET /namespaces/:id GET /namespaces/:id
``` ```
......
...@@ -22,7 +22,7 @@ Read more on [pagination](README.md#pagination). ...@@ -22,7 +22,7 @@ Read more on [pagination](README.md#pagination).
Gets a list of all notes for a single issue. Gets a list of all notes for a single issue.
``` ```plaintext
GET /projects/:id/issues/:issue_iid/notes GET /projects/:id/issues/:issue_iid/notes
GET /projects/:id/issues/:issue_iid/notes?sort=asc&order_by=updated_at GET /projects/:id/issues/:issue_iid/notes?sort=asc&order_by=updated_at
``` ```
...@@ -87,7 +87,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -87,7 +87,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single note for a specific project issue Returns a single note for a specific project issue
``` ```plaintext
GET /projects/:id/issues/:issue_iid/notes/:note_id GET /projects/:id/issues/:issue_iid/notes/:note_id
``` ```
...@@ -105,7 +105,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -105,7 +105,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Creates a new note to a single project issue. Creates a new note to a single project issue.
``` ```plaintext
POST /projects/:id/issues/:issue_iid/notes POST /projects/:id/issues/:issue_iid/notes
``` ```
...@@ -124,7 +124,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -124,7 +124,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Modify existing note of an issue. Modify existing note of an issue.
``` ```plaintext
PUT /projects/:id/issues/:issue_iid/notes/:note_id PUT /projects/:id/issues/:issue_iid/notes/:note_id
``` ```
...@@ -143,7 +143,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab. ...@@ -143,7 +143,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing note of an issue. Deletes an existing note of an issue.
``` ```plaintext
DELETE /projects/:id/issues/:issue_iid/notes/:note_id DELETE /projects/:id/issues/:issue_iid/notes/:note_id
``` ```
...@@ -165,7 +165,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl ...@@ -165,7 +165,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Gets a list of all notes for a single snippet. Snippet notes are comments users can post to a snippet. Gets a list of all notes for a single snippet. Snippet notes are comments users can post to a snippet.
``` ```plaintext
GET /projects/:id/snippets/:snippet_id/notes GET /projects/:id/snippets/:snippet_id/notes
GET /projects/:id/snippets/:snippet_id/notes?sort=asc&order_by=updated_at GET /projects/:id/snippets/:snippet_id/notes?sort=asc&order_by=updated_at
``` ```
...@@ -185,7 +185,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -185,7 +185,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single note for a given snippet. Returns a single note for a given snippet.
``` ```plaintext
GET /projects/:id/snippets/:snippet_id/notes/:note_id GET /projects/:id/snippets/:snippet_id/notes/:note_id
``` ```
...@@ -223,7 +223,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -223,7 +223,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Creates a new note for a single snippet. Snippet notes are comments users can post to a snippet. Creates a new note for a single snippet. Snippet notes are comments users can post to a snippet.
If you create a note where the body only contains an Award Emoji, you'll receive this object back. If you create a note where the body only contains an Award Emoji, you'll receive this object back.
``` ```plaintext
POST /projects/:id/snippets/:snippet_id/notes POST /projects/:id/snippets/:snippet_id/notes
``` ```
...@@ -242,7 +242,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -242,7 +242,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Modify existing note of a snippet. Modify existing note of a snippet.
``` ```plaintext
PUT /projects/:id/snippets/:snippet_id/notes/:note_id PUT /projects/:id/snippets/:snippet_id/notes/:note_id
``` ```
...@@ -261,7 +261,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab. ...@@ -261,7 +261,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing note of a snippet. Deletes an existing note of a snippet.
``` ```plaintext
DELETE /projects/:id/snippets/:snippet_id/notes/:note_id DELETE /projects/:id/snippets/:snippet_id/notes/:note_id
``` ```
...@@ -283,7 +283,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl ...@@ -283,7 +283,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Gets a list of all notes for a single merge request. Gets a list of all notes for a single merge request.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/notes GET /projects/:id/merge_requests/:merge_request_iid/notes
GET /projects/:id/merge_requests/:merge_request_iid/notes?sort=asc&order_by=updated_at GET /projects/:id/merge_requests/:merge_request_iid/notes?sort=asc&order_by=updated_at
``` ```
...@@ -303,7 +303,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -303,7 +303,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single note for a given merge request. Returns a single note for a given merge request.
``` ```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/notes/:note_id GET /projects/:id/merge_requests/:merge_request_iid/notes/:note_id
``` ```
...@@ -346,7 +346,7 @@ Creates a new note for a single merge request. ...@@ -346,7 +346,7 @@ Creates a new note for a single merge request.
If you create a note where the body only contains an Award Emoji, you'll receive If you create a note where the body only contains an Award Emoji, you'll receive
this object back. this object back.
``` ```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/notes POST /projects/:id/merge_requests/:merge_request_iid/notes
``` ```
...@@ -361,7 +361,7 @@ Parameters: ...@@ -361,7 +361,7 @@ Parameters:
Modify existing note of a merge request. Modify existing note of a merge request.
``` ```plaintext
PUT /projects/:id/merge_requests/:merge_request_iid/notes/:note_id PUT /projects/:id/merge_requests/:merge_request_iid/notes/:note_id
``` ```
...@@ -380,7 +380,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab. ...@@ -380,7 +380,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing note of a merge request. Deletes an existing note of a merge request.
``` ```plaintext
DELETE /projects/:id/merge_requests/:merge_request_iid/notes/:note_id DELETE /projects/:id/merge_requests/:merge_request_iid/notes/:note_id
``` ```
...@@ -402,7 +402,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl ...@@ -402,7 +402,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Gets a list of all notes for a single epic. Epic notes are comments users can post to an epic. Gets a list of all notes for a single epic. Epic notes are comments users can post to an epic.
``` ```plaintext
GET /groups/:id/epics/:epic_id/notes GET /groups/:id/epics/:epic_id/notes
GET /groups/:id/epics/:epic_id/notes?sort=asc&order_by=updated_at GET /groups/:id/epics/:epic_id/notes?sort=asc&order_by=updated_at
``` ```
...@@ -422,7 +422,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -422,7 +422,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single note for a given epic. Returns a single note for a given epic.
``` ```plaintext
GET /groups/:id/epics/:epic_id/notes/:note_id GET /groups/:id/epics/:epic_id/notes/:note_id
``` ```
...@@ -462,7 +462,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -462,7 +462,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Creates a new note for a single epic. Epic notes are comments users can post to an epic. Creates a new note for a single epic. Epic notes are comments users can post to an epic.
If you create a note where the body only contains an Award Emoji, you'll receive this object back. If you create a note where the body only contains an Award Emoji, you'll receive this object back.
``` ```plaintext
POST /groups/:id/epics/:epic_id/notes POST /groups/:id/epics/:epic_id/notes
``` ```
...@@ -482,7 +482,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -482,7 +482,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Modify existing note of an epic. Modify existing note of an epic.
``` ```plaintext
PUT /groups/:id/epics/:epic_id/notes/:note_id PUT /groups/:id/epics/:epic_id/notes/:note_id
``` ```
...@@ -503,7 +503,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab. ...@@ -503,7 +503,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing note of an epic. Deletes an existing note of an epic.
``` ```plaintext
DELETE /groups/:id/epics/:epic_id/notes/:note_id DELETE /groups/:id/epics/:epic_id/notes/:note_id
``` ```
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
The notification levels are defined in the `NotificationSetting.level` model enumeration. Currently, these levels are recognized: The notification levels are defined in the `NotificationSetting.level` model enumeration. Currently, these levels are recognized:
``` ```plaintext
disabled disabled
participating participating
watch watch
...@@ -37,7 +37,7 @@ If the `custom` level is used, specific email events can be controlled. Availabl ...@@ -37,7 +37,7 @@ If the `custom` level is used, specific email events can be controlled. Availabl
Get current notification settings and email address. Get current notification settings and email address.
``` ```plaintext
GET /notification_settings GET /notification_settings
``` ```
...@@ -58,7 +58,7 @@ Example response: ...@@ -58,7 +58,7 @@ Example response:
Update current notification settings and email address. Update current notification settings and email address.
``` ```plaintext
PUT /notification_settings PUT /notification_settings
``` ```
...@@ -99,7 +99,7 @@ Example response: ...@@ -99,7 +99,7 @@ Example response:
Get current group or project notification settings. Get current group or project notification settings.
``` ```plaintext
GET /groups/:id/notification_settings GET /groups/:id/notification_settings
GET /projects/:id/notification_settings GET /projects/:id/notification_settings
``` ```
...@@ -125,7 +125,7 @@ Example response: ...@@ -125,7 +125,7 @@ Example response:
Update current group/project notification settings. Update current group/project notification settings.
``` ```plaintext
PUT /groups/:id/notification_settings PUT /groups/:id/notification_settings
PUT /projects/:id/notification_settings PUT /projects/:id/notification_settings
``` ```
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
**CRUD for repository files** **CRUD for repository files**
**Create, read, update and delete repository files using this API** **Create, read, update, and delete repository files using this API**
The different scopes available using [personal access tokens](../user/profile/personal_access_tokens.md) are depicted The different scopes available using [personal access tokens](../user/profile/personal_access_tokens.md) are depicted
in the following table. in the following table.
...@@ -242,7 +242,7 @@ If the commit fails for any reason we return a 400 error with a non-specific ...@@ -242,7 +242,7 @@ If the commit fails for any reason we return a 400 error with a non-specific
error message. Possible causes for a failed commit include: error message. Possible causes for a failed commit include:
- the `file_path` contained `/../` (attempted directory traversal); - the `file_path` contained `/../` (attempted directory traversal);
- the new file contents were identical to the current file contents, i.e. the - the new file contents were identical to the current file contents. That is, the
user tried to make an empty commit; user tried to make an empty commit;
- the branch was updated by a Git push while the file edit was in progress. - the branch was updated by a Git push while the file edit was in progress.
......
# Resource label events API # Resource label events API
Resource label events keep track about who, when, and which label was added or removed to an issuable. Resource label events keep track about who, when, and which label was added to, or removed from, an issuable.
## Issues ## Issues
......
...@@ -567,7 +567,7 @@ Set Hangouts Chat service for a project. ...@@ -567,7 +567,7 @@ Set Hangouts Chat service for a project.
PUT /projects/:id/services/hangouts-chat PUT /projects/:id/services/hangouts-chat
``` ```
>**Note:** Specific event parameters (e.g. `push_events` flag) were [introduced in v10.4][11435] >**Note:** Specific event parameters (for example, `push_events` flag) were [introduced in v10.4][11435]
Parameters: Parameters:
...@@ -833,7 +833,7 @@ DELETE /projects/:id/services/mattermost-slash-commands ...@@ -833,7 +833,7 @@ DELETE /projects/:id/services/mattermost-slash-commands
## Packagist ## Packagist
Update your project on Packagist, the main Composer repository, when commits or tags are pushed to GitLab. Update your project on Packagist (the main Composer repository) when commits or tags are pushed to GitLab.
### Create/Edit Packagist service ### Create/Edit Packagist service
...@@ -1068,7 +1068,7 @@ Set Slack service for a project. ...@@ -1068,7 +1068,7 @@ Set Slack service for a project.
PUT /projects/:id/services/slack PUT /projects/:id/services/slack
``` ```
>**Note:** Specific event parameters (e.g. `push_events` flag and `push_channel`) were [introduced in v10.4][11435] >**Note:** Specific event parameters (for example, `push_events` flag and `push_channel`) were [introduced in v10.4][11435]
Parameters: Parameters:
...@@ -1177,7 +1177,7 @@ Set Mattermost service for a project. ...@@ -1177,7 +1177,7 @@ Set Mattermost service for a project.
PUT /projects/:id/services/mattermost PUT /projects/:id/services/mattermost
``` ```
>**Note:** Specific event parameters (e.g. `push_events` flag and `push_channel`) were [introduced in v10.4][11435] >**Note:** Specific event parameters (for example, `push_events` flag and `push_channel`) were [introduced in v10.4][11435]
Parameters: Parameters:
......
This diff is collapsed.
...@@ -435,8 +435,8 @@ Parameters: ...@@ -435,8 +435,8 @@ Parameters:
On password update, user will be forced to change it upon next login. On password update, user will be forced to change it upon next login.
Note, at the moment this method does only return a `404` error, Note, at the moment this method does only return a `404` error,
even in cases where a `409` (Conflict) would be more appropriate, even in cases where a `409` (Conflict) would be more appropriate.
e.g. when renaming the email address to some existing one. For example, when renaming the email address to some existing one.
## Delete authentication identity from user ## Delete authentication identity from user
...@@ -1389,7 +1389,7 @@ The activities that update the timestamp are: ...@@ -1389,7 +1389,7 @@ The activities that update the timestamp are:
- Git HTTP/SSH activities (such as clone, push) - Git HTTP/SSH activities (such as clone, push)
- User logging in into GitLab - User logging in into GitLab
- User visiting pages related to Dashboards, Projects, Issues and Merge Requests ([introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/54947) in GitLab 11.8) - User visiting pages related to Dashboards, Projects, Issues, and Merge Requests ([introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/54947) in GitLab 11.8)
- User using the API - User using the API
By default, it shows the activity for all users in the last 6 months, but this can be By default, it shows the activity for all users in the last 6 months, but this can be
...@@ -1403,7 +1403,7 @@ Parameters: ...@@ -1403,7 +1403,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `from` | string | no | Date string in the format YEAR-MONTH-DAY, e.g. `2016-03-11`. Defaults to 6 months ago. | | `from` | string | no | Date string in the format YEAR-MONTH-DAY. For example, `2016-03-11`. Defaults to 6 months ago. |
```shell ```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/user/activities curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/user/activities
......
...@@ -12,7 +12,7 @@ run applications in independent "containers" that are run within a single Linux ...@@ -12,7 +12,7 @@ run applications in independent "containers" that are run within a single Linux
instance. [Docker Hub][hub] has a rich database of pre-built images that can be instance. [Docker Hub][hub] has a rich database of pre-built images that can be
used to test and build your applications. used to test and build your applications.
Docker, when used with GitLab CI, runs each job in a separate and isolated When used with GitLab CI, Docker runs each job in a separate and isolated
container using the predefined image that is set up in container using the predefined image that is set up in
[`.gitlab-ci.yml`](../yaml/README.md). [`.gitlab-ci.yml`](../yaml/README.md).
......
...@@ -118,7 +118,7 @@ NOTE: **Note:** ...@@ -118,7 +118,7 @@ NOTE: **Note:**
The `environment` keyword defines where the app is deployed. The `environment` keyword defines where the app is deployed.
The environment `name` and `url` is exposed in various places The environment `name` and `url` is exposed in various places
within GitLab. Each time a job that has an environment specified within GitLab. Each time a job that has an environment specified
succeeds, a deployment is recorded, along with the Git SHA and environment name. succeeds, a deployment is recorded, along with the Git SHA, and environment name.
CAUTION: **Caution**: CAUTION: **Caution**:
Some characters are not allowed in environment names. Use only letters, Some characters are not allowed in environment names. Use only letters,
......
...@@ -44,7 +44,7 @@ All these operations will put all files into a `build` folder, which is ready to ...@@ -44,7 +44,7 @@ All these operations will put all files into a `build` folder, which is ready to
## How to transfer files to a live server ## How to transfer files to a live server
You have multiple options: rsync, scp, sftp and so on. For now, we will use scp. You have multiple options: rsync, scp, sftp, and so on. For now, we will use scp.
To make this work, you need to add a GitLab CI/CD Variable (accessible on `gitlab.example/your-project-name/variables`). That variable will be called `STAGING_PRIVATE_KEY` and it's the **private** SSH key of your server. To make this work, you need to add a GitLab CI/CD Variable (accessible on `gitlab.example/your-project-name/variables`). That variable will be called `STAGING_PRIVATE_KEY` and it's the **private** SSH key of your server.
......
...@@ -22,7 +22,7 @@ and you know how to use GitLab. ...@@ -22,7 +22,7 @@ and you know how to use GitLab.
Laravel is a high quality web framework written in PHP. Laravel is a high quality web framework written in PHP.
It has a great community with a [fantastic documentation](https://laravel.com/docs). It has a great community with a [fantastic documentation](https://laravel.com/docs).
Aside from the usual routing, controllers, requests, responses, views, and (blade) templates, out of the box Laravel provides plenty of additional services such as cache, events, localization, authentication and many others. Aside from the usual routing, controllers, requests, responses, views, and (blade) templates, out of the box Laravel provides plenty of additional services such as cache, events, localization, authentication, and many others.
We will use [Envoy](https://laravel.com/docs/master/envoy) as an SSH task runner based on PHP. We will use [Envoy](https://laravel.com/docs/master/envoy) as an SSH task runner based on PHP.
It uses a clean, minimal [Blade syntax](https://laravel.com/docs/master/blade) to set up tasks that can run on remote servers, such as, cloning your project from the repository, installing the Composer dependencies, and running [Artisan commands](https://laravel.com/docs/master/artisan). It uses a clean, minimal [Blade syntax](https://laravel.com/docs/master/blade) to set up tasks that can run on remote servers, such as, cloning your project from the repository, installing the Composer dependencies, and running [Artisan commands](https://laravel.com/docs/master/artisan).
...@@ -82,7 +82,7 @@ git push -u origin master ...@@ -82,7 +82,7 @@ git push -u origin master
## Configure the production server ## Configure the production server
Before we begin setting up Envoy and GitLab CI/CD, let's quickly make sure the production server is ready for deployment. Before we begin setting up Envoy and GitLab CI/CD, let's quickly make sure the production server is ready for deployment.
We have installed LEMP stack which stands for Linux, NGINX, MySQL and PHP on our Ubuntu 16.04. We have installed LEMP stack which stands for Linux, NGINX, MySQL, and PHP on our Ubuntu 16.04.
### Create a new user ### Create a new user
...@@ -194,7 +194,7 @@ To start, we create an `Envoy.blade.php` in the root of our app with a simple ta ...@@ -194,7 +194,7 @@ To start, we create an `Envoy.blade.php` in the root of our app with a simple ta
@endtask @endtask
``` ```
As you may expect, we have an array within `@servers` directive at the top of the file, which contains a key named `web` with a value of the server's address (e.g. `deployer@192.168.1.1`). As you may expect, we have an array within `@servers` directive at the top of the file, which contains a key named `web` with a value of the server's address (for example, `deployer@192.168.1.1`).
Then within our `@task` directive we define the bash commands that should be run on the server when the task is executed. Then within our `@task` directive we define the bash commands that should be run on the server when the task is executed.
On the local machine use the `run` command to run Envoy tasks. On the local machine use the `run` command to run Envoy tasks.
......
doc/ci/img/collapsible_log_v12_6.png

94.3 KB | W: | H:

doc/ci/img/collapsible_log_v12_6.png

288 KB | W: | H:

doc/ci/img/collapsible_log_v12_6.png
doc/ci/img/collapsible_log_v12_6.png
doc/ci/img/collapsible_log_v12_6.png
doc/ci/img/collapsible_log_v12_6.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -104,7 +104,7 @@ and that your repository is clean. ...@@ -104,7 +104,7 @@ and that your repository is clean.
[`GIT_CLEAN_FLAGS`](../yaml/README.md#git-clean-flags) is disabled when set [`GIT_CLEAN_FLAGS`](../yaml/README.md#git-clean-flags) is disabled when set
to `none`. On very big repositories, this might be desired because `git to `none`. On very big repositories, this might be desired because `git
clean` is disk I/O intensive. Controlling that with `GIT_CLEAN_FLAGS: -ffdx clean` is disk I/O intensive. Controlling that with `GIT_CLEAN_FLAGS: -ffdx
-e .build/`, for example, allows you to control and disable removal of some -e .build/` (for example) allows you to control and disable removal of some
directories within the worktree between subsequent runs, which can speed-up directories within the worktree between subsequent runs, which can speed-up
the incremental builds. This has the biggest effect if you re-use existing the incremental builds. This has the biggest effect if you re-use existing
machines and have an existing worktree that you can re-use for builds. machines and have an existing worktree that you can re-use for builds.
......
...@@ -89,7 +89,7 @@ Read the [documentation on Merge Trains](pipelines_for_merged_results/merge_trai ...@@ -89,7 +89,7 @@ Read the [documentation on Merge Trains](pipelines_for_merged_results/merge_trai
The behavior of the `only: [merge_requests]` parameter is such that _only_ jobs with The behavior of the `only: [merge_requests]` parameter is such that _only_ jobs with
that parameter are run in the context of a merge request; no other jobs will be run. that parameter are run in the context of a merge request; no other jobs will be run.
However, you may want to reverse this behavior, having all of your jobs to run _except_ However, you can invert this behavior and have all of your jobs run _except_
for one or two. for one or two.
Consider the following pipeline, with jobs `A`, `B`, and `C`. Imagine you want: Consider the following pipeline, with jobs `A`, `B`, and `C`. Imagine you want:
......
...@@ -111,7 +111,7 @@ To check and set these feature flag values, please ask an administrator to: ...@@ -111,7 +111,7 @@ To check and set these feature flag values, please ask an administrator to:
Since pipelines for merged results are a run on a merge ref of a merge request Since pipelines for merged results are a run on a merge ref of a merge request
(`refs/merge-requests/<iid>/merge`), the Git reference could be overwritten at an (`refs/merge-requests/<iid>/merge`), the Git reference could be overwritten at an
unexpected timing, for example, when a source or target branch is advanced. unexpected timing. For example, when a source or target branch is advanced.
In this case, the pipeline fails because of `fatal: reference is not a tree:` error, In this case, the pipeline fails because of `fatal: reference is not a tree:` error,
which indicates that the checkout-SHA is not found in the merge ref. which indicates that the checkout-SHA is not found in the merge ref.
......
...@@ -21,7 +21,7 @@ just as it works in the current state. However, instead of queuing and waiting, ...@@ -21,7 +21,7 @@ just as it works in the current state. However, instead of queuing and waiting,
each item takes the completed state of the previous (pending) merge ref, adds its own changes, each item takes the completed state of the previous (pending) merge ref, adds its own changes,
and starts the pipeline immediately in parallel under the assumption that everything is going to pass. and starts the pipeline immediately in parallel under the assumption that everything is going to pass.
In this way, if all the pipelines in the train merge successfully, no pipeline time is wasted either queuing or retrying. This means that if all the pipelines in the train merge successfully, no pipeline time is wasted either queuing or retrying.
If the button is subsequently pressed in a different MR, instead of creating a new pipeline for the target branch, If the button is subsequently pressed in a different MR, instead of creating a new pipeline for the target branch,
it creates a new pipeline targeting the merge result of the previous MR plus the target branch. it creates a new pipeline targeting the merge result of the previous MR plus the target branch.
Pipelines invalidated through failures are immediately canceled and requeued. Pipelines invalidated through failures are immediately canceled and requeued.
...@@ -83,7 +83,7 @@ button while the latest pipeline is running. ...@@ -83,7 +83,7 @@ button while the latest pipeline is running.
## Immediately merge a merge request with a merge train ## Immediately merge a merge request with a merge train
In case, you have a high-priority merge request (e.g. critical patch) to be merged urgently, In the case where you have a high-priority merge request (for example, a critical patch) to be merged urgently,
you can use **Merge Immediately** option for bypassing the merge train. you can use **Merge Immediately** option for bypassing the merge train.
This is the fastest option to get the change merged into the target branch. This is the fastest option to get the change merged into the target branch.
......
...@@ -38,7 +38,7 @@ Let's assume you deploy your web app from different projects in GitLab: ...@@ -38,7 +38,7 @@ Let's assume you deploy your web app from different projects in GitLab:
- One for the paid version add-ons, which also pass through builds and tests - One for the paid version add-ons, which also pass through builds and tests
- One for the documentation, which also builds, tests, and deploys with an SSG - One for the documentation, which also builds, tests, and deploys with an SSG
With Multi-Project Pipelines, you can visualize the entire pipeline, including all stages of builds and tests for the three projects. With Multi-Project Pipelines you can visualize the entire pipeline, including all build and test stages for the three projects.
## Triggering multi-project pipelines through API ## Triggering multi-project pipelines through API
......
...@@ -107,50 +107,6 @@ For example: ...@@ -107,50 +107,6 @@ For example:
![Pipeline mini graph sorting](img/pipelines_mini_graph_sorting.png) ![Pipeline mini graph sorting](img/pipelines_mini_graph_sorting.png)
### How pipeline duration is calculated
Total running time for a given pipeline excludes retries and pending
(queued) time.
Each job is represented as a `Period`, which consists of:
- `Period#first` (when the job started).
- `Period#last` (when the job finished).
A simple example is:
- A (1, 3)
- B (2, 4)
- C (6, 7)
In the example:
- A begins at 1 and ends at 3.
- B begins at 2 and ends at 4.
- C begins at 6 and ends at 7.
Visually, it can be viewed as:
```text
0 1 2 3 4 5 6 7
AAAAAAA
BBBBBBB
CCCC
```
The union of A, B, and C is (1, 4) and (6, 7). Therefore, the total running time is:
```text
(4 - 1) + (7 - 6) => 4
```
### How pipeline quotas are used
Each user has a personal pipeline quota that tracks the usage of shared runners in all personal projects.
Each group has a [usage quota](../subscriptions/index.md#ci-pipeline-minutes) that tracks the usage of shared runners for all projects created within the group.
When a pipeline is triggered, regardless of who triggered it, the pipeline quota for the project owner's [namespace](../user/group/index.md#namespaces) is used. In this case, the namespace can be the user or group that owns the project.
### Expanding and collapsing job log sections ### Expanding and collapsing job log sections
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/14664) in GitLab > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/14664) in GitLab
...@@ -203,6 +159,65 @@ this line should be hidden when collapsed ...@@ -203,6 +159,65 @@ this line should be hidden when collapsed
section_end:1560896353:my_first_section\r\e[0K section_end:1560896353:my_first_section\r\e[0K
``` ```
### Pipeline success and duration charts
> - Introduced in GitLab 3.1.1 as Commit Stats, and later renamed to Pipeline Charts.
> - [Renamed](https://gitlab.com/gitlab-org/gitlab/issues/38318) to CI / CD Analytics in GitLab 12.8.
GitLab tracks the history of your pipeline successes and failures, as well as how long each pipeline ran. To view this information, go to **Analytics > CI / CD Analytics**.
View successful pipelines:
![Successful pipelines](img/pipelines_success_chart.png)
View pipeline duration history:
![Pipeline duration](img/pipelines_duration_chart.png)
## Pipeline quotas
Each user has a personal pipeline quota that tracks the usage of shared runners in all personal projects.
Each group has a [usage quota](../subscriptions/index.md#ci-pipeline-minutes) that tracks the usage of shared runners for all projects created within the group.
When a pipeline is triggered, regardless of who triggered it, the pipeline quota for the project owner's [namespace](../user/group/index.md#namespaces) is used. In this case, the namespace can be the user or group that owns the project.
### How pipeline duration is calculated
Total running time for a given pipeline excludes retries and pending
(queued) time.
Each job is represented as a `Period`, which consists of:
- `Period#first` (when the job started).
- `Period#last` (when the job finished).
A simple example is:
- A (1, 3)
- B (2, 4)
- C (6, 7)
In the example:
- A begins at 1 and ends at 3.
- B begins at 2 and ends at 4.
- C begins at 6 and ends at 7.
Visually, it can be viewed as:
```text
0 1 2 3 4 5 6 7
AAAAAAA
BBBBBBB
CCCC
```
The union of A, B, and C is (1, 4) and (6, 7). Therefore, the total running time is:
```text
(4 - 1) + (7 - 6) => 4
```
## Configuring pipelines ## Configuring pipelines
Pipelines, and their component jobs and stages, are defined in the [`.gitlab-ci.yml`](yaml/README.md) file for each project. Pipelines, and their component jobs and stages, are defined in the [`.gitlab-ci.yml`](yaml/README.md) file for each project.
......
...@@ -195,11 +195,11 @@ We have following jobs in queue: ...@@ -195,11 +195,11 @@ We have following jobs in queue:
With the fair usage algorithm jobs are assigned in following order: With the fair usage algorithm jobs are assigned in following order:
1. Job 1 is chosen first, because it has the lowest job number from projects with no running jobs (i.e. all projects) 1. Job 1 is chosen first, because it has the lowest job number from projects with no running jobs (that is, all projects)
1. Job 4 is next, because 4 is now the lowest job number from projects with no running jobs (Project 1 has a job running) 1. Job 4 is next, because 4 is now the lowest job number from projects with no running jobs (Project 1 has a job running)
1. Job 6 is next, because 6 is now the lowest job number from projects with no running jobs (Projects 1 and 2 have jobs running) 1. Job 6 is next, because 6 is now the lowest job number from projects with no running jobs (Projects 1 and 2 have jobs running)
1. Job 2 is next, because, of projects with the lowest number of jobs running (each has 1), it is the lowest job number 1. Job 2 is next, because, of projects with the lowest number of jobs running (each has 1), it is the lowest job number
1. Job 5 is next, because Project 1 now has 2 jobs running, and between Projects 2 and 3, Job 5 is the lowest remaining job number 1. Job 5 is next, because Project 1 now has 2 jobs running and Job 5 is the lowest remaining job number between Projects 2 and 3.
1. Lastly we choose Job 3... because it's the only job left 1. Lastly we choose Job 3... because it's the only job left
--- ---
...@@ -217,7 +217,7 @@ We have following jobs in queue: ...@@ -217,7 +217,7 @@ We have following jobs in queue:
With the fair usage algorithm jobs are assigned in following order: With the fair usage algorithm jobs are assigned in following order:
1. Job 1 is chosen first, because it has the lowest job number from projects with no running jobs (i.e. all projects) 1. Job 1 is chosen first, because it has the lowest job number from projects with no running jobs (that is, all projects)
1. We finish job 1 1. We finish job 1
1. Job 2 is next, because, having finished Job 1, all projects have 0 jobs running again, and 2 is the lowest available job number 1. Job 2 is next, because, having finished Job 1, all projects have 0 jobs running again, and 2 is the lowest available job number
1. Job 4 is next, because with Project 1 running a job, 4 is the lowest number from projects running no jobs (Projects 2 and 3) 1. Job 4 is next, because with Project 1 running a job, 4 is the lowest number from projects running no jobs (Projects 2 and 3)
...@@ -307,7 +307,7 @@ Example 2: ...@@ -307,7 +307,7 @@ Example 2:
For each Runner you can specify a _maximum job timeout_. Such timeout, For each Runner you can specify a _maximum job timeout_. Such timeout,
if smaller than [project defined timeout], will take the precedence. This if smaller than [project defined timeout], will take the precedence. This
feature can be used to prevent Shared Runner from being appropriated feature can be used to prevent Shared Runner from being appropriated
by a project by setting a ridiculous big timeout (e.g. one week). by a project by setting a ridiculous big timeout (for example, one week).
When not configured, Runner will not override project timeout. When not configured, Runner will not override project timeout.
......
...@@ -167,7 +167,7 @@ build_docs: ...@@ -167,7 +167,7 @@ build_docs:
- tags - tags
``` ```
Now, whenever a new tag is pushed on project A, the job will run and the This means that whenever a new tag is pushed on project A, the job will run and the
`build_docs` job will be executed, triggering a rebuild of project B. The `build_docs` job will be executed, triggering a rebuild of project B. The
`stage: deploy` ensures that this job will run only after all jobs with `stage: deploy` ensures that this job will run only after all jobs with
`stage: test` complete successfully. `stage: test` complete successfully.
......
...@@ -2905,7 +2905,7 @@ your configuration file is on. In other words, when using a `include:local`, mak ...@@ -2905,7 +2905,7 @@ your configuration file is on. In other words, when using a `include:local`, mak
sure that both `.gitlab-ci.yml` and the local file are on the same branch. sure that both `.gitlab-ci.yml` and the local file are on the same branch.
All [nested includes](#nested-includes) will be executed in the scope of the same project, All [nested includes](#nested-includes) will be executed in the scope of the same project,
so it is possible to use local, project, remote or template includes. so it is possible to use local, project, remote, or template includes.
NOTE: **Note:** NOTE: **Note:**
Including local files through Git submodules paths is not supported. Including local files through Git submodules paths is not supported.
......
...@@ -76,6 +76,28 @@ a new presenter specifically for GraphQL. ...@@ -76,6 +76,28 @@ a new presenter specifically for GraphQL.
The presenter is initialized using the object resolved by a field, and The presenter is initialized using the object resolved by a field, and
the context. the context.
### Nullable fields
GraphQL allows fields to be be "nullable" or "non-nullable". The former means
that `null` may be returned instead of a value of the specified type. **In
general**, you should prefer using nullable fields to non-nullable ones, for
the following reasons:
- It's common for data to switch from required to not-required, and back again
- Even when there is no prospect of a field becoming optional, it may not be **available** at query time
- For instance, the `content` of a blob may need to be looked up from Gitaly
- If the `content` is nullable, we can return a **partial** response, instead of failing the whole query
- Changing from a non-nullable field to a nullable field is difficult with a versionless schema
Non-nullable fields should only be used when a field is required, very unlikely
to become optional in the future, and very easy to calculate. An example would
be `id` fields.
Further reading:
- [GraphQL Best Practices Guide](https://graphql.org/learn/best-practices/#nullability)
- [Using nullability in GraphQL](https://blog.apollographql.com/using-nullability-in-graphql-2254f84c4ed7)
### Exposing Global IDs ### Exposing Global IDs
When exposing an `ID` field on a type, we will by default try to When exposing an `ID` field on a type, we will by default try to
......
This diff is collapsed.
...@@ -128,16 +128,6 @@ version and rotates the old one: ...@@ -128,16 +128,6 @@ version and rotates the old one:
- `online`: The 3 latest stable versions. - `online`: The 3 latest stable versions.
- `offline`: All the previous versions offered as an offline archive. - `offline`: All the previous versions offered as an offline archive.
1. **Add the new offline version in the 404 page redirect script:**
Since we're deprecating the oldest version each month, we need to redirect
those URLs in order not to create [404 entries](https://gitlab.com/gitlab-org/gitlab-docs/issues/221).
There's a temporary hack for now:
1. Edit `content/404.html`, making sure all offline versions under
`content/_data/versions.yaml` are in the JavaScript snippet at the end of
the document.
1. **Update the `:latest` and `:archives` Docker images:** 1. **Update the `:latest` and `:archives` Docker images:**
The following two Dockerfiles need to be updated: The following two Dockerfiles need to be updated:
......
...@@ -4,6 +4,8 @@ module API ...@@ -4,6 +4,8 @@ module API
class ProjectImport < Grape::API class ProjectImport < Grape::API
include PaginationParams include PaginationParams
MAXIMUM_FILE_SIZE = 50.megabytes
helpers Helpers::ProjectsHelpers helpers Helpers::ProjectsHelpers
helpers Helpers::FileUploadHelpers helpers Helpers::FileUploadHelpers
...@@ -19,6 +21,10 @@ module API ...@@ -19,6 +21,10 @@ module API
def rate_limiter def rate_limiter
::Gitlab::ApplicationRateLimiter ::Gitlab::ApplicationRateLimiter
end end
def with_workhorse_upload_acceleration?
request.headers[Gitlab::Workhorse::INTERNAL_API_REQUEST_HEADER].present?
end
end end
before do before do
...@@ -26,10 +32,25 @@ module API ...@@ -26,10 +32,25 @@ module API
end end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
desc 'Workhorse authorize the project import upload' do
detail 'This feature was introduced in GitLab 12.9'
end
post 'import/authorize' do
require_gitlab_workhorse!
status 200
content_type Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE
ImportExportUploader.workhorse_authorize(has_length: false, maximum_size: MAXIMUM_FILE_SIZE)
end
params do params do
requires :path, type: String, desc: 'The new project path and name' requires :path, type: String, desc: 'The new project path and name'
# TODO: remove rubocop disable - https://gitlab.com/gitlab-org/gitlab/issues/14960 # TODO: remove rubocop disable - https://gitlab.com/gitlab-org/gitlab/issues/14960
requires :file, type: File, desc: 'The project export file to be imported' # rubocop:disable Scalability/FileUploads # and mark WH fields as required (instead of optional) after the WH version including
# https://gitlab.com/gitlab-org/gitlab-workhorse/-/merge_requests/459
# is deployed and GITLAB_WORKHORSE_VERSION is updated accordingly.
requires :file, types: [::API::Validations::Types::WorkhorseFile, File], desc: 'The project export file to be imported' # rubocop:disable Scalability/FileUploads
optional :name, type: String, desc: 'The name of the project to be imported. Defaults to the path of the project if not provided.' optional :name, type: String, desc: 'The name of the project to be imported. Defaults to the path of the project if not provided.'
optional :namespace, type: String, desc: "The ID or name of the namespace that the project will be imported into. Defaults to the current user's namespace." optional :namespace, type: String, desc: "The ID or name of the namespace that the project will be imported into. Defaults to the current user's namespace."
optional :overwrite, type: Boolean, default: false, desc: 'If there is a project in the same namespace and with the same name overwrite it' optional :overwrite, type: Boolean, default: false, desc: 'If there is a project in the same namespace and with the same name overwrite it'
...@@ -38,12 +59,24 @@ module API ...@@ -38,12 +59,24 @@ module API
desc: 'New project params to override values in the export' do desc: 'New project params to override values in the export' do
use :optional_project_params use :optional_project_params
end end
optional 'file.path', type: String, desc: 'Path to locally stored body (generated by Workhorse)'
optional 'file.name', type: String, desc: 'Real filename as send in Content-Disposition (generated by Workhorse)'
optional 'file.type', type: String, desc: 'Real content type as send in Content-Type (generated by Workhorse)'
optional 'file.size', type: Integer, desc: 'Real size of file (generated by Workhorse)'
optional 'file.md5', type: String, desc: 'MD5 checksum of the file (generated by Workhorse)'
optional 'file.sha1', type: String, desc: 'SHA1 checksum of the file (generated by Workhorse)'
optional 'file.sha256', type: String, desc: 'SHA256 checksum of the file (generated by Workhorse)'
optional 'file.etag', type: String, desc: 'Etag of the file (generated by Workhorse)'
optional 'file.remote_id', type: String, desc: 'Remote_id of the file (generated by Workhorse)'
optional 'file.remote_url', type: String, desc: 'Remote_url of the file (generated by Workhorse)'
end end
desc 'Create a new project import' do desc 'Create a new project import' do
detail 'This feature was introduced in GitLab 10.6.' detail 'This feature was introduced in GitLab 10.6.'
success Entities::ProjectImportStatus success Entities::ProjectImportStatus
end end
post 'import' do post 'import' do
require_gitlab_workhorse! if with_workhorse_upload_acceleration?
key = "project_import".to_sym key = "project_import".to_sym
if throttled?(key, [current_user, key]) if throttled?(key, [current_user, key])
...@@ -52,8 +85,6 @@ module API ...@@ -52,8 +85,6 @@ module API
render_api_error!({ error: _('This endpoint has been requested too many times. Try again later.') }, 429) render_api_error!({ error: _('This endpoint has been requested too many times. Try again later.') }, 429)
end end
validate_file!
Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-foss/issues/42437') Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-foss/issues/42437')
namespace = if import_params[:namespace] namespace = if import_params[:namespace]
...@@ -62,11 +93,21 @@ module API ...@@ -62,11 +93,21 @@ module API
current_user.namespace current_user.namespace
end end
# TODO: remove the condition after the WH version including
# https://gitlab.com/gitlab-org/gitlab-workhorse/-/merge_requests/459
# is deployed and GITLAB_WORKHORSE_VERSION is updated accordingly.
file = if with_workhorse_upload_acceleration?
import_params[:file] || bad_request!('Unable to process project import file')
else
validate_file!
import_params[:file]['tempfile']
end
project_params = { project_params = {
path: import_params[:path], path: import_params[:path],
namespace_id: namespace.id, namespace_id: namespace.id,
name: import_params[:name], name: import_params[:name],
file: import_params[:file]['tempfile'], file: file,
overwrite: import_params[:overwrite] overwrite: import_params[:overwrite]
} }
......
...@@ -11576,6 +11576,9 @@ msgstr[1] "" ...@@ -11576,6 +11576,9 @@ msgstr[1] ""
msgid "Line changes" msgid "Line changes"
msgstr "" msgstr ""
msgid "Link Prometheus monitoring to GitLab."
msgstr ""
msgid "Link copied" msgid "Link copied"
msgstr "" msgstr ""
...@@ -15374,6 +15377,9 @@ msgstr "" ...@@ -15374,6 +15377,9 @@ msgstr ""
msgid "ProjectsNew|Want to house several dependent projects under the same namespace? %{link_start}Create a group.%{link_end}" msgid "ProjectsNew|Want to house several dependent projects under the same namespace? %{link_start}Create a group.%{link_end}"
msgstr "" msgstr ""
msgid "Prometheus"
msgstr ""
msgid "PrometheusAlerts|%{count} alerts applied" msgid "PrometheusAlerts|%{count} alerts applied"
msgstr "" msgstr ""
......
...@@ -221,6 +221,12 @@ describe Gitlab::Profiler do ...@@ -221,6 +221,12 @@ describe Gitlab::Profiler do
.map { |(total)| total.to_f } .map { |(total)| total.to_f }
expect(output).to include('Kernel#sleep') expect(output).to include('Kernel#sleep')
if total_times != total_times.sort.reverse
warn "Profiler test failed, output is:"
warn output
end
expect(total_times).to eq(total_times.sort.reverse) expect(total_times).to eq(total_times.sort.reverse)
expect(total_times).not_to eq(total_times.uniq) expect(total_times).not_to eq(total_times.uniq)
end end
......
...@@ -3,11 +3,16 @@ ...@@ -3,11 +3,16 @@
require 'spec_helper' require 'spec_helper'
describe API::ProjectImport do describe API::ProjectImport do
include WorkhorseHelpers
let(:export_path) { "#{Dir.tmpdir}/project_export_spec" } let(:export_path) { "#{Dir.tmpdir}/project_export_spec" }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:file) { File.join('spec', 'features', 'projects', 'import_export', 'test_project_export.tar.gz') } let(:file) { File.join('spec', 'features', 'projects', 'import_export', 'test_project_export.tar.gz') }
let(:namespace) { create(:group) } let(:namespace) { create(:group) }
let(:workhorse_token) { JWT.encode({ 'iss' => 'gitlab-workhorse' }, Gitlab::Workhorse.secret, 'HS256') }
let(:workhorse_headers) { { 'GitLab-Workhorse' => '1.0', Gitlab::Workhorse::INTERNAL_API_REQUEST_HEADER => workhorse_token } }
before do before do
allow_any_instance_of(Gitlab::ImportExport).to receive(:storage_path).and_return(export_path) allow_any_instance_of(Gitlab::ImportExport).to receive(:storage_path).and_return(export_path)
stub_uploads_object_storage(FileUploader) stub_uploads_object_storage(FileUploader)
...@@ -209,6 +214,55 @@ describe API::ProjectImport do ...@@ -209,6 +214,55 @@ describe API::ProjectImport do
end end
end end
context 'with direct upload enabled' do
subject { upload_archive(file_upload, workhorse_headers, params) }
let(:file_name) { 'project_export.tar.gz' }
let!(:fog_connection) do
stub_uploads_object_storage(ImportExportUploader, direct_upload: true)
end
let(:tmp_object) do
fog_connection.directories.new(key: 'uploads').files.create(
key: "tmp/uploads/#{file_name}",
body: fixture_file_upload(file)
)
end
let(:file_upload) { fog_to_uploaded_file(tmp_object) }
let(:params) do
{
path: 'test-import-project',
namespace: namespace.id,
'file.remote_id' => file_name,
'file.size' => file_upload.size
}
end
before do
allow(ImportExportUploader).to receive(:workhorse_upload_path).and_return('/')
end
it 'accepts the request and stores the file' do
expect { subject }.to change { Project.count }.by(1)
expect(response).to have_gitlab_http_status(:created)
end
end
def upload_archive(file, headers = {}, params = {})
workhorse_finalize(
api("/projects/import", user),
method: :post,
file_key: :file,
params: params.merge(file: file_upload),
headers: headers,
send_rewritten_field: true
)
end
def stub_import(namespace) def stub_import(namespace)
expect_any_instance_of(ProjectImportState).to receive(:schedule) expect_any_instance_of(ProjectImportState).to receive(:schedule)
expect(::Projects::CreateService).to receive(:new).with(user, hash_including(namespace_id: namespace.id)).and_call_original expect(::Projects::CreateService).to receive(:new).with(user, hash_including(namespace_id: namespace.id)).and_call_original
...@@ -238,4 +292,59 @@ describe API::ProjectImport do ...@@ -238,4 +292,59 @@ describe API::ProjectImport do
'import_error' => 'error') 'import_error' => 'error')
end end
end end
describe 'POST /projects/import/authorize' do
subject { post api('/projects/import/authorize', user), headers: workhorse_headers }
it 'authorizes importing project with workhorse header' do
subject
expect(response).to have_gitlab_http_status(:ok)
expect(response.content_type.to_s).to eq(Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE)
end
it 'rejects requests that bypassed gitlab-workhorse' do
workhorse_headers.delete(Gitlab::Workhorse::INTERNAL_API_REQUEST_HEADER)
subject
expect(response).to have_gitlab_http_status(:forbidden)
end
context 'when using remote storage' do
context 'when direct upload is enabled' do
before do
stub_uploads_object_storage(ImportExportUploader, enabled: true, direct_upload: true)
end
it 'responds with status 200, location of file remote store and object details' do
subject
expect(response).to have_gitlab_http_status(:ok)
expect(response.content_type.to_s).to eq(Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE)
expect(json_response).not_to have_key('TempPath')
expect(json_response['RemoteObject']).to have_key('ID')
expect(json_response['RemoteObject']).to have_key('GetURL')
expect(json_response['RemoteObject']).to have_key('StoreURL')
expect(json_response['RemoteObject']).to have_key('DeleteURL')
expect(json_response['RemoteObject']).to have_key('MultipartUpload')
end
end
context 'when direct upload is disabled' do
before do
stub_uploads_object_storage(ImportExportUploader, enabled: true, direct_upload: false)
end
it 'handles as a local file' do
subject
expect(response).to have_gitlab_http_status(:ok)
expect(response.content_type.to_s).to eq(Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE)
expect(json_response['TempPath']).to eq(ImportExportUploader.workhorse_local_upload_path)
expect(json_response['RemoteObject']).to be_nil
end
end
end
end
end end
...@@ -32,12 +32,12 @@ module WorkhorseHelpers ...@@ -32,12 +32,12 @@ module WorkhorseHelpers
# workhorse_finalize will transform file_key inside params as if it was the finalize call of an inline object storage upload. # workhorse_finalize will transform file_key inside params as if it was the finalize call of an inline object storage upload.
# note that based on the content of the params it can simulate a disc acceleration or an object storage upload # note that based on the content of the params it can simulate a disc acceleration or an object storage upload
def workhorse_finalize(url, method: :post, file_key:, params:, headers: {}) def workhorse_finalize(url, method: :post, file_key:, params:, headers: {}, send_rewritten_field: false)
workhorse_request_with_file(method, url, workhorse_request_with_file(method, url,
file_key: file_key, file_key: file_key,
params: params, params: params,
extra_headers: headers, extra_headers: headers,
send_rewritten_field: false send_rewritten_field: send_rewritten_field
) )
end end
......
...@@ -26,7 +26,7 @@ describe 'projects/settings/operations/show' do ...@@ -26,7 +26,7 @@ describe 'projects/settings/operations/show' do
context 'Settings page ' do context 'Settings page ' do
it 'renders the Operations Settings page' do it 'renders the Operations Settings page' do
render render template: "projects/settings/operations/show", locals: { prometheus_service: project.find_or_initialize_service('prometheus') }
expect(rendered).to have_content _('Error Tracking') expect(rendered).to have_content _('Error Tracking')
expect(rendered).to have_content _('To link Sentry to GitLab, enter your Sentry URL and Auth Token') expect(rendered).to have_content _('To link Sentry to GitLab, enter your Sentry URL and Auth Token')
......
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