Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f5948124
Commit
f5948124
authored
Jun 16, 2021
by
Evan Read
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine Status Checks API documentation
parent
8e2550a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
51 deletions
+30
-51
doc/api/status_checks.md
doc/api/status_checks.md
+30
-51
No files found.
doc/api/status_checks.md
View file @
f5948124
...
@@ -11,7 +11,7 @@ type: reference, api
...
@@ -11,7 +11,7 @@ type: reference, api
> - It's [deployed behind a feature flag](../user/feature_flags.md), disabled by default.
> - It's [deployed behind a feature flag](../user/feature_flags.md), disabled by default.
> - It's disabled on GitLab.com.
> - It's disabled on GitLab.com.
> - It's not recommended for production use.
> - It's not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-
status-checks). **(ULTIMATE SELF)**
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-
external-status-checks).
WARNING:
WARNING:
This feature might not be available to you. Check the
**version history**
note above for details.
This feature might not be available to you. Check the
**version history**
note above for details.
...
@@ -67,13 +67,6 @@ POST /projects/:id/merge_requests/:merge_request_iid/status_check_responses
...
@@ -67,13 +67,6 @@ POST /projects/:id/merge_requests/:merge_request_iid/status_check_responses
NOTE:
NOTE:
`sha`
must be the SHA at the
`HEAD`
of the merge request's source branch.
`sha`
must be the SHA at the
`HEAD`
of the merge request's source branch.
## Enable or disable status checks **(ULTIMATE SELF)**
Status checks are under development and not ready for production use. It is
deployed behind a feature flag that is
**disabled by default**
.
[
GitLab administrators with access to the GitLab Rails console
](
../administration/feature_flags.md
)
can enable it.
## Get project external status checks **(ULTIMATE)**
## Get project external status checks **(ULTIMATE)**
You can request information about a project's external status checks using the following endpoint:
You can request information about a project's external status checks using the following endpoint:
...
@@ -86,7 +79,7 @@ GET /projects/:id/external_status_checks
...
@@ -86,7 +79,7 @@ GET /projects/:id/external_status_checks
| Attribute | Type | Required | Description |
| Attribute | Type | Required | Description |
|---------------------|---------|----------|---------------------|
|---------------------|---------|----------|---------------------|
|
`id`
| integer | yes |
The ID of a project
|
|
`id`
| integer | yes |
ID of a project
|
```
json
```
json
[
[
...
@@ -109,7 +102,7 @@ GET /projects/:id/external_status_checks
...
@@ -109,7 +102,7 @@ GET /projects/:id/external_status_checks
]
]
```
```
##
#
Create external status check **(ULTIMATE)**
## Create external status check **(ULTIMATE)**
You can create a new external status check for a project using the following endpoint:
You can create a new external status check for a project using the following endpoint:
...
@@ -117,14 +110,14 @@ You can create a new external status check for a project using the following end
...
@@ -117,14 +110,14 @@ You can create a new external status check for a project using the following end
POST /projects/:id/external_status_checks
POST /projects/:id/external_status_checks
```
```
| Attribute | Type
| Required | Description
|
| Attribute | Type
| Required | Description
|
|------------------------|----------------
|----------|----
------------------------------------------------|
|------------------------|----------------
--|----------|
------------------------------------------------|
|
`id`
| integer
| yes | The
ID of a project |
|
`id`
| integer
| yes |
ID of a project |
|
`name`
| string
| yes | Display name of status check
|
|
`name`
| string
| yes | Display name of status check
|
|
`external_url`
| string
| yes | URL of status check resource
|
|
`external_url`
| string
| yes | URL of status check resource
|
|
`protected_branch_ids`
|
`array<Integer>`
| no |
The id
s of protected branches to scope the rule by |
|
`protected_branch_ids`
|
`array<Integer>`
| no |
ID
s of protected branches to scope the rule by |
##
#
Delete external status check **(ULTIMATE)**
## Delete external status check **(ULTIMATE)**
You can delete an external status check for a project using the following endpoint:
You can delete an external status check for a project using the following endpoint:
...
@@ -132,12 +125,12 @@ You can delete an external status check for a project using the following endpoi
...
@@ -132,12 +125,12 @@ You can delete an external status check for a project using the following endpoi
DELETE /projects/:id/external_status_checks/:check_id
DELETE /projects/:id/external_status_checks/:check_id
```
```
| Attribute | Type | Required | Description
|
| Attribute | Type | Required | Description |
|------------------------|----------------|----------|-----------------------
-----------------------------
|
|------------------------|----------------|----------|-----------------------|
|
`rule_id`
| integer | yes |
The ID of an status check
|
|
`rule_id`
| integer | yes |
ID of an status check
|
|
`id`
| integer | yes |
The ID of a project
|
|
`id`
| integer | yes |
ID of a project
|
##
#
Update external status check **(ULTIMATE)**
## Update external status check **(ULTIMATE)**
You can update an existing external status check for a project using the following endpoint:
You can update an existing external status check for a project using the following endpoint:
...
@@ -145,18 +138,22 @@ You can update an existing external status check for a project using the followi
...
@@ -145,18 +138,22 @@ You can update an existing external status check for a project using the followi
PUT /projects/:id/external_status_checks/:check_id
PUT /projects/:id/external_status_checks/:check_id
```
```
| Attribute | Type
| Required | Description
|
| Attribute | Type
| Required | Description
|
|------------------------|----------------
|----------|----
------------------------------------------------|
|------------------------|----------------
--|----------|
------------------------------------------------|
|
`id`
| integer
| yes | The
ID of a project |
|
`id`
| integer
| yes |
ID of a project |
|
`rule_id`
| integer
| yes | The ID of an external status check
|
|
`rule_id`
| integer
| yes | ID of an external status check
|
|
`name`
| string
| no | Display name of status check
|
|
`name`
| string
| no | Display name of status check
|
|
`external_url`
| string
| no | URL of external status check resource
|
|
`external_url`
| string
| no | URL of external status check resource
|
|
`protected_branch_ids`
|
`array<Integer>`
| no |
The id
s of protected branches to scope the rule by |
|
`protected_branch_ids`
|
`array<Integer>`
| no |
ID
s of protected branches to scope the rule by |
##
# Enable or disable External Project-level MR
status checks **(ULTIMATE SELF)**
##
Enable or disable external
status checks **(ULTIMATE SELF)**
Enable or disable External Project-level MR status checks is under development and not ready for production use. It is
External status checks are:
deployed behind a feature flag that is
**disabled by default**
.
-
Under development.
-
Not ready for production use.
The feature is deployed behind a feature flag that is
**disabled by default**
.
[
GitLab administrators with access to the GitLab Rails console
](
../user/feature_flags.md
)
[
GitLab administrators with access to the GitLab Rails console
](
../user/feature_flags.md
)
can enable it.
can enable it.
...
@@ -178,24 +175,6 @@ Feature.disable(:ff_compliance_approval_gates)
...
@@ -178,24 +175,6 @@ Feature.disable(:ff_compliance_approval_gates)
Feature
.
disable
(
:ff_compliance_approval_gates
,
Project
.
find
(
<
project
id
>
))
Feature
.
disable
(
:ff_compliance_approval_gates
,
Project
.
find
(
<
project
id
>
))
```
```
To enable it:
```
ruby
# For the instance
Feature
.
enable
(
:ff_compliance_approval_gates
)
# For a single project
Feature
.
enable
(
:ff_compliance_approval_gates
,
Project
.
find
(
<
project
id
>
))
```
To disable it:
```
ruby
# For the instance
Feature
.
disable
(
:ff_compliance_approval_gates
)
# For a single project
Feature
.
disable
(
:ff_compliance_approval_gates
,
Project
.
find
(
<
project
id
>
)
```
## Related links
## Related links
-
[
External status checks
](
../user/project/merge_requests/status_checks.md
)
-
[
External status checks
](
../user/project/merge_requests/status_checks.md
)
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment