# 벡터 저장소의 파일 내용 업데이트

{% openapi src="/files/fAmF2Kwil50sF5cXMoEX" path="/vector-stores/{vector-store-id}/documents/{document-id}/" method="patch" %}
[rememberizer\_openapi.yml](https://2913883985-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs0e4JCKQXzEGPRlMO7nt%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=ac0eeb18-73cf-42a3-93fe-2ff232a978a3)
{% endopenapi %}

## 예제 요청

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X PATCH \
  https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents/1234/ \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "업데이트된 제품 개요"
  }'
```

{% hint style="info" %}
`YOUR_API_KEY`를 실제 Vector Store API 키로, `vs_abc123`를 Vector Store ID로, `1234`를 문서 ID로 교체하세요.
{% endhint %}
{% endtab %}

{% tab title="JavaScript" %}

```javascript
const updateDocument = async (vectorStoreId, documentId, newName) => {
  const response = await fetch(`https://api.rememberizer.ai/api/v1/vector-stores/${vectorStoreId}/documents/${documentId}/`, {
    method: 'PATCH',
    headers: {
      'x-api-key': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: newName
    })
  });
  
  const data = await response.json();
  console.log(data);
};

updateDocument('vs_abc123', 1234, '업데이트된 제품 개요');
```

{% hint style="info" %}
`YOUR_API_KEY`를 실제 Vector Store API 키로, `vs_abc123`를 Vector Store ID로, `1234`를 문서 ID로 교체하세요.
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

def update_document(vector_store_id, document_id, new_name):
    headers = {
        "x-api-key": "YOUR_API_KEY",
        "Content-Type": "application/json"
    }
    
    payload = {
        "name": new_name
    }
    
    response = requests.patch(
        f"https://api.rememberizer.ai/api/v1/vector-stores/{vector_store_id}/documents/{document_id}/",
        headers=headers,
        data=json.dumps(payload)
    )
    
    data = response.json()
    print(data)

update_document('vs_abc123', 1234, '업데이트된 제품 개요')
```

{% hint style="info" %}
`YOUR_API_KEY`를 실제 Vector Store API 키로, `vs_abc123`를 Vector Store ID로, `1234`를 문서 ID로 교체하세요.
{% endhint %}
{% endtab %}
{% endtabs %}

## 경로 매개변수

| 매개변수            | 유형  | 설명                              |
| --------------- | --- | ------------------------------- |
| vector-store-id | 문자열 | **필수.** 문서를 포함하는 벡터 저장소의 ID입니다. |
| document-id     | 정수  | **필수.** 업데이트할 문서의 ID입니다.        |

## 요청 본문

```json
{
  "name": "업데이트된 제품 개요"
}
```

| 매개변수 | 유형  | 설명        |
| ---- | --- | --------- |
| name | 문자열 | 문서의 새 이름. |

## 응답 형식

```json
{
  "id": 1234,
  "name": "업데이트된 제품 개요",
  "type": "text/plain",
  "vector_store": "vs_abc123",
  "size": 173,
  "status": "indexed",
  "processing_status": "completed",
  "indexed_on": "2023-06-15T10:30:00Z",
  "status_error_message": null,
  "created": "2023-06-15T10:15:00Z",
  "modified": "2023-06-15T11:45:00Z"
}
```

## 인증

이 엔드포인트는 `x-api-key` 헤더에 API 키를 사용하여 인증이 필요합니다.

## 오류 응답

| 상태 코드 | 설명                              |
| ----- | ------------------------------- |
| 400   | 잘못된 요청 - 잘못된 요청 형식              |
| 401   | 인증되지 않음 - 잘못되었거나 누락된 API 키      |
| 404   | 찾을 수 없음 - 벡터 저장소 또는 문서를 찾을 수 없음 |
| 500   | 내부 서버 오류                        |

이 엔드포인트는 벡터 저장소의 문서 메타데이터를 업데이트할 수 있게 해줍니다. 현재 문서의 이름만 업데이트할 수 있습니다. 이는 문서의 조직 및 검색 가능성을 향상시키는 데 유용하며, 문서를 다시 업로드할 필요가 없습니다.

{% hint style="info" %}
참고: 이 엔드포인트는 문서의 메타데이터만 업데이트하며, 내용은 업데이트하지 않습니다. 내용을 업데이트하려면 기존 문서를 삭제하고 새 문서를 업로드해야 합니다.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rememberizer.ai/ko/undefined-1/api-docs/vector-store/update-files-content-in-a-vector-store.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
