역 검색 API
역 이름으로 역 검색
GET /search/station
요청 파라미터
| 파라미터 | 필수여부 | 설명 |
|---|---|---|
|
필수 |
검색할 역 이름 (최소 2자 이상) |
요청 예시
GET /search/station?stationName=강남 HTTP/1.1
Host: localhost:8080
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
검색된 역 총 개수 |
|
|
NotNull |
역 목록 |
|
|
NotNull |
역 이름 |
|
|
NotNull |
역 ID |
|
|
NotNull |
경도 |
|
|
NotNull |
위도 |
|
|
NotNull |
노선 이름 |
|
|
NotNull |
노선 색상 (hex) |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 361
{
"totalCount" : 2,
"stations" : [ {
"stationName" : "강남",
"stationID" : "228",
"x" : 127.0276,
"y" : 37.4979,
"laneName" : "2호선",
"lineColor" : "#00A84D"
}, {
"stationName" : "강남구청",
"stationID" : "734",
"x" : 127.0435,
"y" : 37.5172,
"laneName" : "7호선",
"lineColor" : "#747F00"
} ]
}
추천 시간대 조회
GET /search/route
요청 파라미터
| 파라미터 | 필수여부 | 설명 |
|---|---|---|
|
필수 |
출발역 ID (숫자) |
|
필수 |
도착역 ID (숫자) |
|
필수 |
조회 날짜 (yyyy-MM-dd) |
|
필수 |
조회 시작 시간 (HH:mm) |
|
필수 |
조회 종료 시간 (HH:mm) |
요청 예시
GET /search/route?departureStationId=228&arrivalStationId=150&searchDate=2026-03-21&startTime=09:00&endTime=11:00 HTTP/1.1
Host: localhost:8080
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
출발역 ID |
|
|
NotNull |
도착역 ID |
|
|
NotNull |
출발역 이름 |
|
|
NotNull |
도착역 이름 |
|
|
NotNull |
이동 날짜 |
|
|
NotNull |
요일 유형 (평일/주말) |
|
|
NotNull |
결과 메시지 |
|
|
NotNull |
추천 시간대 목록 |
|
|
NotNull |
출발 시간 (HH:mm) |
|
|
NotNull |
도착 시간 (HH:mm) |
|
|
NotNull |
총 소요 시간 (분) |
|
|
NotNull |
환승 횟수 |
|
|
NotNull |
혼잡도 점수 |
|
|
NotNull |
혼잡도 수준 (LOW/MEDIUM/HIGH) |
|
|
NotNull |
경유 역별 혼잡도 목록 |
|
|
NotNull |
역 ID |
|
|
NotNull |
역 이름 |
|
|
NotNull |
노선 이름 |
|
|
NotNull |
노선 색상 |
|
|
NotNull |
도착 시간 (HH:mm) |
|
|
NotNull |
출발 시간 (HH:mm) |
|
|
NotNull |
승차 인원 |
|
|
NotNull |
하차 인원 |
|
|
NotNull |
총 승객 수 |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 756
{
"departureStationId" : "228",
"arrivalStationId" : "150",
"departureStationName" : "강남",
"arrivalStationName" : "홍대입구",
"travelDate" : "2026-03-21",
"dayType" : "평일",
"recommendations" : [ {
"departureTime" : "09:00",
"arrivalTime" : "09:45",
"totalTime" : 45,
"transferCount" : 1,
"congestionScore" : 2500,
"congestionLevel" : "LOW",
"stationCongestions" : [ {
"stationId" : "228",
"stationName" : "강남",
"lineName" : "2호선",
"lineColor" : "#00A84D",
"arrivalTime" : "09:00",
"departureTime" : "09:02",
"boardingCount" : 1200,
"alightingCount" : 800,
"totalPassengers" : 5000
} ]
} ],
"message" : "추천 시간대입니다."
}
북마크 API
북마크 생성
POST /bookmarks
요청 필드
| 필드명 | 타입 | 필수여부 | 설명 |
|---|---|---|---|
|
|
필수 |
북마크 이름 |
|
|
필수 |
출발역 ID (숫자) |
|
|
필수 |
도착역 ID (숫자) |
|
|
필수 |
출발 시간 (HH:mm:ss) |
|
|
필수 |
도착 시간 (HH:mm:ss) |
요청 예시
POST /bookmarks HTTP/1.1
Content-Type: application/json
Content-Length: 156
Host: localhost:8080
{
"name" : "강남 → 홍대입구",
"departureStationId" : "228",
"arrivalStationId" : "150",
"startTime" : "09:00:00",
"endTime" : "10:00:00"
}
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
북마크 ID |
|
|
NotNull |
북마크 이름 |
|
|
NotNull |
출발역 ID |
|
|
NotNull |
도착역 ID |
|
|
NotNull |
출발역 이름 |
|
|
NotNull |
도착역 이름 |
|
|
NotNull |
출발역 노선 이름 |
|
|
NotNull |
출발역 노선 색상 |
|
|
NotNull |
도착역 노선 이름 |
|
|
NotNull |
도착역 노선 색상 |
|
|
NotNull |
출발 시간 (HH:mm) |
|
|
NotNull |
도착 시간 (HH:mm) |
|
|
NotNull |
정렬 순서 |
|
|
NotNull |
생성 일시 |
|
|
NotNull |
수정 일시 |
응답 예시
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 478
{
"id" : 1,
"name" : "강남 → 홍대입구",
"departureStationId" : "228",
"arrivalStationId" : "150",
"departureStationName" : "강남",
"arrivalStationName" : "홍대입구",
"departureLineName" : "2호선",
"departureLineColor" : "#00A84D",
"arrivalLineName" : "2호선",
"arrivalLineColor" : "#00A84D",
"startTime" : "09:00",
"endTime" : "10:00",
"displayOrder" : 1,
"createdAt" : "2026-03-21T09:00:00",
"updatedAt" : "2026-03-21T09:00:00"
}
북마크 수정
PATCH /bookmarks/{id}
경로 파라미터
| 파라미터 | 필수여부 | 설명 |
|---|---|---|
|
필수 |
수정할 북마크 ID |
요청 필드
| 필드명 | 타입 | 필수여부 | 설명 |
|---|---|---|---|
|
|
선택 |
변경할 북마크 이름 |
|
|
선택 |
변경할 출발역 ID |
|
|
선택 |
변경할 도착역 ID |
|
|
선택 |
변경할 출발 시간 |
|
|
선택 |
변경할 도착 시간 |
요청 예시
PATCH /bookmarks/1 HTTP/1.1
Content-Type: application/json
Content-Length: 150
Host: localhost:8080
{
"name" : "강남 → 신촌",
"departureStationId" : "228",
"arrivalStationId" : "240",
"startTime" : "09:00:00",
"endTime" : "10:00:00"
}
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
북마크 ID |
|
|
NotNull |
북마크 이름 |
|
|
NotNull |
출발역 ID |
|
|
NotNull |
도착역 ID |
|
|
NotNull |
출발역 이름 |
|
|
NotNull |
도착역 이름 |
|
|
NotNull |
출발역 노선 이름 |
|
|
NotNull |
출발역 노선 색상 |
|
|
NotNull |
도착역 노선 이름 |
|
|
NotNull |
도착역 노선 색상 |
|
|
NotNull |
출발 시간 (HH:mm) |
|
|
NotNull |
도착 시간 (HH:mm) |
|
|
NotNull |
정렬 순서 |
|
|
NotNull |
생성 일시 |
|
|
NotNull |
수정 일시 |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 466
{
"id" : 1,
"name" : "강남 → 신촌",
"departureStationId" : "228",
"arrivalStationId" : "240",
"departureStationName" : "강남",
"arrivalStationName" : "신촌",
"departureLineName" : "2호선",
"departureLineColor" : "#00A84D",
"arrivalLineName" : "2호선",
"arrivalLineColor" : "#00A84D",
"startTime" : "09:00",
"endTime" : "10:00",
"displayOrder" : 1,
"createdAt" : "2026-03-21T09:00:00",
"updatedAt" : "2026-03-21T10:00:00"
}
북마크 순서 변경
PUT /bookmarks/reorder
요청 필드
| 필드명 | 타입 | 필수여부 | 설명 |
|---|---|---|---|
|
|
필수 |
순서 변경 항목 목록 |
|
|
필수 |
북마크 ID |
|
|
필수 |
변경할 순서 (0부터 시작) |
요청 예시
PUT /bookmarks/reorder HTTP/1.1
Content-Type: application/json
Content-Length: 128
Host: localhost:8080
{
"items" : [ {
"bookmarkId" : 1,
"newDisplayOrder" : 0
}, {
"bookmarkId" : 2,
"newDisplayOrder" : 1
} ]
}
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 34
"Bookmarks reordered successfully"
북마크 목록 조회
GET /bookmarks
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
북마크 ID |
|
|
NotNull |
북마크 이름 |
|
|
NotNull |
출발역 ID |
|
|
NotNull |
도착역 ID |
|
|
NotNull |
출발역 이름 |
|
|
NotNull |
도착역 이름 |
|
|
NotNull |
출발역 노선 이름 |
|
|
NotNull |
출발역 노선 색상 |
|
|
NotNull |
도착역 노선 이름 |
|
|
NotNull |
도착역 노선 색상 |
|
|
NotNull |
출발 시간 (HH:mm) |
|
|
NotNull |
도착 시간 (HH:mm) |
|
|
NotNull |
정렬 순서 |
|
|
NotNull |
생성 일시 |
|
|
NotNull |
수정 일시 |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 482
[ {
"id" : 1,
"name" : "강남 → 홍대입구",
"departureStationId" : "228",
"arrivalStationId" : "150",
"departureStationName" : "강남",
"arrivalStationName" : "홍대입구",
"departureLineName" : "2호선",
"departureLineColor" : "#00A84D",
"arrivalLineName" : "2호선",
"arrivalLineColor" : "#00A84D",
"startTime" : "09:00",
"endTime" : "10:00",
"displayOrder" : 1,
"createdAt" : "2026-03-21T09:00:00",
"updatedAt" : "2026-03-21T09:00:00"
} ]
북마크 단건 조회
GET /bookmarks/{id}
경로 파라미터
| 파라미터 | 필수여부 | 설명 |
|---|---|---|
|
필수 |
조회할 북마크 ID |
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
북마크 ID |
|
|
NotNull |
북마크 이름 |
|
|
NotNull |
출발역 ID |
|
|
NotNull |
도착역 ID |
|
|
NotNull |
출발역 이름 |
|
|
NotNull |
도착역 이름 |
|
|
NotNull |
출발역 노선 이름 |
|
|
NotNull |
출발역 노선 색상 |
|
|
NotNull |
도착역 노선 이름 |
|
|
NotNull |
도착역 노선 색상 |
|
|
NotNull |
출발 시간 (HH:mm) |
|
|
NotNull |
도착 시간 (HH:mm) |
|
|
NotNull |
정렬 순서 |
|
|
NotNull |
생성 일시 |
|
|
NotNull |
수정 일시 |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 478
{
"id" : 1,
"name" : "강남 → 홍대입구",
"departureStationId" : "228",
"arrivalStationId" : "150",
"departureStationName" : "강남",
"arrivalStationName" : "홍대입구",
"departureLineName" : "2호선",
"departureLineColor" : "#00A84D",
"arrivalLineName" : "2호선",
"arrivalLineColor" : "#00A84D",
"startTime" : "09:00",
"endTime" : "10:00",
"displayOrder" : 1,
"createdAt" : "2026-03-21T09:00:00",
"updatedAt" : "2026-03-21T09:00:00"
}
인증 API
소셜 로그인
POST /auth/login
요청 필드
| 필드명 | 타입 | 필수여부 | 설명 |
|---|---|---|---|
|
|
필수 |
소셜 로그인 제공자 (KAKAO, GOOGLE) |
|
|
선택 |
사용자 닉네임 |
|
|
필수 |
소셜 인가 코드 |
|
|
선택 |
리다이렉트 URI |
요청 예시
POST /auth/login HTTP/1.1
Content-Type: application/json
Content-Length: 153
Host: localhost:8080
{
"providerType" : "KAKAO",
"nickname" : "홍길동",
"authorizationCode" : "auth-code-example",
"redirectUri" : "https://example.com/callback"
}
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
액세스 토큰 |
|
|
NotNull |
리프레시 토큰 |
|
|
NotNull |
토큰 타입 (Bearer) |
|
|
NotNull |
액세스 토큰 만료 시간 (초) |
|
|
NotNull |
사용자 ID |
|
|
NotNull |
사용자 닉네임 |
|
|
NotNull |
사용자 권한 |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 218
{
"accessToken" : "access-token-example",
"refreshToken" : "refresh-token-example",
"tokenType" : "Bearer",
"expiresIn" : 3600,
"user" : {
"id" : 1,
"nickname" : "홍길동",
"role" : "USER"
}
}
토큰 갱신
POST /auth/refresh
요청 필드
| 필드명 | 타입 | 필수여부 | 설명 |
|---|---|---|---|
|
|
필수 |
갱신에 사용할 리프레시 토큰 |
요청 예시
POST /auth/refresh HTTP/1.1
Content-Type: application/json
Content-Length: 46
Host: localhost:8080
{
"refreshToken" : "refresh-token-example"
}
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
새로 발급된 액세스 토큰 |
|
|
NotNull |
새로 발급된 리프레시 토큰 |
|
|
NotNull |
토큰 타입 (Bearer) |
|
|
NotNull |
액세스 토큰 만료 시간 (초) |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 144
{
"accessToken" : "new-access-token-example",
"refreshToken" : "new-refresh-token-example",
"tokenType" : "Bearer",
"expiresIn" : 3600
}
사용자 API
현재 사용자 정보 조회
GET /user/me
요청 예시
GET /user/me HTTP/1.1
Host: localhost:8080
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
사용자 ID |
|
|
NotNull |
사용자 닉네임 |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42
{
"id" : 1,
"nickname" : "홍길동"
}
관리자 데이터 로드 API
지하철 마스터 데이터 로드
POST /admin/data-load/subway/master
요청 예시
POST /admin/data-load/subway/master HTTP/1.1
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
처리 성공 여부 |
|
|
NotNull |
데이터 카테고리 |
|
|
NotNull |
처리된 데이터 수 |
|
|
NotNull |
처리 결과 메시지 |
|
|
NotNull |
처리 완료 일시 |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 156
{
"success" : true,
"dataCategory" : "subwayMaster",
"totalCount" : 300,
"message" : "300 Loading completed",
"loadedAt" : "2026-03-21T09:00:00"
}
지하철 통계 데이터 로드
POST /admin/data-load/subway/statistics
요청 파라미터
| 파라미터 | 필수여부 | 설명 |
|---|---|---|
|
필수 |
조회 연월 (yyyyMM 형식, 6자리) |
요청 예시
POST /admin/data-load/subway/statistics?yearMonth=202603 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: localhost:8080
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
처리 성공 여부 |
|
|
NotNull |
데이터 카테고리 |
|
|
NotNull |
처리된 데이터 수 |
|
|
NotNull |
처리 결과 메시지 |
|
|
NotNull |
처리 완료 일시 |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 162
{
"success" : true,
"dataCategory" : "subwayStatistics",
"totalCount" : 1500,
"message" : "1500 Loading completed",
"loadedAt" : "2026-03-21T09:00:00"
}
전체 데이터 로드
POST /admin/data-load/all
요청 파라미터
| 파라미터 | 필수여부 | 설명 |
|---|---|---|
|
필수 |
조회 연월 (yyyyMM 형식, 6자리) |
요청 예시
POST /admin/data-load/all?yearMonth=202603 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: localhost:8080
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
마스터 데이터 처리 성공 여부 |
|
|
NotNull |
마스터 데이터 카테고리 |
|
|
NotNull |
마스터 데이터 처리 수 |
|
|
NotNull |
마스터 데이터 처리 메시지 |
|
|
NotNull |
마스터 데이터 처리 완료 일시 |
|
|
NotNull |
통계 데이터 처리 성공 여부 |
|
|
NotNull |
통계 데이터 카테고리 |
|
|
NotNull |
통계 데이터 처리 수 |
|
|
NotNull |
통계 데이터 처리 메시지 |
|
|
NotNull |
통계 데이터 처리 완료 일시 |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 390
{
"subwayMaster" : {
"success" : true,
"dataCategory" : "subwayMaster",
"totalCount" : 300,
"message" : "300 Loading completed",
"loadedAt" : "2026-03-21T09:00:00"
},
"subwayStatistics" : {
"success" : true,
"dataCategory" : "subwayStatistics",
"totalCount" : 1500,
"message" : "1500 Loading completed",
"loadedAt" : "2026-03-21T09:00:00"
}
}
지하철 통계 데이터 삭제
DELETE /admin/data-load/subway/statistics
요청 파라미터
| 파라미터 | 필수여부 | 설명 |
|---|---|---|
|
필수 |
삭제할 연월 (yyyyMM 형식, 6자리) |
요청 예시
DELETE /admin/data-load/subway/statistics?yearMonth=202603 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: localhost:8080
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
처리 성공 여부 |
|
|
NotNull |
데이터 카테고리 |
|
|
NotNull |
삭제된 데이터 수 |
|
|
NotNull |
처리 결과 메시지 |
|
|
NotNull |
처리 완료 일시 |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 162
{
"success" : true,
"dataCategory" : "subwayStatistics",
"totalCount" : 1500,
"message" : "1500 Loading completed",
"loadedAt" : "2026-03-21T09:00:00"
}
전체 열차 스케줄 로드
POST /admin/data-load/train-schedule/all
요청 예시
POST /admin/data-load/train-schedule/all HTTP/1.1
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
평일 스케줄 처리 성공 여부 |
|
|
NotNull |
평일 스케줄 카테고리 |
|
|
NotNull |
평일 스케줄 처리 수 |
|
|
NotNull |
평일 스케줄 처리 메시지 |
|
|
NotNull |
평일 스케줄 처리 완료 일시 |
|
|
NotNull |
주말 스케줄 처리 성공 여부 |
|
|
NotNull |
주말 스케줄 카테고리 |
|
|
NotNull |
주말 스케줄 처리 수 |
|
|
NotNull |
주말 스케줄 처리 메시지 |
|
|
NotNull |
주말 스케줄 처리 완료 일시 |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 370
{
"평일" : {
"success" : true,
"dataCategory" : "trainSchedule",
"totalCount" : 500,
"message" : "500 Loading completed",
"loadedAt" : "2026-03-21T09:00:00"
},
"주말" : {
"success" : true,
"dataCategory" : "trainSchedule",
"totalCount" : 500,
"message" : "500 Loading completed",
"loadedAt" : "2026-03-21T09:00:00"
}
}
전체 열차 스케줄 삭제
DELETE /admin/data-load/train-schedule/all
요청 예시
DELETE /admin/data-load/train-schedule/all HTTP/1.1
Host: localhost:8080
응답 필드
| 필드명 | 타입 | Null 여부 | 설명 |
|---|---|---|---|
|
|
NotNull |
처리 성공 여부 |
|
|
NotNull |
데이터 카테고리 |
|
|
NotNull |
삭제된 데이터 수 |
|
|
NotNull |
처리 결과 메시지 |
|
|
NotNull |
처리 완료 일시 |
응답 예시
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 159
{
"success" : true,
"dataCategory" : "trainSchedule",
"totalCount" : 1000,
"message" : "1000 Loading completed",
"loadedAt" : "2026-03-21T09:00:00"
}