SSE 연결

HTTP request

GET /notification/connect HTTP/1.1
Authorization: "access token"
Last-Event-ID: lastEventIdValue
Accept: text/event-stream
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
X-Accel-Buffering: no
Connection: keep-alive

전체 알림 조회

HTTP request

GET /notification/all HTTP/1.1
Authorization: "access token"
Accept: application/json
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 202

[ {
  "id" : 1,
  "type" : "comment",
  "content" : "알림 내용",
  "url" : "/board/1",
  "publishedAt" : [ 2023, 6, 19, 17, 21, 44 ],
  "name" : "닉네임",
  "checked" : false,
  "del" : false
} ]

Response fields

Path Type Description

[].id

Number

알림 고유번호

[].type

String

알림 분류

[].content

String

알림 내용

[].url

String

알림 redirect URL

[].publishedAt[]

Array

알림 생성 일시

[].name

String

알림 발신지에 해당하는 회원의 닉네임

[].checked

Boolean

알림 읽음 상태 구분

[].del

Boolean

알림 삭제 상태

알림 삭제

HTTP request

POST /notification HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: "access token"
Accept: application/json
Content-Length: 31
Host: localhost:8080

{
  "idList" : [ 1, 2, 3, 4 ]
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 20

{
  "status" : 200
}

Response fields

Path Type Description

status

Number

응답 상태코드

알림 읽음 처리

HTTP request

PATCH /notification/checked/1 HTTP/1.1
Authorization: "access token"
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 20

{
  "status" : 200
}

Response fields

Path Type Description

status

Number

응답 상태코드