💡 API 명세서
1. Pin 생성
- Method: POST
- Endpoint:
/pin
- Headers:
Authorization: Bearer "토큰값"
- Query Parameters:
- Content-Type: multipart/form-data
- Body (FormData):
description: "설명"
multipartFileList: [파일1, 파일2, ...]
foundAt: "2024-03-05T12:12:12"
latitude: 37.5665
longitude: 126.9780
- Response:
{
"pinId": 1,
"reportId": 123,
"memberId": 456,
"description": "Pin 설명",
"foundAt": "2024-03-05T12:12:12",
"address": null,
"latitude": 37.56,
"longitude": 126.97,
"pinImageDtoList": [
{
"pinImageId": 789,
"url": "https:/aws.com/image.png"
}
]
}
2. Pin 주소 업데이트
- Method: PUT
- Endpoint:
/pin/{pinId}/address
- Headers:
Authorization: Bearer "토큰값"
- Content-Type: application/json
- Path Variables:
- Body:
- Response:
{
"pinId": 1,
"address": "새로운 주소",
"latitude": 37.5665,
"longitude": 126.9780
}
3. Pin 정보 업데이트
- Method: PUT
- Endpoint:
/pin/{pinId}
- Headers:
Authorization: Bearer "토큰값"
- Content-Type: application/json
- Path Variables:
- Body:
{
"description": "업데이트된 설명",
"foundAt": "2024-03-06T13:13:13"
}
- Response(json):
{
"pinId": 1,
"description": "업데이트된 설명",
"foundAt": "2024-03-06T13:13:13",
"address": "업데이트된 주소",
"latitude": 37.57,
"longitude": 126.98
}
4. Pin 삭제
- Method: DELETE
- Endpoint:
/pin/{pinId}
- Headers:
Authorization: Bearer "토큰값"
- Path Variables:
- Response: No Content
Report의 Pin List 가져오기
- Method: GET
- Endpoint:
/pin/report/{reportId}/pin-list
- Headers:
Authorization: Bearer "토큰값"
- Path Variables:
- Response:
[
{
"pinId": 1,
"description": "Pin 설명",
"foundAt": "2024-03-05T12:12:12",
"address": "도로명 주소",
"latitude": 37.56,
"longitude": 126.97
}
]
5. Pin 상세정보 가져오기
- Method: GET
- Endpoint:
/pin/{pinId}
- Headers:
Authorization: Bearer "토큰값"
- Path Variables:
- Response:
{
"pinId": 1,
"reportId": 123,
"memberId": 456,
"description": "Pin 설명",
"foundAt": "2024-03-05T12:12:12",
"address": "도로명 주소",
"latitude": 37.56,
"longitude": 126.97,
"pinImageDtoList": [
{
"pinImageId": 789,
"url": "https://aws.com/image.png"
}
]
}
📚 프론트 화이팅~
💡 API 명세서
1. Pin 생성
/pinAuthorization: Bearer "토큰값"reportId: 123description: "설명"multipartFileList: [파일1, 파일2, ...]foundAt: "2024-03-05T12:12:12"latitude: 37.5665longitude: 126.9780{ "pinId": 1, "reportId": 123, "memberId": 456, "description": "Pin 설명", "foundAt": "2024-03-05T12:12:12", "address": null, "latitude": 37.56, "longitude": 126.97, "pinImageDtoList": [ { "pinImageId": 789, "url": "https:/aws.com/image.png" } ] }2. Pin 주소 업데이트
/pin/{pinId}/addressAuthorization: Bearer "토큰값"pinId: 1{ "address": "새로운 주소" }{ "pinId": 1, "address": "새로운 주소", "latitude": 37.5665, "longitude": 126.9780 }3. Pin 정보 업데이트
/pin/{pinId}Authorization: Bearer "토큰값"pinId: 1{ "description": "업데이트된 설명", "foundAt": "2024-03-06T13:13:13" }{ "pinId": 1, "description": "업데이트된 설명", "foundAt": "2024-03-06T13:13:13", "address": "업데이트된 주소", "latitude": 37.57, "longitude": 126.98 }4. Pin 삭제
/pin/{pinId}Authorization: Bearer "토큰값"pinId: 1Report의 Pin List 가져오기
/pin/report/{reportId}/pin-listAuthorization: Bearer "토큰값"reportId: 123[ { "pinId": 1, "description": "Pin 설명", "foundAt": "2024-03-05T12:12:12", "address": "도로명 주소", "latitude": 37.56, "longitude": 126.97 } ]5. Pin 상세정보 가져오기
/pin/{pinId}Authorization: Bearer "토큰값"pinId: 1{ "pinId": 1, "reportId": 123, "memberId": 456, "description": "Pin 설명", "foundAt": "2024-03-05T12:12:12", "address": "도로명 주소", "latitude": 37.56, "longitude": 126.97, "pinImageDtoList": [ { "pinImageId": 789, "url": "https://aws.com/image.png" } ] }📚 프론트 화이팅~