InfoGrab DocsInfoGrab Docs

알림 설정 API

요약

이 API를 사용하여 GitLab의 알림 설정을 관리합니다. 알림 수준은 NotificationSetting.level 모델 열거형에 정의되어 있습니다. custom 수준을 사용하면 개별 이메일 이벤트를 제어할 수 있습니다.

이 API를 사용하여 GitLab의 알림 설정을 관리합니다. 자세한 내용은 알림 이메일을 참고합니다.

알림 수준#

알림 수준은 NotificationSetting.level 모델 열거형에 정의되어 있습니다. 다음 수준을 사용할 수 있습니다.

  • disabled: 모든 알림을 끕니다
  • participating: 본인이 참여한 스레드의 알림을 받습니다
  • watch: 대부분의 활동에 대한 알림을 받습니다
  • global: 전역 알림 설정을 사용합니다
  • mention: 댓글에서 언급되었을 때 알림을 받습니다
  • custom: 선택한 이벤트의 알림을 받습니다

custom 수준을 사용하면 개별 이메일 이벤트를 제어할 수 있습니다. 사용 가능한 이벤트는 NotificationSetting.email_events가 반환합니다. 다음 이벤트를 사용할 수 있습니다.

Event Description
approver 본인이 승인할 수 있는 머지 리퀘스트가 생성된 경우
change_reviewer_merge_request 머지 리퀘스트의 리뷰어가 변경된 경우
close_issue 이슈가 닫힌 경우
close_merge_request 머지 리퀘스트가 닫힌 경우
failed_pipeline 파이프라인이 실패한 경우
fixed_pipeline 이전에 실패한 파이프라인이 복구된 경우
issue_due 이슈의 기한이 내일인 경우
merge_merge_request 머지 리퀘스트가 머지된 경우
merge_when_pipeline_succeeds 머지 리퀘스트가 자동 머지로 설정된 경우
moved_project 프로젝트가 이동된 경우
new_epic 새 에픽이 생성된 경우(Premium 및 Ultimate 티어)
new_issue 새 이슈가 생성된 경우
new_merge_request 새 머지 리퀘스트가 생성된 경우
new_note 누군가 댓글을 추가한 경우
new_release 새 릴리스가 게시된 경우
push_to_merge_request 누군가 머지 리퀘스트에 푸시한 경우
reassign_issue 이슈의 담당자가 변경된 경우
reassign_merge_request 머지 리퀘스트의 담당자가 변경된 경우
reopen_issue 이슈가 다시 열린 경우
reopen_merge_request 머지 리퀘스트가 다시 열린 경우
success_pipeline 파이프라인이 성공적으로 완료된 경우

전역 알림 설정 조회#

전역 알림 수준과 이메일 주소를 조회합니다.

GET /notification_settings

요청 예시:

curl --request GET \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/notification_settings"

성공하면 200 OK와 다음 응답 속성을 반환합니다.

속성 타입 Description
level string 전역 알림 수준
notification_email string 알림이 전송되는 이메일 주소

응답 예시:

{
  "level": "participating",
  "notification_email": "admin@example.com"
}

전역 알림 설정 업데이트#

알림 설정과 이메일 주소를 업데이트합니다.

PUT /notification_settings

요청 예시:

curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/notification_settings?level=watch"

지원되는 속성:

