- `docs/` 를 .gitignore 에서 빼 git 추적 대상으로 전환 (위키·완료 이력·검증 기록) - `docs/raw/PLAN.md` · `docs/raw/OWNERS.md` 를 저장소 최상위로 이동 후 .gitignore 에 등록 — 창끼리 공유하되 저장소에는 안 올리는 장부 - 살아 있는 경로 참조 7개 파일 정정 (아카이브 107건은 그때 사실이라 그대로 둠) - graphify 날짜별 산출물(`docs/wiki/graphify-out/20*/`) 제외 — `graphify update` 가 다시 만듦 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
44 lines
3.2 KiB
Markdown
44 lines
3.2 KiB
Markdown
---
|
|
type: page-api
|
|
status: stable
|
|
page_id: B05_Profile
|
|
related_pages: ["[[B05_Profile/B05_frontend]]", "[[B05_Profile/B05_backend]]", "[[B05_Profile/B05_db]]", "[[architecture/project_map]]", "[[architecture/workflow_data_flow]]"]
|
|
last_updated: 2026-08-23
|
|
source: ["docs/raw/verification/2026-07-24_verify_b05_reorganization.md", "docs/raw/verification/2026-07-28_verify_B04_B05_Drainage_Watershed.md", "docs/raw/verification/2026-07-31_verify_B05_drainage_watershed_pipe_edit.md", "docs/raw/verification/2026-08-01_verify_B04_detailed_basins.md", "docs/raw/verification/2026-08-02_verify_B04_B05_drainage_unification.md", "docs/raw/verification/2026-08-23_verify_B05_3D_예상형상_코리도_서피스_교차검증.md"]
|
|
---
|
|
|
|
# B05_Profile — API
|
|
|
|
이 API는 [[B05_Profile/B05_frontend]]의 경로·종단 편집을 [[B05_Profile/B05_backend]]에 연결하고 [[workflow_state]] stage 2를 변경한다.
|
|
|
|
기본 prefix: `/api/v1/projects` (`B05_Profile_Router.py:40`). 배수유역 설계 및 관 편집 API는 B04의 공용 API를 호출하므로 B05 전용 배수 API 엔드포인트는 **전량 404 폐기**되었습니다.
|
|
|
|
## 엔드포인트
|
|
|
|
| 엔드포인트 / 항목 | 세분화 위키 명세 | 역할 |
|
|
|---|---|---|
|
|
| `POST /{project_id}/route/solve` | `[[B05_Profile/backend/B05_Profile_Router]]` | 최적 경로 계산 및 DRAFT 결과 DB 저장 |
|
|
| `PUT /{project_id}/route/contour-interval` | `[[B05_Profile/backend/B05_Profile_Router]]` | 등고선 간격 변경값 영속화 |
|
|
| `PUT /{project_id}/route/profile-alignment` | `[[B05_Profile/backend/B05_Profile_Router]]` | 측점별 편집 offset 및 R 오버라이드 맵 저장 |
|
|
| `POST /{project_id}/route/confirm` | `[[B05_Profile/backend/B05_Profile_Router]]` | 최신 DRAFT 경로를 CONFIRMED 상태로 변경 (배수 및 비정규 측점 정보 일원화 병합) |
|
|
| `GET /{project_id}/route/latest` | `[[B05_Profile/backend/B05_Profile_Router]]` | 최신 경로 메타 + 정밀 3D 좌표 + 사용 파라미터 반환 |
|
|
| `GET /api/projects/structure-types` | `[[B05_Profile/B05_structures]]` | 구조물 타입 레지스트리 반환 |
|
|
| `GET /api/projects/{project_id}/route/structures` | `[[B05_Profile/B05_structures]]` | 일반 구조물 목록과 revision 조회 |
|
|
| `PUT /api/projects/{project_id}/route/structures` | `[[B05_Profile/B05_structures]]` | 전체 목록 저장, 409 충돌·검증·후속 STALE 결과 반환 |
|
|
| `GET /api/projects/{project_id}/routes/{route_id}/corridor` | `[[B05_Profile/B05_corridor_surface]]` | 저장된 코리도 JSON 조회 |
|
|
| `PUT /api/projects/{project_id}/routes/{route_id}/corridor` | `[[B05_Profile/B05_corridor_surface]]` | 코리도 JSON 원자 저장, 64MB 제한 |
|
|
|
|
## API 스키마 및 반환 필드
|
|
|
|
### `POST /{project_id}/route/confirm` 요청 (`RouteConfirmRequest`)
|
|
* `filter`: 지표 분석 필터 키
|
|
* `method`: 보간 기법
|
|
* `smooth`: 평활화 유무
|
|
* `model`: DTM 방식
|
|
* `irregular_stations`: 비정규 측점 목록 (`IrregularStationInput` 객체의 배열)
|
|
* `station_num`: 규칙 측점 번호 (integer)
|
|
* `rem_distance_m`: 잔여 거리 (float)
|
|
* `structure_name`: 구조물 명칭 (string)
|
|
|
|
오류는 표준 `{"status":"error","message":...}` 형식으로 반환한다.
|