FileUpload
File Upload
Query Parameters
- c integer required
Customer ID
- o integer required
Corpus ID
Example: 1 - d boolean
If true, the server returns the extracted document that was indexed
- multipart/form-data
Request Body
- file binary required
The file to be indexed into Vectara.
- doc_metadata string
A JSON string of any additional metadata you want attached to the file.
- 200
- 400
- 401
- 403
- 409
- 507
A successful response
- application/json
- Schema
- Example (from schema)
Schema
response object
status objectquotaConsumed object
numChars stringThe number of characters Vectara indexed from the file uploaded.
numMetadataChars stringThe number of metadata characters Vectara indexed from the file uploaded.
{
"response": {
"status": {},
"quotaConsumed": {
"numChars": "string",
"numMetadataChars": "string"
}
}
}
An invalid request was sent. e.g. one or more parameters was missing, or the corpus does not exist.
- application/json
- Schema
- Example (from schema)
Schema
- httpCode integer
Returned HTTP code
{
"httpCode": 0
}
The request was not authenticated
The caller is not authorized to add documents to the corpus
A document already exists in the corpus with the same document ID, yet the contents of the indexed document are different than the file being uploaded. Since the indexer is idempotent, the same document (identified by the document ID) can be uploaded multiple times. The indexer does not support updates yet, so an error is returned when a different document is uploaded for the same document ID Note that when a raw file is uploaded, the file name is used as the document ID.
There is no more indexing quota left for the corpus or customer to index more documents. Upgrade your account, add a credit card, or contact sales.