Commit 73a2f0a7 authored by Amy Qualls's avatar Amy Qualls

Docs: Update API code blocks

The code blocks for each API call on these pages did not specify a
code style. Most needed to be plaintext, but I also found a couple
of places that had extra line breaks that weren't needed.

A couple needed to be 'shell.'
parent 89e14fb6
...@@ -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 Export includes: ...@@ -19,7 +19,7 @@ Group Export includes:
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
``` ```
......
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