ERP-node/docs/backend-api-route-mapping.md

25 KiB

WACE ERP Backend - API 라우트 완전 매핑

작성일: 2026-02-06
목적: 프론트엔드 개발자용 API 엔드포인트 전체 목록


📌 공통 규칙

Base URL

개발: http://localhost:8080
운영: http://39.117.244.52:8080

헤더

Content-Type: application/json
Authorization: Bearer {JWT_TOKEN}

응답 형식

{
  "success": true,
  "message": "성공 메시지",
  "data": { ... }
}

// 에러 시
{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "details": "에러 상세"
  }
}

1. 인증 API (/api/auth)

메서드 경로 권한 기능 Request Body Response
POST /auth/login 공개 로그인 { userId, password } { token, userInfo, firstMenuPath }
POST /auth/logout 인증 로그아웃 - { success: true }
GET /auth/me 인증 현재 사용자 정보 - { userInfo }
GET /auth/status 공개 인증 상태 확인 - { isLoggedIn, isAdmin }
POST /auth/refresh 인증 토큰 갱신 - { token }
POST /auth/signup 공개 회원가입 (공차중계) { userId, password, userName, phoneNumber, licenseNumber, vehicleNumber } { success: true }
POST /auth/switch-company 슈퍼관리자 회사 전환 { companyCode } { token, companyCode }

2. 관리자 API (/api/admin)

2.1 사용자 관리

메서드 경로 권한 기능 Query Params Response
GET /admin/users 관리자 사용자 목록 page, limit, search { users[], total }
POST /admin/users 관리자 사용자 생성 - { user }
PUT /admin/users/:userId 관리자 사용자 수정 - { user }
DELETE /admin/users/:userId 관리자 사용자 삭제 - { success: true }
GET /admin/users/:userId/history 관리자 사용자 이력 - { history[] }

2.2 메뉴 관리

메서드 경로 권한 기능 Query Params Response
GET /admin/menus 인증 메뉴 목록 (트리) userId, userLang { menus[] }
POST /admin/menus 관리자 메뉴 생성 - { menu }
PUT /admin/menus/:menuId 관리자 메뉴 수정 - { menu }
DELETE /admin/menus/:menuId 관리자 메뉴 삭제 - { success: true }

2.3 표준 관리

메서드 경로 권한 기능 Response
GET /admin/web-types 인증 웹타입 표준 목록 { webTypes[] }
GET /admin/button-actions 인증 버튼 액션 표준 { buttonActions[] }
GET /admin/component-standards 인증 컴포넌트 표준 { components[] }
GET /admin/template-standards 인증 템플릿 표준 { templates[] }
GET /admin/reports 인증 리포트 목록 { reports[] }

3. 테이블 관리 API (/api/table-management)

3.1 테이블 메타데이터

메서드 경로 권한 기능 Response
GET /table-management/tables 인증 테이블 목록 { tables[] }
GET /table-management/tables/:table/columns 인증 컬럼 목록 { columns[] }
GET /table-management/tables/:table/schema 인증 테이블 스키마 { schema }
GET /table-management/tables/:table/exists 인증 테이블 존재 여부 { exists: boolean }
GET /table-management/tables/:table/web-types 인증 웹타입 정보 { webTypes }

3.2 컬럼 설정

메서드 경로 권한 기능 Request Body
POST /table-management/tables/:table/columns/:column/settings 인증 컬럼 설정 업데이트 { web_type, input_type, ... }
POST /table-management/tables/:table/columns/settings 인증 전체 컬럼 일괄 업데이트 { columns[] }
PUT /table-management/tables/:table/label 인증 테이블 라벨 설정 { label }

3.3 데이터 CRUD

메서드 경로 권한 기능 Request Body Response
POST /table-management/tables/:table/data 인증 데이터 조회 (페이징) { page, limit, filters, sort } { data[], total }
POST /table-management/tables/:table/record 인증 단일 레코드 조회 { conditions } { record }
POST /table-management/tables/:table/add 인증 데이터 추가 { data } { success: true, id }
PUT /table-management/tables/:table/edit 인증 데이터 수정 { conditions, data } { success: true }
DELETE /table-management/tables/:table/delete 인증 데이터 삭제 { conditions } { success: true }

