--- title: "파일 삭제" slug: "rag-delete-file" updated: 2026-09-17T09:15:53Z published: 2026-09-17T09:15:53Z canonical: "api.ncloud-docs.com/rag-delete-file" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # 파일 삭제 VPC 환경에서 이용 가능합니다. 기존에 업로드한 파일을 삭제합니다. 지정된 파일 ID의 문서와 관련된 모든 색인 정보가 제거됩니다. ## 요청 요청 형식을 설명합니다. 요청 형식은 다음과 같습니다. | 메서드 | URI | | --- | --- | | DELETE | /api/v1/svc/{serviceId}/file/{fileId} | ### 요청 헤더 RAG API에서 공통으로 사용하는 헤더에 대한 정보는 [RAG 요청 헤더](/docs/rag-overview#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)를 참조해 주십시오. ### 요청 경로 파라미터 요청 경로 파라미터에 대한 설명은 다음과 같습니다. | 필드 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `serviceId` | String | Required | 서비스의 고유 식별자 | | `fileId` | String | Required | 파일의 고유 식별자 | ### 요청 예시 요청 예시는 다음과 같습니다. ``` curl --location --request DELETE 'https://kr-pub-gateway.rag.naverncp.com/api/v1/svc/{serviceId}/file/12345' \ --header 'Authorization: Bearer {apiKey}' ``` ## 응답 응답 형식을 설명합니다. ### 응답 바디 응답 바디에 대한 설명은 다음과 같습니다. | 필드 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `status` | Object | - | API 처리 결과 | | `status.code` | Integer | - | [API 응답 상태 코드](/docs/rag-overview#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C) | | `status.message` | String | - | [API 응답 상태 메시지](/docs/rag-overview#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C) | | `result` | Object | - | 파일 처리 결과 | | `result.inserted` | Array | - | 생성된 파일 ID (항상 `null`) | | `result.deleted` | Array | - | 삭제된 파일 ID | | `result.updated` | Array | - | 수정된 파일 ID (항상 `null`) | ### 응답 상태 코드 RAG API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 [RAG 응답 상태 코드](/docs/rag-overview#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)를 참조해 주십시오. ### 응답 예시 응답 예시는 다음과 같습니다. ``` { "status": { "code": 200, "message": "" }, "result": { "inserted": null, "deleted": [ "12345" ], "updated": null } } ```