SaaS API가이드라인 AI 생성 입력
POST /ai/guideline/generation/{collabNo}/files
AI 가이드라인 생성용 파일 업로드
가이드라인 생성용 파일 업로드
레퍼런스 자료 또는 기존 보유 가이드라인 파일 1개를 S3에 업로드하고 객체 URL 을 반환합니다.
이 API는 파일 업로드만 수행합니다. 반환된 URL을 별도로 PUT /input 호출 시 fileUrls 배열에 담아야 generationInput 에 반영됩니다.
| 항목 | 값 |
|---|---|
| 메서드 | POST |
| 경로 | /ai/guideline/generation/{collabNo}/files |
| 인증 | Bearer 토큰 필수 |
| Content-Type | multipart/form-data |
| 최대 파일 크기 | 200MB |
요청
POST /ai/guideline/generation/123/files HTTP/1.1
Host: api.glowb.io
Authorization: Bearer {access_token}
Content-Type: multipart/form-data; boundary=----xxxx
------xxxx
Content-Disposition: form-data; name="file"; filename="reference.pdf"
Content-Type: application/pdf
(binary)
------xxxx--curl -X POST "https://api.glowb.io/ai/guideline/generation/123/files" \
-H "Authorization: Bearer {access_token}" \
-F "file=@reference.pdf"Path Parameters
Prop
Type
Form Parameters
Prop
Type
S3 저장 위치
{glowb-input bucket}/guideline/generation/{collabNo}/{timestamp}_{uuid}_{originalFilename}응답
성공 응답 (200 OK)
data 는 업로드된 파일의 S3 URL 문자열입니다.
{
"status": 200,
"code": null,
"message": "파일 업로드가 완료되었습니다.",
"data": "https://glowb-input.s3.ap-southeast-1.amazonaws.com/guideline/generation/123/1714435200000_b7c1...pdf"
}에러 응답
| 상태 코드 | 설명 |
|---|---|
400 | 빈 파일 전송 |
401 | 인증 실패 |
500 | S3 업로드 실패 |
클라이언트 가이드
- 여러 파일 업로드 시 본 API를 N번 호출하고, 응답 URL N개를 모아두었다가 PUT /input 한 번에 전달합니다.
- 업로드만 하고
PUT /input을 호출하지 않으면 S3에는 파일이 남지만generationInput에는 반영되지 않습니다. - 본 엔드포인트는 멱등하지 않습니다 (호출할 때마다 새로운 S3 키 생성).