채팅방 내 파일 리스트 조회 - DevCamp2Flame/FlameTalk_Server GitHub Wiki
Chatroom files get API
Request
Method
GET
URL
/api/file/chatroom/{chatroomId}
Header
Method |
Parameter |
Description |
Content-Type |
application/json |
|
token |
{token} |
access token값 |
Path Variable
Field |
Type |
Description |
Required |
chatroomId |
String |
채팅방 ID |
Y |
Response
Header
Method |
Parameter |
Description |
statusCode |
{statusCode} |
|
Body
Field |
Type |
Description |
status |
Integer |
응답 코드 |
message |
String |
응답 메세지 |
data |
Object List |
파일 리스트. data 참고 |
data
Field |
Type |
Description |
id |
Long |
파일 ID |
url |
String |
파일 S3 URL |
title |
String |
파일명 |
extension |
String |
파일 확장자 |
createdDate |
LocalDateTime |
파일 업로드 날짜 |
SUCCESS example
{
"status": 200,
"messsage": "채팅방 파일 리스트 조회 성공",
"data": [
{
"id": 1,
"url": "https://flametalk-bucket.s3.ap-northeast-2.amazonaws.com/profile/flametalk_a_20222621172609.JPG",
"title": "flametalk_profile_12_1",
"extension": "jpeg",
"createdDate": "2022-01-14T10:52:39"
},
{
"id": 12,
"url": "https://flametalk-bucket.s3.ap-northeast-2.amazonaws.com/profile/flametalk_ab_20222621172609.JPG",
"title": "flametalk_profile_12_12",
"extension": "jpeg",
"createdDate": "2022-01-14T10:52:39"
}
]
}
Error Code
Code |
Error Messsage |
400 |
Bad Request |
401 |
Unauthorized |
500 |
Server Error |
FAIL example
{
"status": 400,
"message": "잘못된 요청입니다.",
"error": "BAD_REQUEST",
"code": "BAD_REQUEST",
"timestamp": "2022-01-18T19:30:16.3072905",
}