Updated on 13 may 2024
Lectura de
1
min
API (/update_doc)
POST
Updated on 13 may 2024
Lectura de
1
min
API (/update_doc)
POST
Updated on 13 may 2024
Lectura de
1
min
API (/update_doc)
POST
PUT /update_doc
Updates an existing document's content or metadata.
URL:
POST https://api.vesana.dev/v1/update_doc
Headers:
Content-Type: application/json x-Vesana-API-key: YOUR_API_KEY
Request Body:
{ "document_id": "string", "text": "string", "fields": "JSON" }
Response:
{ "status": "success", "document_id": "string" }
Example:
POST /v1/update_doc HTTP/1.1 Host: api.vesana.dev x-Vesana-API-key: YOUR_API_KEY Content-Type: application/json { "document_id": "12345", "text": "Your document text here", "fields": { "title": "Document Title", "author": "Author Name", "metadata": { "tags": ["example", "document"] } } }
Response:
{ "status": "success", "document_id": "12345" }
See https://vesana.dev/docs/auth-error for error details in case of "status": "error"
PUT /update_doc
Updates an existing document's content or metadata.
URL:
POST https://api.vesana.dev/v1/update_doc
Headers:
Content-Type: application/json x-Vesana-API-key: YOUR_API_KEY
Request Body:
{ "document_id": "string", "text": "string", "fields": "JSON" }
Response:
{ "status": "success", "document_id": "string" }
Example:
POST /v1/update_doc HTTP/1.1 Host: api.vesana.dev x-Vesana-API-key: YOUR_API_KEY Content-Type: application/json { "document_id": "12345", "text": "Your document text here", "fields": { "title": "Document Title", "author": "Author Name", "metadata": { "tags": ["example", "document"] } } }
Response:
{ "status": "success", "document_id": "12345" }
See https://vesana.dev/docs/auth-error for error details in case of "status": "error"
PUT /update_doc
Updates an existing document's content or metadata.
URL:
POST https://api.vesana.dev/v1/update_doc
Headers:
Content-Type: application/json x-Vesana-API-key: YOUR_API_KEY
Request Body:
{ "document_id": "string", "text": "string", "fields": "JSON" }
Response:
{ "status": "success", "document_id": "string" }
Example:
POST /v1/update_doc HTTP/1.1 Host: api.vesana.dev x-Vesana-API-key: YOUR_API_KEY Content-Type: application/json { "document_id": "12345", "text": "Your document text here", "fields": { "title": "Document Title", "author": "Author Name", "metadata": { "tags": ["example", "document"] } } }
Response:
{ "status": "success", "document_id": "12345" }
See https://vesana.dev/docs/auth-error for error details in case of "status": "error"