속성 타입 설명 Description
approver boolean No 본인이 승인할 수 있는 머지 리퀘스트가 생성되었을 때 알림을 켭니다
change_reviewer_merge_request boolean No 머지 리퀘스트의 리뷰어가 변경되었을 때 알림을 켭니다
close_issue boolean No 이슈가 닫혔을 때 알림을 켭니다
close_merge_request boolean No 머지 리퀘스트가 닫혔을 때 알림을 켭니다
failed_pipeline boolean No 파이프라인이 실패했을 때 알림을 켭니다
fixed_pipeline boolean No 이전에 실패한 파이프라인이 복구되었을 때 알림을 켭니다
issue_due boolean No 이슈의 기한이 내일일 때 알림을 켭니다
level string No 전역 알림 수준
merge_merge_request boolean No 머지 리퀘스트가 머지되었을 때 알림을 켭니다
merge_when_pipeline_succeeds boolean No 머지 리퀘스트가 자동 머지로 설정되었을 때 알림을 켭니다
moved_project boolean No 프로젝트가 이동되었을 때 알림을 켭니다
new_epic boolean No 새 에픽이 생성되었을 때 알림을 켭니다(Premium 및 Ultimate 티어)
new_issue boolean No 새 이슈가 생성되었을 때 알림을 켭니다
new_merge_request boolean No 새 머지 리퀘스트가 생성되었을 때 알림을 켭니다
new_note boolean No 새 댓글이 추가되었을 때 알림을 켭니다
new_release boolean No 새 릴리스가 게시되었을 때 알림을 켭니다
notification_email string No 알림이 전송되는 이메일 주소
push_to_merge_request boolean No 누군가 머지 리퀘스트에 푸시했을 때 알림을 켭니다
reassign_issue boolean No 이슈의 담당자가 변경되었을 때 알림을 켭니다
reassign_merge_request boolean No 머지 리퀘스트의 담당자가 변경되었을 때 알림을 켭니다
reopen_issue boolean No 이슈가 다시 열렸을 때 알림을 켭니다
reopen_merge_request boolean No 머지 리퀘스트가 다시 열렸을 때 알림을 켭니다
success_pipeline boolean No 파이프라인이 성공적으로 완료되었을 때 알림을 켭니다

성공하면 200 OK와 다음 응답 속성을 반환합니다.

속성 타입 Description
level string 전역 알림 수준
notification_email string 알림이 전송되는 이메일 주소

응답 예시:

{
  "level": "watch",
  "notification_email": "admin@example.com"
}

알림 설정 조회#

지정한 그룹 또는 프로젝트의 알림 수준을 조회합니다.

GET /groups/:id/notification_settings
GET /projects/:id/notification_settings

요청 예시:

curl --request GET \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/notification_settings"
curl --request GET \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/8/notification_settings"

지원되는 속성:

속성 타입 설명 Description
id integer or string Yes 그룹 또는 프로젝트의 ID 또는 URL 인코딩된 경로

성공하면 200 OK와 다음 응답 속성을 반환합니다.

속성 타입 Description
level string 알림 수준

표준 알림 수준의 응답 예시:

{
  "level": "global"
}

사용자 지정 알림 수준을 사용하는 그룹의 응답 예시:

{
  "level": "custom",
  "events": {
    "new_release": null,
    "new_note": null,
    "new_issue": null,
    "reopen_issue": null,
    "close_issue": null,
    "reassign_issue": null,
    "issue_due": null,
    "new_merge_request": null,
    "push_to_merge_request": null,
    "reopen_merge_request": null,
    "close_merge_request": null,
    "reassign_merge_request": null,
    "change_reviewer_merge_request": null,
    "merge_merge_request": null,
    "failed_pipeline": null,
    "fixed_pipeline": null,
    "success_pipeline": null,
    "moved_project": true,
    "merge_when_pipeline_succeeds": false,
    "new_epic": null
  }
}

이 응답에서 각 값의 의미는 다음과 같습니다.

  • true는 알림이 켜져 있음을 나타냅니다.
  • false는 알림이 꺼져 있음을 나타냅니다.
  • null은 알림이 기본 설정을 따름을 나타냅니다.
Note

new_epic 속성은 Premium 및 Ultimate 티어에서만 사용할 수 있습니다.

그룹 또는 프로젝트 알림 설정 업데이트#

그룹 또는 프로젝트의 알림 설정을 업데이트합니다.

PUT /groups/:id/notification_settings
PUT /projects/:id/notification_settings