3.4 다중 테이블 저장

메서드 경로 권한 기능 Request Body
POST /table-management/multi-table-save 인증 메인+서브 테이블 저장 { mainTable, mainData, subTables: [{ table, data[] }] }

3.5 로그 시스템

메서드 경로 권한 기능 Request Body
POST /table-management/tables/:table/log 관리자 로그 테이블 생성 -
GET /table-management/tables/:table/log/config 인증 로그 설정 조회 -
GET /table-management/tables/:table/log 인증 로그 데이터 조회 -
POST /table-management/tables/:table/log/toggle 관리자 로그 활성화/비활성화 { is_active }

3.6 엔티티 관계

메서드 경로 권한 기능 Query Params
GET /table-management/tables/entity-relations 인증 두 테이블 간 관계 조회 leftTable, rightTable
GET /table-management/columns/:table/referenced-by 인증 현재 테이블 참조 목록 -

3.7 카테고리 관리

메서드 경로 권한 기능 Response
GET /table-management/category-columns 인증 회사별 카테고리 컬럼 { categoryColumns[] }
GET /table-management/menu/:menuObjid/category-columns 인증 메뉴별 카테고리 컬럼 { categoryColumns[] }

4. 화면 관리 API (/api/screen-management)

메서드 경로 권한 기능 Query Params Response
GET /screen-management/screens 인증 화면 목록 page, limit { screens[], total }
GET /screen-management/screens/:id 인증 화면 상세 - { screen }
POST /screen-management/screens 관리자 화면 생성 - { screen }
PUT /screen-management/screens/:id 관리자 화면 수정 - { screen }
DELETE /screen-management/screens/:id 관리자 화면 삭제 - { success: true }

화면 그룹

메서드 경로 권한 기능 Response
GET /screen-groups 인증 화면 그룹 목록 { screenGroups[] }
POST /screen-groups 관리자 그룹 생성 { group }

화면 파일

메서드 경로 권한 기능 Response
GET /screen-files 인증 화면 파일 목록 { files[] }
POST /screen-files 관리자 파일 업로드 { file }

5. 플로우 API (/api/flow)

5.1 플로우 정의

메서드 경로 권한 기능 Request Body Response
GET /flow/definitions 인증 플로우 목록 - { flows[] }
GET /flow/definitions/:id 인증 플로우 상세 - { flow }
POST /flow/definitions 인증 플로우 생성 { name, description, targetTable } { flow }
PUT /flow/definitions/:id 인증 플로우 수정 { name, description } { flow }
DELETE /flow/definitions/:id 인증 플로우 삭제 - { success: true }

5.2 단계 관리

메서드 경로 권한 기능 Request Body Response
GET /flow/definitions/:flowId/steps 인증 단계 목록 - { steps[] }
POST /flow/definitions/:flowId/steps 인증 단계 생성 { name, type, settings } { step }
PUT /flow/steps/:stepId 인증 단계 수정 { name, settings } { step }
DELETE /flow/steps/:stepId 인증 단계 삭제 - { success: true }

5.3 연결 관리

메서드 경로 권한 기능 Request Body Response
GET /flow/connections/:flowId 인증 연결 목록 - { connections[] }
POST /flow/connections 인증 연결 생성 { fromStepId, toStepId, condition } { connection }
DELETE /flow/connections/:connectionId 인증 연결 삭제 - { success: true }

5.4 데이터 이동

메서드 경로 권한 기능 Request Body Response
POST /flow/move 인증 데이터 이동 (단건) { flowId, fromStepId, toStepId, recordId } { success: true }
POST /flow/move-batch 인증 데이터 이동 (다건) { flowId, fromStepId, toStepId, recordIds[] } { success: true, movedCount }

5.5 단계 데이터 조회

