채팅메시지 리스트 조회 (채팅방 최초진입시)
채팅메시지 리스트 조회 API (최초진입시)
채팅방 진입 시 캐싱된 채팅메시지 리스트를 가져온다 . (최대 100개)
캐싱된 데이터가 없다면 RDBMS에서 직접 가져오고 , 캐싱을 해준다.
정렬 순은 최신 순이다.
GET
/chat/api/v1/msg/{chatRoomId}
PathVariable
chatRoomId : 채팅방 고유번호
Request Headers
Name
Value
Accept
application/json
Cookie
리프레시 토큰
Access
액세스 토큰
Response
{
"status": 200,
"code": "SUCCESS REQUEST",
"data": [
{
"chatRoomId": "12",
"message": "4",
"msgCrDateMs": "2025-01-03 21:47:14.992752",
"msgCrDate": "2025-01-03 21:47:00",
"read": true,
"chatType": "TEXT",
"nickName": "하하1"
},
{
"chatRoomId": "12",
"message": "4",
"msgCrDateMs": "2025-01-03 21:47:14.902688",
"msgCrDate": "2025-01-03 21:47:00",
"read": true,
"chatType": "TEXT",
"nickName": "하하1"
},
{
"chatRoomId": "12",
"message": "3",
"msgCrDateMs": "2025-01-03 21:47:12.826259",
"msgCrDate": "2025-01-03 21:47:00",
"read": true,
"chatType": "TEXT",
"nickName": "하하1"
},
{
"chatRoomId": "12",
"message": "2",
"msgCrDateMs": "2025-01-03 21:47:11.274543",
"msgCrDate": "2025-01-03 21:47:00",
"read": true,
"chatType": "TEXT",
"nickName": "하하1"
},
{
"chatRoomId": "12",
"message": "1",
"msgCrDateMs": "2025-01-03 21:47:08.774614",
"msgCrDate": "2025-01-03 21:47:00",
"read": true,
"chatType": "TEXT",
"nickName": "하하1"
}
],
"timestamp": "2025-01-04 01:44:03"
}
Response(Validation)
{
"status": 400,
"message": "채팅방 고유번호는 정수, 1이상이여야 합니다.",
"code": "ERR-CHAT-API-VALI-01",
"timestamp": "2024-11-16 02:00:18"
}
Last updated