요청 예시:

curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/notification_settings?level=watch"
curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/8/notification_settings?level=custom&new_note=true"

지원되는 속성:

속성 타입 설명 Description
approver boolean No 본인이 승인할 수 있는 머지 리퀘스트가 생성되었을 때 알림을 켭니다
change_reviewer_merge_request boolean No 머지 리퀘스트의 리뷰어가 변경되었을 때 알림을 켭니다
close_issue boolean No 이슈가 닫혔을 때 알림을 켭니다
close_merge_request boolean No 머지 리퀘스트가 닫혔을 때 알림을 켭니다
failed_pipeline boolean No 파이프라인이 실패했을 때 알림을 켭니다
fixed_pipeline boolean No 이전에 실패한 파이프라인이 복구되었을 때 알림을 켭니다
id integer or string Yes 그룹 또는 프로젝트의 ID 또는 URL 인코딩된 경로
issue_due boolean No 이슈의 기한이 내일일 때 알림을 켭니다
level string No 이 그룹 또는 프로젝트의 알림 수준
merge_merge_request boolean No 머지 리퀘스트가 머지되었을 때 알림을 켭니다
merge_when_pipeline_succeeds boolean No 머지 리퀘스트가 파이프라인 성공 시 머지로 설정되었을 때 알림을 켭니다
moved_project boolean No 프로젝트가 이동되었을 때 알림을 켭니다
new_epic boolean No 새 에픽이 생성되었을 때 알림을 켭니다(Premium 및 Ultimate 티어)
new_issue boolean No 새 이슈가 생성되었을 때 알림을 켭니다
new_merge_request boolean No 새 머지 리퀘스트가 생성되었을 때 알림을 켭니다
new_note boolean No 새 댓글이 추가되었을 때 알림을 켭니다
new_release boolean No 새 릴리스가 게시되었을 때 알림을 켭니다
push_to_merge_request boolean No 누군가 머지 리퀘스트에 푸시했을 때 알림을 켭니다
reassign_issue boolean No 이슈의 담당자가 변경되었을 때 알림을 켭니다
reassign_merge_request boolean No 머지 리퀘스트의 담당자가 변경되었을 때 알림을 켭니다
reopen_issue boolean No 이슈가 다시 열렸을 때 알림을 켭니다
reopen_merge_request boolean No 머지 리퀘스트가 다시 열렸을 때 알림을 켭니다
success_pipeline boolean No 파이프라인이 성공적으로 완료되었을 때 알림을 켭니다

성공하면 200 OK와 다음 응답 형식 중 하나를 반환합니다.

사용자 지정이 아닌 알림 수준의 경우:

{
  "level": "watch"
}

사용자 지정 알림 수준의 경우, 응답에 각 알림의 상태를 나타내는 events 객체가 포함됩니다.

{
  "level": "custom",
  "events": {
    "new_release": null,
    "new_note": true,
    "new_issue": false,
    "reopen_issue": null,
    "close_issue": null,
    "reassign_issue": null,
    "issue_due": null,
    "new_merge_request": null,
    "push_to_merge_request": null,
    "reopen_merge_request": null,
    "close_merge_request": null,
    "reassign_merge_request": null,
    "change_reviewer_merge_request": null,
    "merge_merge_request": null,
    "failed_pipeline": false,
    "fixed_pipeline": null,
    "success_pipeline": null,
    "moved_project": false,
    "merge_when_pipeline_succeeds": false,
    "new_epic": null
  }
}

이 응답에서 각 값의 의미는 다음과 같습니다.

  • true는 알림이 켜져 있음을 나타냅니다.
  • false는 알림이 꺼져 있음을 나타냅니다.
  • null은 알림이 기본 설정을 따름을 나타냅니다.
Note

new_epic 속성은 Premium 및 Ultimate 티어에서만 사용할 수 있습니다.

알림 설정 API