메서드 경로 권한 기능 Query Params Response
GET /flow/:flowId/step/:stepId/count 인증 단계 데이터 개수 - { count }
GET /flow/:flowId/step/:stepId/list 인증 단계 데이터 목록 page, limit { data[], total }
GET /flow/:flowId/step/:stepId/column-labels 인증 컬럼 라벨 조회 - { labels }
GET /flow/:flowId/steps/counts 인증 모든 단계 카운트 - { counts[] }

5.6 단계 데이터 수정

메서드 경로 권한 기능 Request Body Response
PUT /flow/:flowId/step/:stepId/data/:recordId 인증 인라인 편집 { data } { success: true }

5.7 오딧 로그

메서드 경로 권한 기능 Response
GET /flow/audit/:flowId/:recordId 인증 레코드별 오딧 로그 { auditLogs[] }
GET /flow/audit/:flowId 인증 플로우 전체 오딧 로그 { auditLogs[] }

6. 데이터플로우 API (/api/dataflow)

6.1 관계 관리

메서드 경로 권한 기능 Request Body Response
GET /dataflow/relationships 인증 관계 목록 - { relationships[] }
POST /dataflow/relationships 인증 관계 생성 { fromTable, toTable, fromColumn, toColumn, type } { relationship }
PUT /dataflow/relationships/:id 인증 관계 수정 { name, type } { relationship }
DELETE /dataflow/relationships/:id 인증 관계 삭제 - { success: true }

6.2 다이어그램

메서드 경로 권한 기능 Request Body Response
GET /dataflow-diagrams 인증 다이어그램 목록 - { diagrams[] }
GET /dataflow-diagrams/:id 인증 다이어그램 상세 - { diagram }
POST /dataflow-diagrams 인증 다이어그램 생성 { name, description } { diagram }

6.3 실행

메서드 경로 권한 기능 Request Body Response
POST /dataflow 인증 데이터플로우 실행 { relationshipId, params } { result[] }

7. 외부 연동 API

7.1 외부 DB 연결 (/api/external-db-connections)

메서드 경로 권한 기능 Request Body Response
GET /external-db-connections 인증 연결 목록 - { connections[] }
GET /external-db-connections/:id 인증 연결 상세 - { connection }
POST /external-db-connections 관리자 연결 생성 { connectionName, dbType, host, port, database, username, password } { connection }
PUT /external-db-connections/:id 관리자 연결 수정 { connectionName, ... } { connection }
DELETE /external-db-connections/:id 관리자 연결 삭제 - { success: true }
POST /external-db-connections/:id/test 인증 연결 테스트 - { success: boolean, message }
GET /external-db-connections/:id/tables 인증 테이블 목록 조회 - { tables[] }
GET /external-db-connections/:id/tables/:table/columns 인증 컬럼 목록 조회 - { columns[] }

7.2 외부 REST API (/api/external-rest-api-connections)

메서드 경로 권한 기능 Request Body Response
GET /external-rest-api-connections 인증 API 연결 목록 - { connections[] }
POST /external-rest-api-connections 관리자 API 연결 생성 { name, baseUrl, authType, ... } { connection }
POST /external-rest-api-connections/:id/test 인증 API 테스트 { endpoint, method } { response }

7.3 멀티 커넥션 (/api/multi-connection)

메서드 경로 권한 기능 Request Body Response
POST /multi-connection/query 인증 멀티 DB 쿼리 { connections: [{ connectionId, sql }] } { results[] }

8. 배치 API

8.1 배치 설정 (/api/batch-configs)

메서드 경로 권한 기능 Request Body Response
GET /batch-configs 인증 배치 설정 목록 - { batchConfigs[] }
GET /batch-configs/:id 인증 배치 설정 상세 - { batchConfig }
POST /batch-configs 관리자 배치 설정 생성 { batchName, cronSchedule, sourceConnection, targetTable, mappings } { batchConfig }
PUT /batch-configs/:id 관리자 배치 설정 수정 { batchName, ... } { batchConfig }
DELETE /batch-configs/:id 관리자 배치 설정 삭제 - { success: true }
GET /batch-configs/connections 관리자 사용 가능한 커넥션 목록 - { connections[] }
GET /batch-configs/connections/:type/tables 관리자 테이블 목록 조회 - { tables[] }

