Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-20 21:38:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-20 21:38:24 +0300
commit983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch)
treeb153cd387c14ba23bd5a07514c7c01fddf6a78a0 /doc/api
parenta2bddee2cdb38673df0e004d5b32d9f77797de64 (diff)
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/api_resources.md1
-rw-r--r--doc/api/discussions.md49
-rw-r--r--doc/api/graphql/reference/gitlab_schema.graphql109
-rw-r--r--doc/api/graphql/reference/gitlab_schema.json302
-rw-r--r--doc/api/graphql/reference/index.md13
-rw-r--r--doc/api/groups.md62
-rw-r--r--doc/api/merge_requests.md1
-rw-r--r--doc/api/metrics_dashboard_annotations.md51
-rw-r--r--doc/api/packages.md4
-rw-r--r--doc/api/project_import_export.md24
-rw-r--r--doc/api/settings.md7
11 files changed, 573 insertions, 50 deletions
diff --git a/doc/api/api_resources.md b/doc/api/api_resources.md
index aebbc95750d..8b3d8462cc9 100644
--- a/doc/api/api_resources.md
+++ b/doc/api/api_resources.md
@@ -130,6 +130,7 @@ The following API resources are available outside of project and group contexts
| [License](license.md) **(CORE ONLY)** | `/license` |
| [Markdown](markdown.md) | `/markdown` |
| [Merge requests](merge_requests.md) | `/merge_requests` (also available for groups and projects) |
+| [Metrics dashboard annotations](metrics_dashboard_annotations.md) | `/environments/:id/metrics_dashboard/annotations` |
| [Namespaces](namespaces.md) | `/namespaces` |
| [Notification settings](notification_settings.md) | `/notification_settings` (also available for groups and projects) |
| [Pages domains](pages_domains.md) | `/pages/domains` (also available for projects) |
diff --git a/doc/api/discussions.md b/doc/api/discussions.md
index f1e8965b336..572e174201d 100644
--- a/doc/api/discussions.md
+++ b/doc/api/discussions.md
@@ -739,7 +739,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/discussions
]
```
-Diff comments contain also position:
+Diff comments also contain position:
```json
[
@@ -774,7 +774,11 @@ Diff comments contain also position:
"new_path": "package.json",
"position_type": "text",
"old_line": 27,
- "new_line": 27
+ "new_line": 27,
+ "line_range": {
+ "start_line_code": "588440f66559714280628a4f9799f0c4eb880a4a_10_10",
+ "end_line_code": "588440f66559714280628a4f9799f0c4eb880a4a_11_11"
+ }
},
"resolved": false,
"resolvable": true,
@@ -820,25 +824,28 @@ POST /projects/:id/merge_requests/:merge_request_iid/discussions
Parameters:
-| Attribute | Type | Required | Description |
-| ------------------------- | -------------- | -------- | ----------- |
-| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
-| `merge_request_iid` | integer | yes | The IID of a merge request |
-| `body` | string | yes | The content of the thread |
-| `created_at` | string | no | Date time string, ISO 8601 formatted, e.g. 2016-03-11T03:45:40Z (requires admin or project/group owner rights) |
-| `position` | hash | no | Position when creating a diff note |
-| `position[base_sha]` | string | yes | Base commit SHA in the source branch |
-| `position[start_sha]` | string | yes | SHA referencing commit in target branch |
-| `position[head_sha]` | string | yes | SHA referencing HEAD of this merge request |
-| `position[position_type]` | string | yes | Type of the position reference', allowed values: 'text' or 'image' |
-| `position[new_path]` | string | no | File path after change |
-| `position[new_line]` | integer | no | Line number after change (for 'text' diff notes) |
-| `position[old_path]` | string | no | File path before change |
-| `position[old_line]` | integer | no | Line number before change (for 'text' diff notes) |
-| `position[width]` | integer | no | Width of the image (for 'image' diff notes) |
-| `position[height]` | integer | no | Height of the image (for 'image' diff notes) |
-| `position[x]` | integer | no | X coordinate (for 'image' diff notes) |
-| `position[y]` | integer | no | Y coordinate (for 'image' diff notes) |
+| Attribute | Type | Required | Description |
+| --------------------------------------- | -------------- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
+| `merge_request_iid` | integer | yes | The IID of a merge request |
+| `body` | string | yes | The content of the thread |
+| `created_at` | string | no | Date time string, ISO 8601 formatted, e.g. 2016-03-11T03:45:40Z (requires admin or project/group owner rights) |
+| `position` | hash | no | Position when creating a diff note |
+| `position[base_sha]` | string | yes | Base commit SHA in the source branch |
+| `position[start_sha]` | string | yes | SHA referencing commit in target branch |
+| `position[head_sha]` | string | yes | SHA referencing HEAD of this merge request |
+| `position[position_type]` | string | yes | Type of the position reference', allowed values: 'text' or 'image' |
+| `position[new_path]` | string | no | File path after change |
+| `position[new_line]` | integer | no | Line number after change (for 'text' diff notes) |
+| `position[old_path]` | string | no | File path before change |
+| `position[old_line]` | integer | no | Line number before change (for 'text' diff notes) |
+| `position[line_range]` | hash | no | Line range for a multi-line diff note |
+| `position[line_range][start_line_code]` | string | yes | Line code for the start line |
+| `position[line_range][end_line_code]` | string | yes | Line code for the end line |
+| `position[width]` | integer | no | Width of the image (for 'image' diff notes) |
+| `position[height]` | integer | no | Height of the image (for 'image' diff notes) |
+| `position[x]` | integer | no | X coordinate (for 'image' diff notes) |
+| `position[y]` | integer | no | Y coordinate (for 'image' diff notes) |
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions?body=comment
diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql
index 91d6717de7e..9cdc83d584c 100644
--- a/doc/api/graphql/reference/gitlab_schema.graphql
+++ b/doc/api/graphql/reference/gitlab_schema.graphql
@@ -3009,6 +3009,11 @@ input EpicTreeNodeFieldsInputType {
id: ID!
"""
+ ID of the new parent epic
+ """
+ newParentId: ID
+
+ """
The type of the switch, after or before allowed
"""
relativePosition: MoveType!
@@ -5335,11 +5340,108 @@ type Metadata {
type MetricsDashboard {
"""
+ Annotations added to the dashboard. Will always return `null` if `metrics_dashboard_annotations` feature flag is disabled
+ """
+ annotations(
+ """
+ Returns the elements in the list that come after the specified cursor.
+ """
+ after: String
+
+ """
+ Returns the elements in the list that come before the specified cursor.
+ """
+ before: String
+
+ """
+ Returns the first _n_ elements from the list.
+ """
+ first: Int
+
+ """
+ Timestamp marking date and time from which annotations need to be fetched
+ """
+ from: Time!
+
+ """
+ Returns the last _n_ elements from the list.
+ """
+ last: Int
+
+ """
+ Timestamp marking date and time to which annotations need to be fetched
+ """
+ to: Time
+ ): MetricsDashboardAnnotationConnection
+
+ """
Path to a file with the dashboard definition
"""
path: String
}
+type MetricsDashboardAnnotation {
+ """
+ Description of the annotation
+ """
+ description: String
+
+ """
+ Timestamp marking end of annotated time span
+ """
+ endingAt: String
+
+ """
+ ID of the annotation
+ """
+ id: ID!
+
+ """
+ ID of a dashboard panel to which the annotation should be scoped
+ """
+ panelId: String
+
+ """
+ Timestamp marking start of annotated time span
+ """
+ startingAt: String
+}
+
+"""
+The connection type for MetricsDashboardAnnotation.
+"""
+type MetricsDashboardAnnotationConnection {
+ """
+ A list of edges.
+ """
+ edges: [MetricsDashboardAnnotationEdge]
+
+ """
+ A list of nodes.
+ """
+ nodes: [MetricsDashboardAnnotation]
+
+ """
+ Information to aid in pagination.
+ """
+ pageInfo: PageInfo!
+}
+
+"""
+An edge in a connection.
+"""
+type MetricsDashboardAnnotationEdge {
+ """
+ A cursor for use in pagination.
+ """
+ cursor: String!
+
+ """
+ The item at the end of the edge.
+ """
+ node: MetricsDashboardAnnotation
+}
+
"""
Represents a milestone.
"""
@@ -6740,7 +6842,7 @@ type Project {
suggestionCommitMessage: String
"""
- List of project tags
+ List of project topics (not Git tags)
"""
tagList: String
@@ -9561,6 +9663,11 @@ type Vulnerability {
location: JSON
"""
+ The project on which the vulnerability was found
+ """
+ project: Project
+
+ """
Type of the security report that found the vulnerability (SAST, DEPENDENCY_SCANNING, CONTAINER_SCANNING, DAST)
"""
reportType: VulnerabilityReportType
diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json
index fb642b1222f..26a2acdb4c6 100644
--- a/doc/api/graphql/reference/gitlab_schema.json
+++ b/doc/api/graphql/reference/gitlab_schema.json
@@ -8716,6 +8716,16 @@
}
},
"defaultValue": null
+ },
+ {
+ "name": "newParentId",
+ "description": "ID of the new parent epic",
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
}
],
"interfaces": null,
@@ -15280,6 +15290,83 @@
"description": null,
"fields": [
{
+ "name": "annotations",
+ "description": "Annotations added to the dashboard. Will always return `null` if `metrics_dashboard_annotations` feature flag is disabled",
+ "args": [
+ {
+ "name": "from",
+ "description": "Timestamp marking date and time from which annotations need to be fetched",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Time",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "to",
+ "description": "Timestamp marking date and time to which annotations need to be fetched",
+ "type": {
+ "kind": "SCALAR",
+ "name": "Time",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "after",
+ "description": "Returns the elements in the list that come after the specified cursor.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "before",
+ "description": "Returns the elements in the list that come before the specified cursor.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "first",
+ "description": "Returns the first _n_ elements from the list.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "last",
+ "description": "Returns the last _n_ elements from the list.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "MetricsDashboardAnnotationConnection",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
"name": "path",
"description": "Path to a file with the dashboard definition",
"args": [
@@ -15303,6 +15390,205 @@
},
{
"kind": "OBJECT",
+ "name": "MetricsDashboardAnnotation",
+ "description": null,
+ "fields": [
+ {
+ "name": "description",
+ "description": "Description of the annotation",
+ "args": [
+
+ ],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "endingAt",
+ "description": "Timestamp marking end of annotated time span",
+ "args": [
+
+ ],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "id",
+ "description": "ID of the annotation",
+ "args": [
+
+ ],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "panelId",
+ "description": "ID of a dashboard panel to which the annotation should be scoped",
+ "args": [
+
+ ],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "startingAt",
+ "description": "Timestamp marking start of annotated time span",
+ "args": [
+
+ ],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [
+
+ ],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "MetricsDashboardAnnotationConnection",
+ "description": "The connection type for MetricsDashboardAnnotation.",
+ "fields": [
+ {
+ "name": "edges",
+ "description": "A list of edges.",
+ "args": [
+
+ ],
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "MetricsDashboardAnnotationEdge",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "nodes",
+ "description": "A list of nodes.",
+ "args": [
+
+ ],
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "MetricsDashboardAnnotation",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "pageInfo",
+ "description": "Information to aid in pagination.",
+ "args": [
+
+ ],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "PageInfo",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [
+
+ ],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "MetricsDashboardAnnotationEdge",
+ "description": "An edge in a connection.",
+ "fields": [
+ {
+ "name": "cursor",
+ "description": "A cursor for use in pagination.",
+ "args": [
+
+ ],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "node",
+ "description": "The item at the end of the edge.",
+ "args": [
+
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "MetricsDashboardAnnotation",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [
+
+ ],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
"name": "Milestone",
"description": "Represents a milestone.",
"fields": [
@@ -20096,7 +20382,7 @@
},
{
"name": "tagList",
- "description": "List of project tags",
+ "description": "List of project topics (not Git tags)",
"args": [
],
@@ -28864,6 +29150,20 @@
"deprecationReason": null
},
{
+ "name": "project",
+ "description": "The project on which the vulnerability was found",
+ "args": [
+
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Project",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
"name": "reportType",
"description": "Type of the security report that found the vulnerability (SAST, DEPENDENCY_SCANNING, CONTAINER_SCANNING, DAST)",
"args": [
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index d1ea825bef3..4d3d77ba35f 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -833,6 +833,16 @@ Autogenerated return type of MergeRequestSetWip
| --- | ---- | ---------- |
| `path` | String | Path to a file with the dashboard definition |
+## MetricsDashboardAnnotation
+
+| Name | Type | Description |
+| --- | ---- | ---------- |
+| `description` | String | Description of the annotation |
+| `endingAt` | String | Timestamp marking end of annotated time span |
+| `id` | ID! | ID of the annotation |
+| `panelId` | String | ID of a dashboard panel to which the annotation should be scoped |
+| `startingAt` | String | Timestamp marking start of annotated time span |
+
## Milestone
Represents a milestone.
@@ -985,7 +995,7 @@ Information about pagination in a connection.
| `starCount` | Int! | Number of times the project has been starred |
| `statistics` | ProjectStatistics | Statistics of the project |
| `suggestionCommitMessage` | String | The commit message used to apply merge request suggestions |
-| `tagList` | String | List of project tags |
+| `tagList` | String | List of project topics (not Git tags) |
| `userPermissions` | ProjectPermissions! | Permissions for the current user on the resource |
| `visibility` | String | Visibility of the project |
| `vulnerabilitySeveritiesCount` | VulnerabilitySeveritiesCount | Counts for each severity of vulnerability of the project. Available only when feature flag `first_class_vulnerabilities` is enabled |
@@ -1502,6 +1512,7 @@ Represents a vulnerability.
| `description` | String | Description of the vulnerability |
| `id` | ID! | GraphQL ID of the vulnerability |
| `location` | JSON | The JSON location metadata for the vulnerability. Its format depends on the type of the security scan that found the vulnerability |
+| `project` | Project | The project on which the vulnerability was found |
| `reportType` | VulnerabilityReportType | Type of the security report that found the vulnerability (SAST, DEPENDENCY_SCANNING, CONTAINER_SCANNING, DAST) |
| `severity` | VulnerabilitySeverity | Severity of the vulnerability (INFO, UNKNOWN, LOW, MEDIUM, HIGH, CRITICAL) |
| `state` | VulnerabilityState | State of the vulnerability (DETECTED, DISMISSED, RESOLVED, CONFIRMED) |
diff --git a/doc/api/groups.md b/doc/api/groups.md
index 1809ddfa47f..34c01766d06 100644
--- a/doc/api/groups.md
+++ b/doc/api/groups.md
@@ -862,49 +862,71 @@ Lists LDAP group links.
GET /groups/:id/ldap_group_links
```
-Parameters:
-
-- `id` (required) - The ID of a group
+| Attribute | Type | Required | Description |
+| --------- | -------------- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) |
-### Add LDAP group link **(STARTER)**
+### Add LDAP group link with CN or filter **(STARTER)**
-Adds an LDAP group link.
+Adds an LDAP group link using a CN or filter. Adding a group link by filter is only supported in the Premium tier and above.
```plaintext
POST /groups/:id/ldap_group_links
```
-Parameters:
+| Attribute | Type | Required | Description |
+| --------- | -------------- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) |
+| `cn` | string | no | The CN of an LDAP group |
+| `filter` | string | no | The LDAP filter for the group |
+| `group_access` | integer | yes | Minimum access level for members of the LDAP group |
+| `provider` | string | yes | LDAP provider for the LDAP group link |
-- `id` (required) - The ID of a group
-- `cn` (required) - The CN of a LDAP group
-- `group_access` (required) - Minimum access level for members of the LDAP group
-- `provider` (required) - LDAP provider for the LDAP group
+NOTE: **Note:**
+To define the LDAP group link, provide either a `cn` or a `filter`, but not both.
### Delete LDAP group link **(STARTER)**
-Deletes an LDAP group link.
+Deletes an LDAP group link. Deprecated. Will be removed in a future release.
```plaintext
DELETE /groups/:id/ldap_group_links/:cn
```
-Parameters:
-
-- `id` (required) - The ID of a group
-- `cn` (required) - The CN of a LDAP group
+| Attribute | Type | Required | Description |
+| --------- | -------------- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) |
+| `cn` | string | yes | The CN of an LDAP group |
-Deletes a LDAP group link for a specific LDAP provider
+Deletes an LDAP group link for a specific LDAP provider. Deprecated. Will be removed in a future release.
```plaintext
DELETE /groups/:id/ldap_group_links/:provider/:cn
```
-Parameters:
+| Attribute | Type | Required | Description |
+| --------- | -------------- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) |
+| `cn` | string | yes | The CN of an LDAP group |
+| `provider` | string | yes | LDAP provider for the LDAP group link |
+
+### Delete LDAP group link with CN or filter **(STARTER)**
+
+Deletes an LDAP group link using a CN or filter. Deleting by filter is only supported in the Premium tier and above.
+
+```plaintext
+DELETE /groups/:id/ldap_group_links
+```
-- `id` (required) - The ID of a group
-- `cn` (required) - The CN of a LDAP group
-- `provider` (required) - Name of a LDAP provider
+| Attribute | Type | Required | Description |
+| --------- | -------------- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) |
+| `cn` | string | no | The CN of an LDAP group |
+| `filter` | string | no | The LDAP filter for the group |
+| `provider` | string | yes | LDAP provider for the LDAP group link |
+
+NOTE: **Note:**
+To delete the LDAP group link, provide either a `cn` or a `filter`, but not both.
## Namespaces in groups
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md
index adb5b00085e..b0ffeae2b55 100644
--- a/doc/api/merge_requests.md
+++ b/doc/api/merge_requests.md
@@ -668,6 +668,7 @@ dependent on the `merge_status`. It'll return `false` unless `merge_status` is
},
"diverged_commits_count": 2,
"rebase_in_progress": false,
+ "first_contribution": false,
"task_completion_status":{
"count":0,
"completed_count":0
diff --git a/doc/api/metrics_dashboard_annotations.md b/doc/api/metrics_dashboard_annotations.md
new file mode 100644
index 00000000000..d8a018fe6c3
--- /dev/null
+++ b/doc/api/metrics_dashboard_annotations.md
@@ -0,0 +1,51 @@
+# Dashboard annotations API
+
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/29089) in GitLab 12.10 behind a disabled feature flag.
+
+Metrics dashboard annotations allow you to indicate events on your graphs at a single point in time or over a timespan.
+
+## Enable the metrics dashboard annotations API
+
+The `:metrics_dashboard_annotations` feature flag is disabled by default.
+To turn on this API, ask a GitLab administrator with Rails console
+access to run the following command:
+
+```ruby
+Feature.enable(:metrics_dashboard_annotations)
+```
+
+## Create a new annotation
+
+```plaintext
+POST /environments/:id/metrics_dashboard/annotations/
+```
+
+Parameters:
+
+| Attribute | Type | Required | Description |
+|:---------------|:---------------|:---------|:-----------------------------------------------------------------------------|
+| `dashboard_path` | string | yes | ID of the dashboard which needs to be annotated. |
+| `starting_at` | string | yes | Date time string, ISO 8601 formatted, such as `2016-03-11T03:45:40Z`. Timestamp marking start point of annotation. |
+| `ending_at` | string | no | Date time string, ISO 8601 formatted, such as `2016-03-11T03:45:40Z`. Timestamp marking end point of annotation. When not supplied annotation will be displayed as single event at start point. |
+| `description` | string | yes | Description of the annotation. |
+
+```shell
+curl --header 'Private-Token: <your_access_token>' https://gitlab.example.com/api/v4/environments/1/metrics_dashboard/annotations \
+ --data-urlencode "dashboard_path=.gitlab/dashboards/custom_metrics.yml" \
+ --data-urlencode "starting_at=2016-03-11T03:45:40Z" \
+ --data-urlencode "description=annotation description"
+```
+
+Example Response:
+
+```json
+{
+ "id": 4,
+ "starting_at": "2016-04-08T03:45:40.000Z",
+ "ending_at": null,
+ "dashboard_path": ".gitlab/dashboards/custom_metrics.yml",
+ "description": "annotation description",
+ "environment_id": 1,
+ "cluster_id": null
+}
+```
diff --git a/doc/api/packages.md b/doc/api/packages.md
index 31fc2863708..8671de006d2 100644
--- a/doc/api/packages.md
+++ b/doc/api/packages.md
@@ -20,7 +20,7 @@ GET /projects/:id/packages
| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
| `order_by`| string | no | The field to use as order. One of `created_at` (default), `name`, `version`, or `type`. |
| `sort` | string | no | The direction of the order, either `asc` (default) for ascending order or `desc` for descending order. |
-| `package_type` | string | no | Filter the returned packages by type. One of `conan`, `maven`, `npm` or `nuget`. (_Introduced in GitLab 12.9_)
+| `package_type` | string | no | Filter the returned packages by type. One of `conan`, `maven`, `npm`, `pypi` or `nuget`. (_Introduced in GitLab 12.9_)
| `package_name` | string | no | Filter the project packages with a fuzzy search by name. (_Introduced in GitLab 12.9_)
```shell
@@ -67,7 +67,7 @@ GET /groups/:id/packages
| `exclude_subgroups` | boolean | false | If the parameter is included as true, packages from projects from subgroups are not listed. Default is `false`. |
| `order_by`| string | no | The field to use as order. One of `created_at` (default), `name`, `version`, `type`, or `project_path`. |
| `sort` | string | no | The direction of the order, either `asc` (default) for ascending order or `desc` for descending order. |
-| `package_type` | string | no | Filter the returned packages by type. One of `conan`, `maven`, `npm` or `nuget`. (_Introduced in GitLab 12.9_) |
+| `package_type` | string | no | Filter the returned packages by type. One of `conan`, `maven`, `npm`, `pypi` or `nuget`. (_Introduced in GitLab 12.9_) |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/packages?exclude_subgroups=true
diff --git a/doc/api/project_import_export.md b/doc/api/project_import_export.md
index 78022e8e754..21a90670aa6 100644
--- a/doc/api/project_import_export.md
+++ b/doc/api/project_import_export.md
@@ -173,7 +173,8 @@ requests.post(url, headers=headers, data=data, files=files)
"path_with_namespace": "root/api-project",
"created_at": "2018-02-13T09:05:58.023Z",
"import_status": "scheduled",
- "correlation_id": "mezklWso3Za"
+ "correlation_id": "mezklWso3Za",
+ "failed_relations": []
}
```
@@ -202,6 +203,15 @@ Status can be one of:
- `finished`
If the status is `failed`, it will include the import error message under `import_error`.
+If the status is `failed`, `started` or `finished`, the `failed_relations` array might
+be populated with any occurrences of relations that failed to import either due to
+unrecoverable errors or because retries were exhausted (a typical example are query timeouts.)
+
+NOTE: **Note:**
+An element's `id` field in `failed_relations` references the failure record, not the relation.
+
+NOTE: **Note:**
+The `failed_relations` array is currently capped to 100 items.
```json
{
@@ -213,6 +223,16 @@ If the status is `failed`, it will include the import error message under `impor
"path_with_namespace": "gitlab-org/gitlab-test",
"created_at": "2017-08-29T04:36:44.383Z",
"import_status": "started",
- "correlation_id": "mezklWso3Za"
+ "correlation_id": "mezklWso3Za",
+ "failed_relations": [
+ {
+ "id": 42,
+ "created_at": "2020-04-02T14:48:59.526Z",
+ "exception_class": "RuntimeError",
+ "exception_message": "A failure occurred",
+ "source": "custom error context",
+ "relation_name": "merge_requests"
+ }
+ ]
}
```
diff --git a/doc/api/settings.md b/doc/api/settings.md
index 5fe068cf085..cf48048c830 100644
--- a/doc/api/settings.md
+++ b/doc/api/settings.md
@@ -68,7 +68,8 @@ Example response:
"allow_local_requests_from_system_hooks": false,
"asset_proxy_enabled": true,
"asset_proxy_url": "https://assets.example.com",
- "asset_proxy_whitelist": ["example.com", "*.example.com", "your-instance.com"]
+ "asset_proxy_whitelist": ["example.com", "*.example.com", "your-instance.com"],
+ "npm_package_requests_forwarding": true
}
```
@@ -154,7 +155,8 @@ Example response:
"geo_node_allowed_ips": "0.0.0.0/0, ::/0",
"allow_local_requests_from_hooks_and_services": true,
"allow_local_requests_from_web_hooks_and_services": true,
- "allow_local_requests_from_system_hooks": false
+ "allow_local_requests_from_system_hooks": false,
+ "npm_package_requests_forwarding": true
}
```
@@ -285,6 +287,7 @@ are listed in the descriptions of the relevant settings.
| `mirror_capacity_threshold` | integer | no | **(PREMIUM)** Minimum capacity to be available before scheduling more mirrors preemptively |
| `mirror_max_capacity` | integer | no | **(PREMIUM)** Maximum number of mirrors that can be synchronizing at the same time. |
| `mirror_max_delay` | integer | no | **(PREMIUM)** Maximum time (in minutes) between updates that a mirror can have when scheduled to synchronize. |
+| `npm_package_requests_forwarding` | boolean | no | **(PREMIUM)** Use npmjs.org as a default remote repository when the package is not found in the GitLab NPM Registry |
| `outbound_local_requests_whitelist` | array of strings | no | Define a list of trusted domains or ip addresses to which local requests are allowed when local requests for hooks and services are disabled.
| `pages_domain_verification_enabled` | boolean | no | Require users to prove ownership of custom domains. Domain verification is an essential security measure for public GitLab sites. Users are required to demonstrate they control a domain before it is enabled. |
| `password_authentication_enabled_for_git` | boolean | no | Enable authentication for Git over HTTP(S) via a GitLab account password. Default is `true`. |