GitLab v19.5
Tier: Free, Premium, Ultimate
Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
원문 보기

요약

이 API를 사용하여 GitLab의 알림 설정을 관리합니다. 알림 수준은 NotificationSetting.level 모델 열거형에 정의되어 있습니다. custom 수준을 사용하면 개별 이메일 이벤트를 제어할 수 있습니다.

이 API를 사용하여 GitLab의 알림 설정을 관리합니다. 자세한 내용은 알림 이메일을 참고합니다.

알림 수준#

알림 수준은 NotificationSetting.level 모델 열거형에 정의되어 있습니다. 다음 수준을 사용할 수 있습니다.

  • disabled: 모든 알림을 끕니다
  • participating: 본인이 참여한 스레드의 알림을 받습니다
  • watch: 대부분의 활동에 대한 알림을 받습니다
  • global: 전역 알림 설정을 사용합니다
  • mention: 댓글에서 언급되었을 때 알림을 받습니다
  • custom: 선택한 이벤트의 알림을 받습니다

custom 수준을 사용하면 개별 이메일 이벤트를 제어할 수 있습니다. 사용 가능한 이벤트는 NotificationSetting.email_events가 반환합니다. 다음 이벤트를 사용할 수 있습니다.

Event Description
approver 본인이 승인할 수 있는 머지 리퀘스트가 생성된 경우
change_reviewer_merge_request 머지 리퀘스트의 리뷰어가 변경된 경우
close_issue 이슈가 닫힌 경우
close_merge_request 머지 리퀘스트가 닫힌 경우
failed_pipeline 파이프라인이 실패한 경우
fixed_pipeline 이전에 실패한 파이프라인이 복구된 경우
issue_due 이슈의 기한이 내일인 경우
merge_merge_request 머지 리퀘스트가 머지된 경우
merge_when_pipeline_succeeds 머지 리퀘스트가 자동 머지로 설정된 경우
moved_project 프로젝트가 이동된 경우
new_epic 새 에픽이 생성된 경우(Premium 및 Ultimate 티어)
new_issue 새 이슈가 생성된 경우
new_merge_request 새 머지 리퀘스트가 생성된 경우
new_note 누군가 댓글을 추가한 경우
new_release 새 릴리스가 게시된 경우
push_to_merge_request 누군가 머지 리퀘스트에 푸시한 경우
reassign_issue 이슈의 담당자가 변경된 경우
reassign_merge_request 머지 리퀘스트의 담당자가 변경된 경우
reopen_issue 이슈가 다시 열린 경우
reopen_merge_request 머지 리퀘스트가 다시 열린 경우
success_pipeline 파이프라인이 성공적으로 완료된 경우

전역 알림 설정 조회#

전역 알림 수준과 이메일 주소를 조회합니다.

GET /notification_settings

요청 예시:

curl --request GET \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/notification_settings"

성공하면 200 OK와 다음 응답 속성을 반환합니다.

속성 타입 Description
level string 전역 알림 수준
notification_email string 알림이 전송되는 이메일 주소

응답 예시:

{
  "level": "participating",
  "notification_email": "admin@example.com"
}

전역 알림 설정 업데이트#

알림 설정과 이메일 주소를 업데이트합니다.

PUT /notification_settings

요청 예시:

curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/notification_settings?level=watch"

지원되는 속성:

속성 타입 설명 Description
approver boolean No 본인이 승인할 수 있는 머지 리퀘스트가 생성되었을 때 알림을 켭니다
change_reviewer_merge_request boolean No 머지 리퀘스트의 리뷰어가 변경되었을 때 알림을 켭니다
close_issue boolean No 이슈가 닫혔을 때 알림을 켭니다
close_merge_request boolean No 머지 리퀘스트가 닫혔을 때 알림을 켭니다
failed_pipeline boolean No 파이프라인이 실패했을 때 알림을 켭니다
fixed_pipeline boolean No 이전에 실패한 파이프라인이 복구되었을 때 알림을 켭니다
issue_due boolean No 이슈의 기한이 내일일 때 알림을 켭니다
level string No 전역 알림 수준
merge_merge_request boolean No 머지 리퀘스트가 머지되었을 때 알림을 켭니다
merge_when_pipeline_succeeds boolean No 머지 리퀘스트가 자동 머지로 설정되었을 때 알림을 켭니다
moved_project boolean No 프로젝트가 이동되었을 때 알림을 켭니다
new_epic boolean No 새 에픽이 생성되었을 때 알림을 켭니다(Premium 및 Ultimate 티어)
new_issue boolean No 새 이슈가 생성되었을 때 알림을 켭니다
new_merge_request boolean No 새 머지 리퀘스트가 생성되었을 때 알림을 켭니다
new_note boolean No 새 댓글이 추가되었을 때 알림을 켭니다
new_release boolean No 새 릴리스가 게시되었을 때 알림을 켭니다
notification_email string No 알림이 전송되는 이메일 주소
push_to_merge_request boolean No 누군가 머지 리퀘스트에 푸시했을 때 알림을 켭니다
reassign_issue boolean No 이슈의 담당자가 변경되었을 때 알림을 켭니다
reassign_merge_request boolean No 머지 리퀘스트의 담당자가 변경되었을 때 알림을 켭니다
reopen_issue boolean No 이슈가 다시 열렸을 때 알림을 켭니다
reopen_merge_request boolean No 머지 리퀘스트가 다시 열렸을 때 알림을 켭니다
success_pipeline boolean No 파이프라인이 성공적으로 완료되었을 때 알림을 켭니다

성공하면 200 OK와 다음 응답 속성을 반환합니다.

속성 타입 Description
level string 전역 알림 수준
notification_email string 알림이 전송되는 이메일 주소

응답 예시:

{
  "level": "watch",
  "notification_email": "admin@example.com"
}

알림 설정 조회#

지정한 그룹 또는 프로젝트의 알림 수준을 조회합니다.

GET /groups/:id/notification_settings
GET /projects/:id/notification_settings

요청 예시:

curl --request GET \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/notification_settings"
curl --request GET \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/8/notification_settings"

지원되는 속성:

속성 타입 설명 Description
id integer or string Yes 그룹 또는 프로젝트의 ID 또는 URL 인코딩된 경로

성공하면 200 OK와 다음 응답 속성을 반환합니다.

속성 타입 Description
level string 알림 수준

표준 알림 수준의 응답 예시:

{
  "level": "global"
}

사용자 지정 알림 수준을 사용하는 그룹의 응답 예시:

{
  "level": "custom",
  "events": {
    "new_release": null,
    "new_note": null,
    "new_issue": null,
    "reopen_issue": null,
    "close_issue": null,
    "reassign_issue": null,
    "issue_due": null,
    "new_merge_request": null,
    "push_to_merge_request": null,
    "reopen_merge_request": null,
    "close_merge_request": null,
    "reassign_merge_request": null,
    "change_reviewer_merge_request": null,
    "merge_merge_request": null,
    "failed_pipeline": null,
    "fixed_pipeline": null,
    "success_pipeline": null,
    "moved_project": true,
    "merge_when_pipeline_succeeds": false,
    "new_epic": null
  }
}

이 응답에서 각 값의 의미는 다음과 같습니다.

  • true는 알림이 켜져 있음을 나타냅니다.
  • false는 알림이 꺼져 있음을 나타냅니다.
  • null은 알림이 기본 설정을 따름을 나타냅니다.
Note

new_epic 속성은 Premium 및 Ultimate 티어에서만 사용할 수 있습니다.

그룹 또는 프로젝트 알림 설정 업데이트#

그룹 또는 프로젝트의 알림 설정을 업데이트합니다.