8.2 배치 실행 (/api/batch-management)

메서드 경로 권한 기능 Request Body Response
POST /batch-management/:id/execute 관리자 배치 즉시 실행 - { success: true, executionLogId }

8.3 실행 이력 (/api/batch-execution-logs)

메서드 경로 권한 기능 Query Params Response
GET /batch-execution-logs 인증 실행 이력 목록 batchConfigId, page, limit { logs[], total }
GET /batch-execution-logs/:id 인증 실행 이력 상세 - { log }

9. 메일 API (/api/mail)

9.1 계정 관리

메서드 경로 권한 기능 Request Body Response
GET /mail/accounts 인증 계정 목록 - { accounts[] }
POST /mail/accounts 관리자 계정 추가 { email, smtpHost, smtpPort, password } { account }

9.2 템플릿

메서드 경로 권한 기능 Request Body Response
GET /mail/templates-file 인증 템플릿 목록 - { templates[] }
POST /mail/templates-file 관리자 템플릿 생성 { name, subject, body } { template }

9.3 발송/수신

메서드 경로 권한 기능 Request Body Response
POST /mail/send 인증 메일 발송 { accountId, to, subject, body, attachments[] } { success: true, messageId }
GET /mail/sent 인증 발송 이력 page, limit { mails[], total }
POST /mail/receive 인증 메일 수신 { accountId } { mails[] }

10. 파일 API (/api/files)

메서드 경로 권한 기능 Request Body Response
POST /files/upload 인증 파일 업로드 (multipart) FormData { file } { fileId, fileName, filePath, fileSize }
GET /files 인증 파일 목록 page, limit { files[], total }
GET /files/:id 인증 파일 정보 조회 - { file }
GET /files/download/:id 인증 파일 다운로드 - (파일 스트림)
DELETE /files/:id 인증 파일 삭제 - { success: true }
GET /uploads/:filename 공개 정적 파일 서빙 - (파일 스트림)

11. 대시보드 API (/api/dashboards)

메서드 경로 권한 기능 Query Params Response
GET /dashboards 인증 대시보드 목록 - { dashboards[] }
GET /dashboards/:id 인증 대시보드 상세 - { dashboard }
POST /dashboards 관리자 대시보드 생성 - { dashboard }
GET /dashboards/:id/widgets 인증 위젯 데이터 조회 - { widgets[] }

12. 공통코드 API (/api/common-codes)

메서드 경로 권한 기능 Query Params Response
GET /common-codes 인증 공통코드 목록 codeGroup { codes[] }
GET /common-codes/:codeGroup/:code 인증 공통코드 상세 - { code }
POST /common-codes 관리자 공통코드 생성 { codeGroup, code, name } { code }

13. 다국어 API (/api/multilang)

메서드 경로 권한 기능 Query Params Response
GET /multilang 인증 다국어 키 목록 lang { translations{} }
GET /multilang/:key 인증 특정 키 조회 lang { key, value }
POST /multilang 관리자 다국어 추가 { key, ko, en, cn } { translation }

14. 회사 관리 API (/api/company-management)

메서드 경로 권한 기능 Request Body Response
GET /company-management 슈퍼관리자 회사 목록 - { companies[] }
POST /company-management 슈퍼관리자 회사 생성 { companyCode, companyName } { company }
PUT /company-management/:code 슈퍼관리자 회사 수정 { companyName } { company }
DELETE /company-management/:code 슈퍼관리자 회사 삭제 - { success: true }

15. 부서 API (/api/departments)

메서드 경로 권한 기능 Request Body Response
GET /departments 인증 부서 목록 (트리) - { departments[] }
POST /departments 관리자 부서 생성 { deptCode, deptName, parentDeptCode } { department }

16. 권한 그룹 API (/api/roles)

