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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
subscribable_Path, | String | Internal ID of the issue or merge request, |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
subscribable_Path, | String | Internal ID of the issue or merge request, |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
subscribable_Path, | String | Internal ID of the issue or merge request, |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
subscribable_Path, | String | Internal ID of the issue or merge request, |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
subscribable_Path, | String | Internal ID of the issue or merge request, |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
subscribable_Path, | String | Internal ID of the issue or merge request, |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
subscribable_Path, | String | Internal ID of the issue or merge request, |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
subscribable_Path, | String | Internal ID of the issue or merge request, |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesCiPipeline
| Property | Type | Description |
|---|---|---|
archived | Boolean | Example:false |
before_ | String | Example:a91957a858320c0e17f3 |
committed_ | String (date- | Example:2015- |
coverage | Number (float) | Example:98. |
created_ | String (date- | Example:2015- |
detailed_ | Detailed | — |
duration | Integer | Time spent running in seconds Example: 127 |
finished_ | String (date- | Example:2015- |
id | Integer (int64) | ID of the pipeline Example: 1 |
iid | Integer | Internal ID of the pipeline Example: 2 |
project_ | Integer (int64) | ID of the project of the pipeline Example: 3 |
queued_ | Integer | Time spent enqueued in seconds Example: 63 |
ref | String | Git reference of the pipeline Example: feature- |
sha | String | SHA of the commit the pipeline runs for Example: 0ec9e58fdfca6cdd6652 |
source | String | Source that triggered the pipeline Example: push |
started_ | String (date- | Example:2015- |
status | String | Status of the pipeline Example: success |
tag | Boolean | Example:false |
updated_ | String (date- | Example:2015- |
user | APIEntities | — |
web_ | String | URL of the pipeline in the Git Example: https: |
yaml_ | String | Example:widgets: |
APIEntitiesCiPipelineBasic
| Property | Type | Description |
|---|---|---|
created_ | String (date- | Timestamp when the pipeline was created Example: 2022- |
id | Integer (int64) | ID of the pipeline Example: 1 |
iid | Integer | Internal ID of the pipeline Example: 2 |
project_ | Integer (int64) | ID of the project of the pipeline Example: 3 |
ref | String | Git reference of the pipeline Example: feature- |
sha | String | SHA of the commit the pipeline runs for Example: 0ec9e58fdfca6cdd6652 |
source | String | Source that triggered the pipeline Example: push |
status | String | Status of the pipeline Example: success |
updated_ | String (date- | Timestamp when the pipeline was last updated Example: 2022- |
web_ | String | URL of the pipeline in the Git Example: https: |
APIEntitiesCustomAttribute
| Property | Type | Description |
|---|---|---|
key | String | Example:foo |
value | String | Example:bar |
APIEntitiesDiffRefs
| Property | Type | Description |
|---|---|---|
base_ | String | SHA of the merge base commit where the source and target branches diverged Example: b83d6e391c22777fca1e |
head_ | String | SHA of the head commit of the source branch Example: b83d6e391c22777fca1e |
start_ | String | SHA of the target branch commit the diff starts from.base_Example: b83d6e391c22777fca1e |
APIEntitiesGroupLabel
| Property | Type | Description |
|---|---|---|
archived | Boolean | Example:false |
closed_ | Integer | Example:0 |
color | String | Example:#FF0000 |
description | String | Example:Bug reported by user |
description_ | String | Example:<p>Bug reported by user</ |
id | Integer (int64) | Example:1 |
name | String | Example:bug |
open_ | Integer | Example:1 |
open_ | Integer | Example:1 |
subscribed | Boolean | Example:false |
text_ | String | Example:#FFFFFF |
APIEntitiesIssuableReferences
| Property | Type | Description |
|---|---|---|
full | String | Example:test&6 |
relative | String | Example:&6 |
short | String | Example:&6 |
APIEntitiesIssuableTimeStats
| Property | Type | Description |
|---|---|---|
human_ | String | Example:3h 30m |
human_ | String | Example:1h |
time_ | Integer | Example:12600 |
total_ | Integer | Example:3600 |
APIEntitiesIssue
| Property | Type | Description |
|---|---|---|
_ | Object | — |
_ | String | Example:http: |
_ | String | Example:http: |
_ | String | Example:http: |
_ | String | Example:http: |
_ | String | Example:http: |
assignee | APIEntities | — |
assignees | Array of APIEntities | — |
author | APIEntities | — |
closed_ | String (date- | Example:2022- |
closed_ | APIEntities | — |
confidential | Boolean | — |
created_ | String (date- | Example:2022- |
description | String | Example:Repellendus impedit et vel velit dignissimos. |
discussion_ | Boolean | — |
downvotes | Integer | — |
due_ | String (date) | Example:2022- |
has_ | Boolean | Example:true |
id | Integer (int64) | Example:84 |
iid | Integer | Example:14 |
imported | Boolean | Example:false |
imported_ | String | Example:github |
issue_ | String | Example:issue |
labels | Array of strings | Example:["bug"] |
merge_ | Integer | — |
milestone | APIEntities | — |
moved_ | Integer (int64) | Example:1 |
project_ | Integer (int64) | Example:4 |
references | APIEntities | — |
service_ | String | Example:user@example. |
severity | String | The severity of the issue Allowed values: UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL |
start_ | String (date) | Example:2022- |
state | String | Example:closed |
subscribed | Boolean | Example:false |
task_ | APIEntities | — |
task_ | String | Example:2 of 4 tasks completed |
time_ | APIEntities | — |
title | String | Example:Impedit et ut et dolores vero provident ullam est |
type | String | The type of the issue Allowed values: ISSUE,INCIDENT,TEST_,REQUIREMENT,TASK,TICKETExample: ISSUE |
updated_ | String (date- | Example:2022- |
upvotes | Integer | — |
user_ | Integer | — |
web_ | String | Example:http: |
APIEntitiesMergeRequest
| Property | Type | Description |
|---|---|---|
allow_ | Boolean | If true, |
allow_ | Boolean | Returned only for merge requests from forks.allow_ instead |
assignee | APIEntities | First user assigned to the merge request.assignees instead |
assignees | Array of APIEntities | Users assigned to the merge request |
author | APIEntities | User who created the merge request |
blocking_ | Boolean | If true,true if the project does not require all threads to be resolved before merge |
changes_ | String | Number of changed files in the merge request,+,"1000+"Example: 1 |
closed_ | String (date- | Timestamp of when the merge request was closed Example: 2022- |
closed_ | APIEntities | User who closed the merge request.null if the merge request is not closed |
created_ | String (date- | Example:2022- |
description | String | Example:Repellendus impedit et vel velit dignissimos. |
description_ | String | Description of the merge request rendered as HTML.render_ is true |
detailed_ | String | Detailed merge status of the merge request.approvals_ (approvals are syncing),checking (Git is testing whether a valid merge is possible),ci_ (a CI/ci_ (a CI/commits_ (the source branch must exist and contain commits),conflict (conflicts exist between the source and target branches),discussions_ (all discussions must be resolved before merge),draft_ (the merge request is a draft),jira_ (the title or description must reference a Jira issue),locked_ (LFS files locked by other users must be unlocked before merge),locked_ (paths locked by other users must be unlocked before merging to the default branch),merge_ (blocked by another merge request),merge_ (cannot be merged until after the specified time),mergeable (the branch can merge cleanly into the target branch),need_ (the merge request must be rebased),not_ (approval is required before merge),not_ (the merge request must be open before merge),preparing (the merge request diff is being created),requested_ (reviewers have requested changes),security_ (when security policies are enforced,security_ (all security policies must be satisfied),status_ (all status checks must pass before merge),title_ (the title must match the regular expression set in the project settings),unchecked (Git has not yet tested whether a valid merge is possible)Example: mergeable |
diff_ | APIEntities | Base, |
discussion_ | Boolean | If true, |
diverged_ | Integer | Number of commits the source branch is behind the target branch.include_ is trueExample: 0 |
downvotes | Integer | Number of downvotes for the merge request |
draft | Boolean | If true, |
first_ | Boolean | If true, |
first_ | String (date- | Timestamp of when the first deployment to production finished Example: 2022- |
force_ | Boolean | If true, |
has_ | Boolean | If true,false unless merge_ is cannot_ |
head_ | APIEntities | Pipeline that runs on the HEAD commit of the source branch.pipeline, |
id | Integer (int64) | Example:84 |
iid | Integer | Example:14 |
imported | Boolean | If true, |
imported_ | String | Source of the import,bitbucketExample: bitbucket |
labels | Array of strings | Names of the labels assigned to the merge request,with_ is true,id,name,color,text_,description,description_ and archived instead |
latest_ | String (date- | Timestamp of when the latest build for the merge request finished Example: 2022- |
latest_ | String (date- | Timestamp of when the latest build for the merge request started Example: 2022- |
merge_ | String (date- | If set, Example: 2022- |
merge_ | String | SHA of the merge commit.null until the merge request is mergedExample: 1234abcd |
merge_ | String | Error message shown when a merge fails.detailed_ insteadExample: Merge error |
merge_ | String | Status of the merge request.unchecked,checking,can_,cannot_ or cannot_.has_.detailed_ insteadExample: unchecked |
merge_ | APIEntities | User who merged the merge request or set it to auto-null |
merge_ | Boolean | If true, |
merged_ | String (date- | Timestamp of when the merge request was merged Example: 2022- |
merged_ | APIEntities | User who merged the merge request or set it to auto-merge_ instead |
milestone | APIEntities | Milestone assigned to the merge request |
pipeline | APIEntities | Pipeline running on the branch HEAD of the merge request.head_ instead, |
prepared_ | String (date- | Timestamp of when the merge request was prepared. Example: 2022- |
project_ | Integer (int64) | Example:4 |
rebase_ | Boolean | If true,include_ is true |
reference | String | Internal reference of the merge request,references insteadExample: !1 |
references | APIEntities | Internal references of the merge request:short,relative and full.relative matches short.relative matches full |
reviewers | Array of APIEntities | Reviewers of the merge request |
sha | String | SHA of the head commit of the source branch Example: 1234abcd |
should_ | Boolean | If true, |
source_ | String | Name of the source branch |
source_ | Integer (int64) | ID of the source project.target_, |
squash | Boolean | If true,squash_ to take them into account |
squash_ | String | SHA of the squash commit. Example: 1234abcd |
squash_ | Boolean | If true, |
state | String | Example:closed |
subscribed | Boolean | If true, |
target_ | String | Name of the target branch |
target_ | Integer (int64) | ID of the target project |
task_ | APIEntities | Completion status of the task list:count and completed_ |
time_ | APIEntities | Time tracking statistics of the merge request:time_,total_,human_ and human_ |
title | String | Example:Impedit et ut et dolores vero provident ullam est |
title_ | String | Title of the merge request rendered as HTML.render_ is true |
updated_ | String (date- | Example:2022- |
upvotes | Integer | Number of upvotes for the merge request |
user | Object | Permissions of the current user for the merge request |
user. | Boolean | If true, |
user_ | Integer | Number of user comments on the merge request |
web_ | String | Web URL of the merge request Example: https: |
work_ | Boolean | If true,draft instead |
APIEntitiesMergeRequestAuthor
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | URL of the user’s avatar Example: https: |
bot | Boolean | If true,Example: false |
custom_ | Array of APIEntities | — |
id | Integer (int64) | ID of the user Example: 1 |
locked | Boolean | If true, |
name | String | Name of the user.**** if the current user cannot read the bot’s project or groupExample: Administrator |
public_ | String | Public email address of the user Example: john@example. |
state | String | State of the user account.active,blocked,ldap_,blocked_,banned,deactivatedExample: active |
username | String | Username of the user Example: admin |
web_ | String | URL of the user’s profile Example: https: |
APIEntitiesMilestone
| Property | Type | Description |
|---|---|---|
created_ | String | — |
description | String | — |
due_ | String | — |
expired | Boolean | — |
group_ | String | — |
id | Integer (int64) | — |
iid | Integer (int64) | — |
project_ | Integer (int64) | — |
start_ | String | — |
state | String | — |
title | String | — |
updated_ | String | — |
web_ | String | — |
APIEntitiesProjectLabel
| Property | Type | Description |
|---|---|---|
archived | Boolean | Example:false |
closed_ | Integer | Example:0 |
color | String | Example:#FF0000 |
description | String | Example:Bug reported by user |
description_ | String | Example:<p>Bug reported by user</ |
id | Integer (int64) | Example:1 |
is_ | Boolean | — |
name | String | Example:bug |
open_ | Integer | Example:1 |
open_ | Integer | Example:1 |
priority | Integer | Example:10 |
subscribed | Boolean | Example:false |
text_ | String | Example:#FFFFFF |
APIEntitiesTaskCompletionStatus
| Property | Type | Description |
|---|---|---|
completed_ | Integer | Example:3 |
count | Integer | Example:5 |
APIEntitiesUserBasic
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | URL of the user’s avatar Example: https: |
custom_ | Array of APIEntities | — |
id | Integer (int64) | ID of the user Example: 1 |
locked | Boolean | If true, |
name | String | Name of the user.**** if the current user cannot read the bot’s project or groupExample: Administrator |
public_ | String | Public email address of the user Example: john@example. |
state | String | State of the user account.active,blocked,ldap_,blocked_,banned,deactivatedExample: active |
username | String | Username of the user Example: admin |
web_ | String | URL of the user’s profile Example: https: |
DetailedStatusEntity
| Property | Type | Description |
|---|---|---|
action | Object | — |
action. | String | Example:Cancel this job |
action. | String | Example:Are you sure? |
action. | String | Example:cancel |
action. | String | Example:post |
action. | String | Example:/ |
action. | String | Example:Cancel |
details_ | String | Example:/ |
favicon | String | Example:/ |
group | String | Example:success |
has_ | Boolean | Example:true |
icon | String | Example:status_ |
illustration | Object | Example:{"content": |
label | String | Example:passed |
text | String | Example:passed |
tooltip | String | Example:passed |