PUT /groups/:id/notification_settings
PUT /projects/:id/notification_settings

요청 예시:

curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/notification_settings?level=watch"
curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/8/notification_settings?level=custom&new_note=true"

지원되는 속성:

속성 타입 설명 Description
approver boolean No 본인이 승인할 수 있는 머지 리퀘스트가 생성되었을 때 알림을 켭니다
change_reviewer_merge_request boolean No 머지 리퀘스트의 리뷰어가 변경되었을 때 알림을 켭니다
close_issue boolean No 이슈가 닫혔을 때 알림을 켭니다
close_merge_request boolean No 머지 리퀘스트가 닫혔을 때 알림을 켭니다
failed_pipeline boolean No 파이프라인이 실패했을 때 알림을 켭니다
fixed_pipeline boolean No 이전에 실패한 파이프라인이 복구되었을 때 알림을 켭니다
id integer or string Yes 그룹 또는 프로젝트의 ID 또는 URL 인코딩된 경로
issue_due boolean No 이슈의 기한이 내일일 때 알림을 켭니다
level string No 이 그룹 또는 프로젝트의 알림 수준
merge_merge_request boolean No 머지 리퀘스트가 머지되었을 때 알림을 켭니다
merge_when_pipeline_succeeds boolean No 머지 리퀘스트가 파이프라인 성공 시 머지로 설정되었을 때 알림을 켭니다
moved_project boolean No 프로젝트가 이동되었을 때 알림을 켭니다
new_epic boolean No 새 에픽이 생성되었을 때 알림을 켭니다(Premium 및 Ultimate 티어)
new_issue boolean No 새 이슈가 생성되었을 때 알림을 켭니다
new_merge_request boolean No 새 머지 리퀘스트가 생성되었을 때 알림을 켭니다
new_note boolean No 새 댓글이 추가되었을 때 알림을 켭니다
new_release boolean No 새 릴리스가 게시되었을 때 알림을 켭니다
push_to_merge_request boolean No 누군가 머지 리퀘스트에 푸시했을 때 알림을 켭니다
reassign_issue boolean No 이슈의 담당자가 변경되었을 때 알림을 켭니다
reassign_merge_request boolean No 머지 리퀘스트의 담당자가 변경되었을 때 알림을 켭니다
reopen_issue boolean No 이슈가 다시 열렸을 때 알림을 켭니다
reopen_merge_request boolean No 머지 리퀘스트가 다시 열렸을 때 알림을 켭니다
success_pipeline boolean No 파이프라인이 성공적으로 완료되었을 때 알림을 켭니다

성공하면 200 OK와 다음 응답 형식 중 하나를 반환합니다.

사용자 지정이 아닌 알림 수준의 경우:

{
  "level": "watch"
}

사용자 지정 알림 수준의 경우, 응답에 각 알림의 상태를 나타내는 events 객체가 포함됩니다.

{
  "level": "custom",
  "events": {
    "new_release": null,
    "new_note": true,
    "new_issue": false,
    "reopen_issue": null,
    "close_issue": null,
    "reassign_issue": null,
    "issue_due": null,
    "new_merge_request": null,
    "push_to_merge_request": null,
    "reopen_merge_request": null,
    "close_merge_request": null,
    "reassign_merge_request": null,
    "change_reviewer_merge_request": null,
    "merge_merge_request": null,
    "failed_pipeline": false,
    "fixed_pipeline": null,
    "success_pipeline": null,
    "moved_project": false,
    "merge_when_pipeline_succeeds": false,
    "new_epic": null
  }
}

이 응답에서 각 값의 의미는 다음과 같습니다.

  • true는 알림이 켜져 있음을 나타냅니다.
  • false는 알림이 꺼져 있음을 나타냅니다.
  • null은 알림이 기본 설정을 따름을 나타냅니다.
Note

new_epic 속성은 Premium 및 Ultimate 티어에서만 사용할 수 있습니다.