메서드 경로 권한 기능 Request Body Response
GET /roles 인증 권한 그룹 목록 - { roles[] }
POST /roles 관리자 권한 그룹 생성 { roleName, permissions[] } { role }

17. DDL 실행 API (/api/ddl)

메서드 경로 권한 기능 Request Body Response
POST /ddl 슈퍼관리자 DDL 실행 { sql } { success: true, result }

18. 외부 API 프록시 (/api/open-api)

메서드 경로 권한 기능 Query Params Response
GET /open-api/weather 인증 날씨 정보 조회 location { weather }
GET /open-api/exchange 인증 환율 정보 조회 fromCurrency, toCurrency { rate }

19. 디지털 트윈 API (/api/digital-twin)

메서드 경로 권한 기능 Request Body Response
GET /digital-twin/layouts 인증 레이아웃 목록 - { layouts[] }
GET /digital-twin/templates 인증 템플릿 목록 - { templates[] }
GET /digital-twin/data 인증 실시간 데이터 - { data[] }

20. 3D 필드 API (/api/yard-layouts)

메서드 경로 권한 기능 Request Body Response
GET /yard-layouts 인증 필드 레이아웃 목록 - { yardLayouts[] }
POST /yard-layouts 인증 레이아웃 저장 { layout } { success: true }

21. 스케줄 API (/api/schedule)

메서드 경로 권한 기능 Request Body Response
POST /schedule 인증 스케줄 자동 생성 { params } { schedule }

22. 채번 규칙 API (/api/numbering-rules)

메서드 경로 권한 기능 Request Body Response
GET /numbering-rules 인증 채번 규칙 목록 - { rules[] }
POST /numbering-rules 관리자 규칙 생성 { ruleName, prefix, format } { rule }
POST /numbering-rules/:id/generate 인증 번호 생성 - { number }

메서드 경로 권한 기능 Request Body Response
POST /entity-search 인증 엔티티 검색 { table, filters, page, limit } { results[], total }
GET /entity/:table/options 인증 V2Select용 옵션 search, limit { options[] }

24. To-Do API (/api/todos)

메서드 경로 권한 기능 Request Body Response
GET /todos 인증 To-Do 목록 status, assignee { todos[] }
POST /todos 인증 To-Do 생성 { title, description, dueDate } { todo }
PUT /todos/:id 인증 To-Do 수정 { status } { todo }

25. 예약 요청 API (/api/bookings)

메서드 경로 권한 기능 Request Body Response
GET /bookings 인증 예약 목록 - { bookings[] }
POST /bookings 인증 예약 생성 { resourceId, startTime, endTime } { booking }

26. 리스크/알림 API (/api/risk-alerts)

메서드 경로 권한 기능 Query Params Response
GET /risk-alerts 인증 리스크/알림 목록 priority, status { alerts[] }
POST /risk-alerts 인증 알림 생성 { title, content, priority } { alert }

27. 헬스 체크

메서드 경로 권한 기능 Response
GET /health 공개 서버 상태 확인 { status: "OK", timestamp, uptime, environment }

🔐 에러 코드 목록

코드 HTTP Status 설명
TOKEN_MISSING 401 인증 토큰 누락
TOKEN_EXPIRED 401 토큰 만료
INVALID_TOKEN 401 유효하지 않은 토큰
AUTHENTICATION_REQUIRED 401 인증 필요
INSUFFICIENT_PERMISSION 403 권한 부족
SUPER_ADMIN_REQUIRED 403 슈퍼관리자 권한 필요
COMPANY_ACCESS_DENIED 403 회사 데이터 접근 거부
INVALID_INPUT 400 잘못된 입력
RESOURCE_NOT_FOUND 404 리소스 없음
DUPLICATE_ENTRY 400 중복 데이터
FOREIGN_KEY_VIOLATION 400 참조 무결성 위반
SERVER_ERROR 500 서버 오류

문서 버전: 1.0
마지막 업데이트: 2026-02-06
총 API 개수: 200+개