{"openapi":"3.1.0","info":{"title":"tube — AI 유튜브 자율채널 관리","version":"0.1.0 (M0)"},"paths":{"/api/channels/{channel_id}/contents":{"get":{"tags":["콘텐츠"],"summary":"Contents List","operationId":"contents_list","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-tool":"contents_list","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]},"post":{"tags":["콘텐츠"],"summary":"Content Create","operationId":"content_create","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-risk":"act","x-tool":"content_create","x-required-scope":["plan"],"security":[{"bearer":[]}]}},"/api/contents/{content_id}":{"get":{"tags":["콘텐츠"],"summary":"Content Get","operationId":"content_get","parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"integer","title":"Content Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-tool":"content_get","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]},"patch":{"tags":["콘텐츠"],"summary":"Content Update","operationId":"content_update","parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"integer","title":"Content Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-risk":"act","x-tool":"content_update","x-required-scope":["plan"],"security":[{"bearer":[]}]}},"/api/contents/{content_id}/request-approval":{"post":{"tags":["콘텐츠"],"summary":"N5 — 대본 · 영상 · 업로드 글을 사람 승인에 올린다","operationId":"content_request_approval","parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"integer","title":"Content Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-risk":"act","x-tool":"content_request_approval","x-required-scope":["plan"],"security":[{"bearer":[]}]}},"/api/contents/{content_id}/upload":{"post":{"tags":["콘텐츠"],"summary":"N6 — 승인받은 카드를 비공개로 올린다","operationId":"content_upload","parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"integer","title":"Content Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-risk":"upload","x-tool":"content_upload","x-required-scope":["upload"],"security":[{"bearer":[]}]}},"/api/approvals":{"get":{"tags":["승인함"],"summary":"Approvals List","operationId":"approvals_list","parameters":[{"name":"channelId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channelid"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"대기","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-tool":"approvals_list","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]}},"/api/channels/{channel_id}/rules":{"get":{"tags":["규칙"],"summary":"Channel Rules","operationId":"channel_rules","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-tool":"channel_rules","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]},"post":{"tags":["규칙"],"summary":"N10 — 규칙 새 판 제안 (반영은 사람 승인 N11)","operationId":"channel_rule_propose","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-risk":"act","x-tool":"channel_rule_propose","x-required-scope":["plan"],"security":[{"bearer":[]}]}},"/api/channels/{channel_id}/settings":{"get":{"tags":["채널"],"summary":"Settings Get","operationId":"channel_settings_get","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-tool":"channel_settings_get","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]}},"/api/channels/{channel_id}/dashboard":{"get":{"tags":["채널"],"summary":"한눈에 — 칸별 카드 수 · 승인 대기 · 다가오는 콘텐츠 · 최근 성적 · 규칙 판","operationId":"channel_dashboard","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-tool":"channel_dashboard","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]}},"/api/media":{"get":{"tags":["미디어"],"summary":"Media List","operationId":"media_list","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-tool":"media_list","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]}},"/api/health":{"get":{"tags":["상태"],"summary":"Health","operationId":"health","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-tool":"health","x-risk":"read"}},"/api/channels":{"get":{"tags":["채널"],"summary":"Channels List","operationId":"channels_list","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-tool":"channels_list","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]}},"/api/channels/{channel_id}/overview":{"get":{"tags":["채널"],"summary":"채널 · 최근 영상 · 영상마다 마지막 성적 (저장분)","operationId":"channel_overview","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-tool":"channel_overview","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]}},"/api/channels/{channel_id}/stats":{"get":{"tags":["성적"],"summary":"N8 — YouTube Analytics 에서 최근 영상 성적을 읽어 쌓고 돌려준다","operationId":"channel_stats","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":28,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-tool":"channel_stats","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]}},"/api/renders":{"post":{"tags":["렌더"],"summary":"N3 — 장면표 → 세로 영상 (M0: 이미 만든 파일만 바로 끝)","operationId":"render_create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderReq"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-risk":"act","x-tool":"render_create","x-required-scope":["render"],"security":[{"bearer":[]}]}},"/api/renders/{render_id}":{"get":{"tags":["렌더"],"summary":"Render Get","operationId":"render_get","parameters":[{"name":"render_id","in":"path","required":true,"schema":{"type":"integer","title":"Render Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-tool":"render_get","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]}},"/api/videos/upload":{"post":{"tags":["업로드"],"summary":"N6 — 비공개 업로드(공개는 사람이 Studio 에서). 뒤에서 올리고 GET /api/videos/{id} 로 본다","operationId":"video_upload","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadReq"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-risk":"upload","x-tool":"video_upload","x-required-scope":["upload"],"security":[{"bearer":[]}]}},"/api/videos/{video_id}":{"get":{"tags":["업로드"],"summary":"Video Get","operationId":"video_get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-tool":"video_get","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]}},"/api/rules":{"get":{"tags":["규칙"],"summary":"규칙 판 (원본은 Flow 액터 판 — 보여 주기용)","operationId":"rules_get","parameters":[{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-tool":"rules_get","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]}},"/api/history":{"get":{"tags":["이력"],"summary":"History List","operationId":"history_list","parameters":[{"name":"channelId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channelid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-tool":"history_list","x-risk":"read","x-required-scope":["read"],"security":[{"bearer":[]}]}}},"components":{"schemas":{"ContentIn":{"properties":{"title":{"type":"string","title":"Title","default":""},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"additionalProperties":true,"type":"object","title":"ContentIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"RenderReq":{"properties":{"channelId":{"type":"string","title":"Channelid","description":"내부 번호 · UC… · tube:channel:UC…"},"scenes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Scenes","description":"장면표(JSON) — N2 대본 결과"},"file":{"type":"string","title":"File","description":"이미 만든 영상(미디어 폴더 기준 상대 경로) — M0 은 이것만 바로 끝난다","default":""}},"type":"object","required":["channelId"],"title":"RenderReq"},"RuleIn":{"properties":{"rules":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rules"},"note":{"type":"string","title":"Note"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","required":["rules","note"],"title":"RuleIn"},"UploadReq":{"properties":{"channelId":{"type":"string","title":"Channelid"},"title":{"type":"string","maxLength":100,"title":"Title"},"description":{"type":"string","maxLength":5000,"title":"Description","default":""},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"categoryId":{"type":"string","title":"Categoryid","default":"28"},"file":{"type":"string","title":"File","description":"미디어 폴더 기준 상대 경로. renderId 가 있으면 그 결과","default":""},"renderId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Renderid"},"thumbnail":{"type":"string","title":"Thumbnail","default":""},"pillar":{"type":"string","title":"Pillar","default":""},"rules":{"type":"string","title":"Rules","description":"이 영상이 따른 규칙 판 (예 v0.1)","default":""},"pinnedComment":{"type":"string","title":"Pinnedcomment","default":""}},"type":"object","required":["channelId","title"],"title":"UploadReq"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}}}