Use this API to manage external status checks.

Get list of project external status checks

GET /api/v4/projects/{id}/external_status_checks

Parameters

NameTypeDescription
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20
id
Path, required
String or integerThe ID or URL-encoded path of the project
Example: 11

Responses

CodeDescriptionSchema
200OKAPIEntitiesExternalStatusCheck
400Bad Request—
404Not Found—

Create external status check

POST /api/v4/projects/{id}/external_status_checks

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
Example: 11

Request body (application/json)

PropertyTypeDescription
branch_scope
Required
StringExternal status check branch scope
Allowed values: all_branches, all_protected_branches, protected_branch_specific
Minimum length: 1
external_url
Required
StringExternal status check resource url
Example: https://www.example.com
name
Required
StringExternal status check display name
Example: lorem ipsum
protected_branch_idsArray of integersIDs of protected branches
shared_secretStringHMAC shared secret
Example: hmac
timeout_minutesIntegerExternal status check timeout in minutes
Example: 5

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesExternalStatusCheck
400Bad Request—
404Not Found—

Update external status check by id

PUT /api/v4/projects/{id}/external_status_checks/{check_id}

Parameters

NameTypeDescription
check_id
Path, required
IntegerExternal status check ID
Example: 1
id
Path, required
String or integerThe ID or URL-encoded path of the project
Example: 11

Request body (application/json)

PropertyTypeDescription
branch_scopeStringExternal status check branch scope
Allowed values: all_branches, all_protected_branches, protected_branch_specific
external_urlStringExternal status check resource url
Example: https://www.example.com
nameStringDisplay name of external status check
Example: lorem ipsum
protected_branch_idsArray of integersIDs of protected branches to scope the rule by
shared_secretStringHMAC shared secret
Example: hmac
timeout_minutesIntegerExternal status check timeout in minutes
Example: 5

Responses

CodeDescriptionSchema
200OKAPIEntitiesExternalStatusCheck
400Bad Request—
404Not Found—

Delete external status check

DELETE /api/v4/projects/{id}/external_status_checks/{check_id}

Parameters

NameTypeDescription
check_id
Path, required
IntegerID of an external status check
id
Path, required
String or integerThe ID or URL-encoded path of the project
Example: 11

Responses

CodeDescriptionSchema
204No Content—
400Bad Request—
404Not Found—

Set status of an external status check

POST /api/v4/projects/{id}/merge_requests/{merge_request_iid}/status_check_responses

Parameters

NameTypeDescription
id
Path, required
StringID of a project
Example: 1
merge_request_iid
Path, required
IntegerIID of a merge request
Example: 1

Request body (application/json)

PropertyTypeDescription
external_status_check_id
Required
IntegerID of an external status check
Example: 1
sha
Required
StringSHA at HEAD of the source branch
Example: 5957a570eee0ac4580ec027fb874ad7514d1e576
status
Required
StringSet to passed to pass the check or failed to fail it
Allowed values: passed, failed
Minimum length: 1

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesMergeRequestsExternalStatusCheckResponse
400Bad Request—
404Not Found—

List status checks for a merge request

GET /api/v4/projects/{id}/merge_requests/{merge_request_iid}/status_checks

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
Example: 11
merge_request_iid
Path, required
IntegerThe internal ID of an issuable

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequestsExternalStatusCheck
404Not Found—

Retry failed external status check

POST /api/v4/projects/{id}/merge_requests/{merge_request_iid}/status_checks/{external_status_check_id}/retry

Parameters

NameTypeDescription
id
Path, required
StringProject ID
Example: 1
merge_request_iid
Path, required
IntegerMerge Request IID
Example: 1
external_status_check_id
Path, required
IntegerFailed external status check ID

Responses

CodeDescriptionSchema
202Accepted—
400Bad Request—
404Not Found—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesCiPipeline

