تحديث محتوى الملف في متجر المتجهات
Update a specific document in a vector store.
The ID of the vector store.
The ID of the document.
The API key for authentication.
The new name for the document.
Document updated successfully.
PATCH /api/v1/vector-stores/{vector-store-id}/documents/{document-id}/ HTTP/1.1
Host: api.rememberizer.ai
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"name": "text"
}Document updated successfully.
{
"id": 1,
"name": "text",
"type": "text",
"vector_store": "text",
"size": 1,
"status": "text",
"processing_status": "text",
"indexed_on": "2025-11-15T05:13:44.281Z",
"status_error_message": "text",
"created": "2025-11-15T05:13:44.281Z",
"modified": "2025-11-15T05:13:44.281Z"
}طلبات مثال
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": "نظرة عامة على المنتج المحدثة"
}'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, 'نظرة عامة على المنتج المحدثة');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, 'نظرة عامة على المنتج المحدثة')معلمات المسار
vector-store-id
سلسلة
مطلوب. معرف متجر المتجهات الذي يحتوي على المستند.
document-id
عدد صحيح
مطلوب. معرف المستند الذي سيتم تحديثه.
جسم الطلب
{
"name": "نظرة عامة على المنتج المحدثة"
}name
سلسلة
الاسم الجديد للوثيقة.
تنسيق الاستجابة
{
"id": 1234,
"name": "نظرة عامة على المنتج المحدث",
"type": "text/plain",
"vector_store": "vs_abc123",
"size": 173,
"status": "مفهرس",
"processing_status": "مكتمل",
"indexed_on": "2023-06-15T10:30:00Z",
"status_error_message": null,
"created": "2023-06-15T10:15:00Z",
"modified": "2023-06-15T11:45:00Z"
}المصادقة
تتطلب هذه النقطة النهائية المصادقة باستخدام مفتاح API في رأس x-api-key.
استجابات الخطأ
400
طلب غير صالح - تنسيق الطلب غير صالح
401
غير مصرح - مفتاح API غير صالح أو مفقود
404
غير موجود - لم يتم العثور على متجر المتجهات أو الوثيقة
500
خطأ في الخادم الداخلي
تتيح لك هذه النقطة النهائية تحديث بيانات التعريف لوثيقة في متجر المتجهات الخاص بك. حاليًا، يمكنك فقط تحديث اسم الوثيقة. هذا مفيد لتحسين تنظيم الوثائق وقابلية اكتشافها دون الحاجة إلى إعادة تحميل الوثيقة.
Last updated