인증 (auth)
POST /auth/login - 로그인
사용자 로그인을 처리합니다.
Request Body (application/x-www-form-urlencoded)
grant_type: string (pattern: ^password$)
username: string (required)
password: string (required)
scope: string
client_id: string | null
client_secret: string | null
Responses
- 200: 성공 - access_token 반환
- 422: 유효성 검증 오류
GET /auth/me - 사용자 정보 조회
현재 로그인한 사용자의 정보를 조회합니다.
Parameters
- access_token (cookie): string | null
Responses
-
200: 사용자 정보 반환
{ "id": "uuid", "username": "string", "disabled": false} -
422: 유효성 검증 오류
GET /auth/verification-stream/{email} - 이메일 인증 스트림
Redis 기반 SSE 엔드포인트로 이메일 인증 상태를 실시간으로 확인합니다.
Parameters
- email (path, required): string
Responses
- 200: 성공
- 422: 유효성 검증 오류
POST /auth/send-verification - 이메일 인증 코드 발송
이메일 인증 코드를 발송합니다.
Request Body (application/json)
{
"email": "user@example.com"
}Responses
- 200: 성공
{ "success": true, "message": "string"} - 422: 유효성 검증 오류
POST /auth/resend-verification - 이메일 인증 코드 재발송
이메일 인증 코드를 재발송합니다.
Request Body (application/json)
{
"email": "user@example.com"
}Responses
- 200: 성공
{ "success": true, "message": "string"} - 422: 유효성 검증 오류
POST /auth/register - 회원가입
새로운 사용자를 등록합니다.
Request Body (application/json)
{
"email": "user@example.com",
"username": "string",
"password": "stringst"
}Responses
-
201: 성공
{ "id": "string", "email": "user@example.com", "username": "string"} -
422: 유효성 검증 오류
POST /auth/logout - 로그아웃
사용자를 로그아웃 처리하고 인증 쿠키를 삭제합니다.
Responses
-
200: 성공
{ "success": true, "message": "string"}
GET /auth/verify - 이메일 인증 완료
이메일 인증 완료 후 SSE로 알림을 전송합니다.
Parameters
- token (query, required): string
Responses
- 200: 성공 (text/html)
- 422: 유효성 검증 오류
프로젝트 (project)
GET /projects - 프로젝트 목록 조회
현재 로그인한 사용자의 모든 프로젝트 목록을 조회합니다.
Parameters
- limit (query): integer (default: 12)
- offset (query): integer (default: 0)
- access_token (cookie): string | null
Responses
-
200: 성공
{ "success": true, "projects": [ { "project_name": "새 드론쇼 프로젝트", "format": "dsj", "max_drone": 10, "max_speed": 6, "max_accel": 3, "min_separation": 2, "id": "uuid", "user_id": "uuid", "created_at": "datetime", "updated_at": "datetime" } ], "total": 0} -
422: 유효성 검증 오류
POST /projects - 프로젝트 생성
새로운 드론쇼 프로젝트를 생성합니다.
Parameters
- access_token (cookie, required): string | null
Request Body (application/json)
{
"project_name": "새 드론쇼 프로젝트",
"format": "dsj",
"max_drone": 10,
"max_speed": 6,
"max_accel": 3,
"min_separation": 2
}설명
- project_name: 프로젝트의 이름
- format: 포맷 (기본값: “dsj”)
- max_scene: 최대 씬 개수
- max_drone: 최대 드론 개수
- max_speed: 드론의 최대 속도 (m/s)
- max_accel: 드론의 최대 가속도 (m/s²)
- min_separation: 드론 간 최소 안전 이격 거리 (m)
Responses
-
201: 성공
{ "success": true, "project": { "project_name": "새 드론쇼 프로젝트", "format": "dsj", "max_drone": 10, "max_speed": 6, "max_accel": 3, "min_separation": 2, "id": "uuid", "user_id": "uuid", "created_at": "datetime", "updated_at": "datetime" }} -
422: 유효성 검증 오류
GET /projects/{project_id} - 프로젝트 상세 조회
특정 프로젝트의 상세 정보를 조회합니다. 프로젝트에 포함된 씬 목록도 함께 반환됩니다.
Parameters
- project_id (path, required): string (uuid)
- access_token (cookie): string | null
Responses
-
200: 성공
{ "success": true, "project": { "project_name": "새 드론쇼 프로젝트", "format": "dsj", "max_drone": 10, "max_speed": 6, "max_accel": 3, "min_separation": 2, "id": "uuid", "user_id": "uuid", "created_at": "datetime", "updated_at": "datetime", "scenes": [] }} -
422: 유효성 검증 오류
PUT /projects/{project_id} - 프로젝트 수정
특정 프로젝트의 정보를 수정합니다. 수정하려는 필드만 요청 본문에 포함하여 전송합니다.
Parameters
- project_id (path, required): string (uuid)
- access_token (cookie): string | null
Request Body (application/json)
{
"project_name": "수정된 프로젝트 이름",
"max_drone": 15,
"max_speed": 8,
"max_accel": 4,
"min_separation": 1.5
}Responses
-
200: 성공
{ "success": true, "project": { "project_name": "새 드론쇼 프로젝트", "format": "dsj", "max_drone": 10, "max_speed": 6, "max_accel": 3, "min_separation": 2, "id": "uuid", "user_id": "uuid", "created_at": "datetime", "updated_at": "datetime" }} -
422: 유효성 검증 오류
DELETE /projects/{project_id} - 프로젝트 삭제
특정 프로젝트를 삭제합니다.
Parameters
- project_id (path, required): string (uuid)
- access_token (cookie): string | null
Responses
- 200: 성공
- 422: 유효성 검증 오류
POST /projects/{project_id}/json - 프로젝트 JSON 내보내기
프로젝트의 모든 씬을 JSON으로 변환합니다.
Parameters
- project_id (path, required): string (uuid)
- z_value (query): number (default: 0)
- scale_x (query): number (default: 1)
- scale_y (query): number (default: 1)
- scale_z (query): number (default: 1)
- offset_x (query): number (default: 0)
- offset_y (query): number (default: 0)
- offset_z (query): number (default: 0)
- led_intensity (query): number (default: 1)
- access_token (cookie): string | null
Responses
- 200: 성공 - JSON 문자열 반환
- 422: 유효성 검증 오류
씬 (scenes)
GET /projects/{project_id}/scenes - 씬 목록 조회
프로젝트의 씬 목록을 조회합니다.
Parameters
- project_id (path, required): string
- access_token (cookie): string | null
Responses
-
200: 성공
{ "success": true, "scenes": [ { "id": "string", "project_id": "string", "scene_num": 0, "s3_key": "string", "display_url": "string" } ]} -
422: 유효성 검증 오류
POST /projects/{project_id}/scenes - 빈 씬 생성
새로운 빈 씬을 생성합니다.
Parameters
- project_id (path, required): string
- access_token (cookie): string | null
Request Body (application/json)
{
"scene_num": 0
}Responses
-
200: 성공
{ "success": true, "scene": { "id": "string", "project_id": "string", "scene_num": 0, "s3_key": "string", "display_url": "string" }} -
422: 유효성 검증 오류
GET /projects/{project_id}/scenes/{scene_id} - 씬 정보 조회
특정 씬의 정보를 조회합니다.
Parameters
- project_id (path, required): string
- scene_id (path, required): string
- access_token (cookie): string | null
Responses
-
200: 성공
{ "success": true, "scene": { "id": "string", "project_id": "string", "scene_num": 0, "s3_key": "string", "display_url": "string" }} -
422: 유효성 검증 오류
PATCH /projects/{project_id}/scenes/{scene_id} - 씬 상태 변경
씬 상태를 변경합니다 (초기화 등).
Parameters
- project_id (path, required): string
- scene_id (path, required): string
- access_token (cookie): string | null
Request Body (application/json)
{
"status": "string"
}Responses
-
200: 성공
{ "success": true, "scene": { "id": "string", "project_id": "string", "scene_num": 0, "s3_key": "string", "display_url": "string" }} -
422: 유효성 검증 오류
DELETE /projects/{project_id}/scenes/{scene_id} - 씬 삭제
특정 씬을 삭제합니다.
Parameters
- project_id (path, required): string
- scene_id (path, required): string
- access_token (cookie): string | null
Responses
- 200: 성공
- 422: 유효성 검증 오류
PUT /projects/{project_id}/scenes/{scene_id}/originals - 원본 캔버스 저장
원본 캔버스 데이터를 저장합니다.
Parameters
- project_id (path, required): string (uuid)
- scene_id (path, required): string (uuid)
- access_token (cookie): string | null
Request Body (application/json)
{
"additionalProp1": {}
}Responses
- 200: 성공 - 문자열 반환
- 422: 유효성 검증 오류
POST /projects/{project_id}/scenes/{scene_id}/processed - 캔버스를 도트로 변환
원본 캔버스를 도트 캔버스로 변환합니다.
Parameters
- project_id (path, required): string (uuid)
- scene_id (path, required): string (uuid)
- target_dots (query): integer (default: 2000)
- access_token (cookie): string | null
Request Body (multipart/form-data)
- image: binary | null
Responses
- 200: 성공 - 문자열 반환
- 422: 유효성 검증 오류
PUT /projects/{project_id}/scenes/{scene_id}/processed - 도트 캔버스 저장
도트 캔버스 데이터를 저장합니다.
Parameters
- project_id (path, required): string (uuid)
- scene_id (path, required): string (uuid)
- access_token (cookie): string | null
Request Body (application/json)
{
"additionalProp1": {}
}Responses
- 200: 성공 - 문자열 반환
- 422: 유효성 검증 오류
POST /projects/{project_id}/scenes/{scene_id}/thumbnail - 씬 썸네일 업로드
씬 썸네일 이미지를 업로드합니다.
Parameters
- project_id (path, required): string (uuid)
- scene_id (path, required): string (uuid)
- access_token (cookie): string | null
Request Body (multipart/form-data)
- thumbnail (required): binary
Responses
- 200: 성공 - 문자열 반환
- 422: 유효성 검증 오류
이미지 (image)
GET /image/my-images - 내 이미지 목록
현재 로그인한 사용자가 업로드한 모든 이미지의 URL 목록을 반환합니다.
Parameters
- access_token (cookie): string | null
Responses
- 200: 성공 - 문자열 반환
- 422: 유효성 검증 오류
POST /image/upload - 이미지 업로드
이미지를 서버에 업로드하고, asyncpg를 사용해 DB에 경로를 업데이트합니다.
Parameters
- access_token (cookie): string | null
Request Body (multipart/form-data)
- image (required): binary
Responses
- 200: 성공 - 문자열 반환
- 422: 유효성 검증 오류
DELETE /image/delete - 이미지 삭제
S3 또는 서버에 저장된 특정 이미지를 삭제합니다. 사용자 본인의 이미지만 삭제할 수 있습니다.
Parameters
- access_token (cookie): string | null
Request Body (application/json)
{
"imageUrl": "string"
}Responses
- 200: 성공 - 문자열 반환
- 422: 유효성 검증 오류
웹소켓 (websocket)
POST /ws/test/broadcast - 테스트 브로드캐스트
웹소켓 테스트용 브로드캐스트 엔드포인트입니다.
Responses
- 200: 성공 - 문자열 반환