PropertyTypeDescription
archivedBooleanExample: false
before_shaStringExample: a91957a858320c0e17f3a0eca7cfacbff50ea29a
committed_atString (date-time)Example: 2015-12-24T15:51:21.880Z
coverageNumber (float)Example: 98.29
created_atString (date-time)Example: 2015-12-24T15:51:21.880Z
detailed_statusDetailedStatusEntity—
durationIntegerTime spent running in seconds
Example: 127
finished_atString (date-time)Example: 2015-12-24T17:54:31.198Z
idInteger (int64)Example: 1
iidIntegerExample: 2
project_idInteger (int64)Example: 3
queued_durationIntegerTime spent enqueued in seconds
Example: 63
refStringExample: feature-branch
shaStringExample: 0ec9e58fdfca6cdd6652c083c9edb53abc0bad52
sourceStringExample: push
started_atString (date-time)Example: 2015-12-24T17:54:30.733Z
statusStringExample: success
tagBooleanExample: false
updated_atString (date-time)Example: 2015-12-24T17:54:31.198Z
userAPIEntitiesUserBasic—
web_urlStringExample: https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61
yaml_errorsStringExample: widgets:build: needs 'widgets:test'

APIEntitiesCiPipelineBasic

PropertyTypeDescription
created_atString (date-time)Example: 2022-10-21T16:49:48.000+02:00
idInteger (int64)Example: 1
iidIntegerExample: 2
project_idInteger (int64)Example: 3
refStringExample: feature-branch
shaStringExample: 0ec9e58fdfca6cdd6652c083c9edb53abc0bad52
sourceStringExample: push
statusStringExample: success
updated_atString (date-time)Example: 2022-10-21T16:49:48.000+02:00
web_urlStringExample: https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61

APIEntitiesCustomAttribute

PropertyTypeDescription
keyStringExample: foo
valueStringExample: bar

APIEntitiesDiffRefs

PropertyTypeDescription
base_shaStringExample: b83d6e391c22777fca1ed3012fce84f633d7fed0
head_shaStringExample: b83d6e391c22777fca1ed3012fce84f633d7fed0
start_shaStringExample: b83d6e391c22777fca1ed3012fce84f633d7fed0

APIEntitiesExternalStatusCheck

PropertyTypeDescription
branch_scopeStringExample: all_branches
external_urlStringExample: https://www.example.com
hmac?BooleanExample: true
idIntegerExample: 100
nameStringExample: lorem ipsum
project_idIntegerExample: 101
protected_branchesArray of APIEntitiesProtectedBranch—
timeout_minutesIntegerExample: 5

APIEntitiesIssuableReferences

PropertyTypeDescription
fullStringExample: test&6
relativeStringExample: &6
shortStringExample: &6

APIEntitiesIssuableTimeStats

PropertyTypeDescription
human_time_estimateStringExample: 3h 30m
human_total_time_spentStringExample: 1h
time_estimateIntegerExample: 12600
total_time_spentIntegerExample: 3600

APIEntitiesMergeRequest

PropertyTypeDescription
allow_collaborationBoolean—
allow_maintainer_to_pushBoolean—
assigneeAPIEntitiesUserBasic—
assigneesAPIEntitiesUserBasic—
authorAPIEntitiesUserBasic—
blocking_discussions_resolvedBoolean—
changes_countStringExample: 1
closed_atString (date-time)Example: 2022-01-31T15:10:45.080Z
closed_byAPIEntitiesUserBasic—
created_atString (date-time)Example: 2022-08-17T12:46:35.053Z
descriptionStringExample: Repellendus impedit et vel velit dignissimos.
description_htmlString—
detailed_merge_statusStringExample: mergeable
diff_refsAPIEntitiesDiffRefs—
discussion_lockedBoolean—
diverged_commits_countIntegerExample: 0
downvotesInteger—
draftBoolean—
first_contributionBoolean—
first_deployed_to_production_atString (date-time)Example: 2022-01-31T15:10:45.080Z
force_remove_source_branchBoolean—
has_conflictsBoolean—
head_pipelineAPIEntitiesCiPipeline—
idInteger (int64)Example: 84
iidIntegerExample: 14
importedBoolean—
imported_fromStringExample: bitbucket
labelsArray of strings—
latest_build_finished_atString (date-time)Example: 2022-01-31T15:10:45.080Z
latest_build_started_atString (date-time)Example: 2022-01-31T15:10:45.080Z
merge_afterString (date-time)Example: 2022-01-31T15:10:45.080Z
merge_commit_shaStringExample: 1234abcd
merge_errorStringExample: Merge error
merge_statusStringExample: unchecked
merge_userAPIEntitiesUserBasic—
merge_when_pipeline_succeedsBoolean—
merged_atString (date-time)Example: 2022-01-31T15:10:45.080Z
merged_byAPIEntitiesUserBasic—
milestoneAPIEntitiesMilestone—
pipelineAPIEntitiesCiPipelineBasic—
prepared_atString (date-time)Example: 2022-01-31T15:10:45.080Z
project_idInteger (int64)Example: 4
rebase_in_progressBoolean—
referenceStringExample: !1
referencesAPIEntitiesIssuableReferences—
reviewersAPIEntitiesUserBasic—
shaStringExample: 1234abcd
should_remove_source_branchBoolean—
source_branchString—
source_project_idInteger (int64)—
squashBoolean—
squash_commit_shaStringExample: 1234abcd
squash_on_mergeBoolean—
stateStringExample: closed
subscribedBoolean—
target_branchString—
target_project_idInteger (int64)—
task_completion_statusAPIEntitiesTaskCompletionStatus—
time_statsAPIEntitiesIssuableTimeStats—
titleStringExample: Impedit et ut et dolores vero provident ullam est
title_htmlString—
updated_atString (date-time)Example: 2022-11-14T17:22:01.470Z
upvotesInteger—
userObject—
user.can_mergeBoolean—
user_notes_countInteger—
web_urlStringExample: https://gitlab.example.com/my-group/my-project/-/merge_requests/1
work_in_progressBoolean—

