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
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/status_checks.md')
-rw-r--r--doc/api/status_checks.md174
1 files changed, 87 insertions, 87 deletions
diff --git a/doc/api/status_checks.md b/doc/api/status_checks.md
index 7299e529bda..c024558b90c 100644
--- a/doc/api/status_checks.md
+++ b/doc/api/status_checks.md
@@ -10,9 +10,92 @@ type: reference, api
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/3869) in GitLab 14.0, disabled behind the `:ff_external_status_checks` feature flag.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/320783) in GitLab 14.1.
+## Get project external status check services
+
+You can request information about a project's external status check services using the following endpoint:
+
+```plaintext
+GET /projects/:id/external_status_checks
+```
+
+**Parameters:**
+
+| Attribute | Type | Required | Description |
+|---------------------|---------|----------|---------------------|
+| `id` | integer | yes | ID of a project |
+
+```json
+[
+ {
+ "id": 1,
+ "name": "Compliance Tool",
+ "project_id": 6,
+ "external_url": "https://gitlab.com/example/compliance-tool",
+ "protected_branches": [
+ {
+ "id": 14,
+ "project_id": 6,
+ "name": "master",
+ "created_at": "2020-10-12T14:04:50.787Z",
+ "updated_at": "2020-10-12T14:04:50.787Z",
+ "code_owner_approval_required": false
+ }
+ ]
+ }
+]
+```
+
+## Create external status check service
+
+You can create a new external status check service for a project using the following endpoint:
+
+```plaintext
+POST /projects/:id/external_status_checks
+```
+
+WARNING:
+External status checks send information about all applicable merge requests to the
+defined external service. This includes confidential merge requests.
+
+| Attribute | Type | Required | Description |
+|------------------------|------------------|----------|------------------------------------------------|
+| `id` | integer | yes | ID of a project |
+| `name` | string | yes | Display name of external status check service |
+| `external_url` | string | yes | URL of external status check service |
+| `protected_branch_ids` | `array<Integer>` | no | IDs of protected branches to scope the rule by |
+
+## Update external status check service
+
+You can update an existing external status check for a project using the following endpoint:
+
+```plaintext
+PUT /projects/:id/external_status_checks/:check_id
+```
+
+| Attribute | Type | Required | Description |
+|------------------------|------------------|----------|------------------------------------------------|
+| `id` | integer | yes | ID of a project |
+| `check_id` | integer | yes | ID of an external status check service |
+| `name` | string | no | Display name of external status check service |
+| `external_url` | string | no | URL of external status check service |
+| `protected_branch_ids` | `array<Integer>` | no | IDs of protected branches to scope the rule by |
+
+## Delete external status check service
+
+You can delete an external status check service for a project using the following endpoint:
+
+```plaintext
+DELETE /projects/:id/external_status_checks/:check_id
+```
+
+| Attribute | Type | Required | Description |
+|------------------------|----------------|----------|----------------------------------------|
+| `check_id` | integer | yes | ID of an external status check service |
+| `id` | integer | yes | ID of a project |
+
## List status checks for a merge request
-For a single merge request, list the external status checks that apply to it and their status.
+For a single merge request, list the external status check services that apply to it and their status.
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/status_checks
@@ -29,13 +112,13 @@ GET /projects/:id/merge_requests/:merge_request_iid/status_checks
[
{
"id": 2,
- "name": "Rule 1",
+ "name": "Service 1",
"external_url": "https://gitlab.com/test-endpoint",
"status": "passed"
},
{
"id": 1,
- "name": "Rule 2",
+ "name": "Service 2",
"external_url": "https://gitlab.com/test-endpoint-2",
"status": "pending"
}
@@ -251,89 +334,6 @@ In case status check is already passed status code is 422
}
```
-## Get project external status checks
-
-You can request information about a project's external status checks using the following endpoint:
-
-```plaintext
-GET /projects/:id/external_status_checks
-```
-
-**Parameters:**
-
-| Attribute | Type | Required | Description |
-|---------------------|---------|----------|---------------------|
-| `id` | integer | yes | ID of a project |
-
-```json
-[
- {
- "id": 1,
- "name": "Compliance Check",
- "project_id": 6,
- "external_url": "https://gitlab.com/example/test.json",
- "protected_branches": [
- {
- "id": 14,
- "project_id": 6,
- "name": "master",
- "created_at": "2020-10-12T14:04:50.787Z",
- "updated_at": "2020-10-12T14:04:50.787Z",
- "code_owner_approval_required": false
- }
- ]
- }
-]
-```
-
-## Create external status check
-
-You can create a new external status check for a project using the following endpoint:
-
-```plaintext
-POST /projects/:id/external_status_checks
-```
-
-WARNING:
-External status checks send information about all applicable merge requests to the
-defined external service. This includes confidential merge requests.
-
-| Attribute | Type | Required | Description |
-|------------------------|------------------|----------|------------------------------------------------|
-| `id` | integer | yes | ID of a project |
-| `name` | string | yes | Display name of external status check |
-| `external_url` | string | yes | URL of external status check resource |
-| `protected_branch_ids` | `array<Integer>` | no | IDs of protected branches to scope the rule by |
-
-## Delete external status check
-
-You can delete an external status check for a project using the following endpoint:
-
-```plaintext
-DELETE /projects/:id/external_status_checks/:check_id
-```
-
-| Attribute | Type | Required | Description |
-|------------------------|----------------|----------|-----------------------|
-| `check_id` | integer | yes | ID of an external status check |
-| `id` | integer | yes | ID of a project |
-
-## Update external status check
-
-You can update an existing external status check for a project using the following endpoint:
-
-```plaintext
-PUT /projects/:id/external_status_checks/:check_id
-```
-
-| Attribute | Type | Required | Description |
-|------------------------|------------------|----------|------------------------------------------------|
-| `id` | integer | yes | ID of a project |
-| `check_id` | integer | yes | ID of an external status check |
-| `name` | string | no | Display name of external status check |
-| `external_url` | string | no | URL of external status check resource |
-| `protected_branch_ids` | `array<Integer>` | no | IDs of protected branches to scope the rule by |
-
## Related topics
-- [External status checks](../user/project/merge_requests/status_checks.md).
+- [External status checks](../user/project/merge_requests/status_checks.md)