Updated on Sep 14, 2023
1
min read
API (/upload)
POST
Updated on Sep 14, 2023
1
min read
API (/upload)
POST
Updated on Sep 14, 2023
1
min read
API (/upload)
POST
POST /upload/[collection_id]
Uploads a new document to be processed and stored.
URL:
POST https://api.vesana.dev/v1/upload/[collection_id]
Headers:
Content-Type: application/json x-Vesana-API-key: YOUR_API_KEY
Request Body:
{ "text": "string", "fields": "JSON" }
Response:
{ "status": "success", "document_id": "string" }
Example:
POST /v1/upload/4321 HTTP/1.1 Host: api.vesana.dev x-Vesana-API-key: YOUR_API_KEY Content-Type: application/json { "text": "Your document text here", "fields": { "title": "Document Title", "author": "Author Name", "metadata": { "tags": ["example", "document"] } } }
Example Response:
{ "status": "success", "document_id": "12345" }
See https://vesana.dev/docs/auth-error for error details in case of "status": "error"
POST /upload/[collection_id]
Uploads a new document to be processed and stored.
URL:
POST https://api.vesana.dev/v1/upload/[collection_id]
Headers:
Content-Type: application/json x-Vesana-API-key: YOUR_API_KEY
Request Body:
{ "text": "string", "fields": "JSON" }
Response:
{ "status": "success", "document_id": "string" }
Example:
POST /v1/upload/4321 HTTP/1.1 Host: api.vesana.dev x-Vesana-API-key: YOUR_API_KEY Content-Type: application/json { "text": "Your document text here", "fields": { "title": "Document Title", "author": "Author Name", "metadata": { "tags": ["example", "document"] } } }
Example Response:
{ "status": "success", "document_id": "12345" }
See https://vesana.dev/docs/auth-error for error details in case of "status": "error"
POST /upload/[collection_id]
Uploads a new document to be processed and stored.
URL:
POST https://api.vesana.dev/v1/upload/[collection_id]
Headers:
Content-Type: application/json x-Vesana-API-key: YOUR_API_KEY
Request Body:
{ "text": "string", "fields": "JSON" }
Response:
{ "status": "success", "document_id": "string" }
Example:
POST /v1/upload/4321 HTTP/1.1 Host: api.vesana.dev x-Vesana-API-key: YOUR_API_KEY Content-Type: application/json { "text": "Your document text here", "fields": { "title": "Document Title", "author": "Author Name", "metadata": { "tags": ["example", "document"] } } }
Example Response:
{ "status": "success", "document_id": "12345" }
See https://vesana.dev/docs/auth-error for error details in case of "status": "error"