APIEntitiesMergeRequestsExternalStatusCheck

PropertyTypeDescription
error_reasonStringExample: Timeout error
external_urlStringExample: https://www.test.com
idIntegerExample: 1
nameStringExample: Security
statusStringExample: pending

APIEntitiesMergeRequestsExternalStatusCheckResponse

PropertyTypeDescription
external_status_checkAPIEntitiesExternalStatusCheck—
idIntegerExample: 1
merge_requestAPIEntitiesMergeRequest—

APIEntitiesMilestone

PropertyTypeDescription
created_atString—
descriptionString—
due_dateString—
expiredBoolean—
group_idString—
idInteger (int64)—
iidInteger (int64)—
project_idInteger (int64)—
start_dateString—
stateString—
titleString—
updated_atString—
web_urlString—

APIEntitiesProtectedBranch

PropertyTypeDescription
allow_force_pushBoolean—
idInteger (int64)Example: 1
merge_access_levelsArray of APIEntitiesProtectedRefAccess—
nameStringExample: main
push_access_levelsArray of APIEntitiesProtectedRefAccess—

APIEntitiesProtectedRefAccess

PropertyTypeDescription
access_levelIntegerExample: 40
access_level_descriptionStringExample: Maintainers
deploy_key_idInteger (int64)Example: 1
group_idIntegerExample: 1
idInteger (int64)Example: 1
user_idIntegerExample: 1

APIEntitiesTaskCompletionStatus

PropertyTypeDescription
completed_countIntegerExample: 3
countIntegerExample: 5

APIEntitiesUserBasic

PropertyTypeDescription
avatar_pathStringExample: /user/avatar/28/The-Big-Lebowski-400-400.png
avatar_urlStringExample: https://gravatar.com/avatar/1
custom_attributesArray of APIEntitiesCustomAttribute—
idInteger (int64)Example: 1
lockedBoolean—
nameStringExample: Administrator
public_emailStringExample: john@example.com
stateStringExample: active
usernameStringExample: admin
web_urlStringExample: https://gitlab.example.com/root

DetailedStatusEntity

PropertyTypeDescription
actionObject—
action.button_titleStringExample: Cancel this job
action.confirmation_messageStringExample: Are you sure?
action.iconStringExample: cancel
action.methodStringExample: post
action.pathStringExample: /namespace1/project1/-/jobs/2/cancel
action.titleStringExample: Cancel
details_pathStringExample: /test-group/test-project/-/pipelines/287
faviconStringExample: /assets/ci_favicons/favicon_status_success.png
groupStringExample: success
has_detailsBooleanExample: true
iconStringExample: status_success
illustrationObjectExample: {"content":"This job depends on upstream jobs that need to succeed in order for this job to be triggered","image":"illustrations/empty-state/empty-job-not-triggered-md.svg","size":"","title":"This job has not been triggered yet"}
labelStringExample: passed
textStringExample: passed
tooltipStringExample: passed