Use this API to subscribe to and unsubscribe from issues, merge requests, and labels in projects and groups.

All API calls to non-public information require authentication.

Subscribe to a group label

POST /api/v4/groups/{id}/labels/{subscribable_id}/subscribe

Subscribes the currently authenticated user to a specified group label. They will receive notifications on changes to this item.

Parameters

NameTypeDescription
id
Path, required
StringThe group ID
subscribable_id
Path, required
StringThe ID of a resource

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesGroupLabel
400Bad Request—
404Not Found—

Unsubscribe to a group label

POST /api/v4/groups/{id}/labels/{subscribable_id}/unsubscribe

Unsubscribes the currently authenticated user from a specified group label. They will no longer receive notifications on changes to this item.

Parameters

NameTypeDescription
id
Path, required
StringThe group ID
subscribable_id
Path, required
StringThe ID of a resource

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesGroupLabel
400Bad Request—
404Not Found—

Subscribe to an issue

POST /api/v4/projects/{id}/issues/{subscribable_id}/subscribe

Subscribes the currently authenticated user to a specified issue. They will receive notifications on changes to this item.

Parameters

NameTypeDescription
id
Path, required
StringThe project ID
subscribable_id
Path, required
StringThe ID of a resource

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesIssue
400Bad Request—
404Not Found—

Unsubscribe to an issue

POST /api/v4/projects/{id}/issues/{subscribable_id}/unsubscribe

Unsubscribes the currently authenticated user from a specified issue. They will no longer receive notifications on changes to this item.

Parameters

NameTypeDescription
id
Path, required
StringThe project ID
subscribable_id
Path, required
StringThe ID of a resource

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesIssue
400Bad Request—
404Not Found—

Subscribe to a project label

POST /api/v4/projects/{id}/labels/{subscribable_id}/subscribe

Subscribes the currently authenticated user to a specified project label. They will receive notifications on changes to this item.

Parameters

NameTypeDescription
id
Path, required
StringThe project ID
subscribable_id
Path, required
StringThe ID of a resource

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesProjectLabel
400Bad Request—
404Not Found—

Unsubscribe to a project label

POST /api/v4/projects/{id}/labels/{subscribable_id}/unsubscribe

Unsubscribes the currently authenticated user from a specified project label. They will no longer receive notifications on changes to this item.

Parameters

NameTypeDescription
id
Path, required
StringThe project ID
subscribable_id
Path, required
StringThe ID of a resource

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesProjectLabel
400Bad Request—
404Not Found—

Subscribe to a merge request

POST /api/v4/projects/{id}/merge_requests/{subscribable_id}/subscribe

Subscribes the currently authenticated user to a specified merge request. They will receive notifications on changes to this item.

Parameters

NameTypeDescription
id
Path, required
StringThe project ID
subscribable_id
Path, required
StringThe ID of a resource

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesMergeRequest
400Bad Request—
404Not Found—

Unsubscribe to a merge request

POST /api/v4/projects/{id}/merge_requests/{subscribable_id}/unsubscribe

Unsubscribes the currently authenticated user from a specified merge request. They will no longer receive notifications on changes to this item.

Parameters

NameTypeDescription
id
Path, required
StringThe project ID
subscribable_id
Path, required
StringThe ID of a resource

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesMergeRequest
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

APIEntitiesGroupLabel

PropertyTypeDescription
archivedBooleanExample: false
closed_issues_countIntegerExample: 0
colorStringExample: #FF0000
descriptionStringExample: Bug reported by user
description_htmlStringExample: <p>Bug reported by user</p>
idInteger (int64)Example: 1
nameStringExample: bug
open_issues_countIntegerExample: 1
open_merge_requests_countIntegerExample: 1
subscribedBooleanExample: false
text_colorStringExample: #FFFFFF

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

APIEntitiesIssue

PropertyTypeDescription
_linksObject—
_links.award_emojiStringExample: http://example.com/api/v4/projects/1/issues/2/award_emoji
_links.closed_as_duplicate_ofStringExample: http://example.com/api/v4/projects/1/issues/75
_links.notesStringExample: http://example.com/api/v4/projects/1/issues/2/notes
_links.projectStringExample: http://example.com/api/v4/projects/1
_links.selfStringExample: http://example.com/api/v4/projects/1/issues/2
assigneeAPIEntitiesUserBasic—
assigneesAPIEntitiesUserBasic—
authorAPIEntitiesUserBasic—
closed_atString (date-time)Example: 2022-11-15T08:30:55.232Z
closed_byAPIEntitiesUserBasic—
confidentialBoolean—
created_atString (date-time)Example: 2022-08-17T12:46:35.053Z
descriptionStringExample: Repellendus impedit et vel velit dignissimos.
discussion_lockedBoolean—
downvotesInteger—
due_dateString (date)Example: 2022-11-20
has_tasksBooleanExample: true
idInteger (int64)Example: 84
iidIntegerExample: 14
importedBooleanExample: false
imported_fromStringExample: github
issue_typeStringExample: issue
labelsArray of stringsExample: ["bug"]
merge_requests_countInteger—
milestoneAPIEntitiesMilestone—
moved_to_idInteger (int64)Example: 1
project_idInteger (int64)Example: 4
referencesAPIEntitiesIssuableReferences—
service_desk_reply_toStringExample: user@example.com
severityStringOne of [“UNKNOWN”, “LOW”, “MEDIUM”, “HIGH”, “CRITICAL”]
start_dateString (date)Example: 2022-11-18
stateStringExample: closed
subscribedBooleanExample: false
task_completion_statusAPIEntitiesTaskCompletionStatus—
task_statusStringExample: 2 of 4 tasks completed
time_statsAPIEntitiesIssuableTimeStats—
titleStringExample: Impedit et ut et dolores vero provident ullam est
typeStringOne of [“ISSUE”, “INCIDENT”, “TEST_CASE”, “REQUIREMENT”, “TASK”, “TICKET”]
Example: ISSUE
updated_atString (date-time)Example: 2022-11-14T17:22:01.470Z
upvotesInteger—
user_notes_countInteger—
web_urlStringExample: http://example.com/example/example/issues/14

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—

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—

APIEntitiesProjectLabel

PropertyTypeDescription
archivedBooleanExample: false
closed_issues_countIntegerExample: 0
colorStringExample: #FF0000
descriptionStringExample: Bug reported by user
description_htmlStringExample: <p>Bug reported by user</p>
idInteger (int64)Example: 1
is_project_labelBoolean—
nameStringExample: bug
open_issues_countIntegerExample: 1
open_merge_requests_countIntegerExample: 1
priorityIntegerExample: 10
subscribedBooleanExample: false
text_colorStringExample: #FFFFFF

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