- File API
- Index One
File API
Index One
Securely send your file to the Mixpeek server, where the content is extracted, indexed and then searchable. Files are never stored on our servers.
POST
/v1/file/index
Authorization*
curl --request POST \
--url https://api.mixpeek.com/v1/file/index \
--header 'Authorization: AUTH_VALUE' \
--header 'Content-Type: application/json' \
--data '{
"file": file
}'
Request
fileRequired
file
Provide your file.
saveOptional
boolean
If true
, it will save it in Mixpeek’s dedicated S3 bucket. Your file will be
stored within a unique folder to your api-key tenant. This will override any
static_file_url
provided and will include it in the response.
descriptionOptional
string
Description of the file.
user_idOptional
string
Filter used to run isolated searches on individual user’s files.
tagsOptional
string
List of tags which can be used to influence search results.
static_file_urlOptional
string
Used as a reference to associate with your file.
Response
file_idRequired
string
Your indexed files’ unique identifier.
from mixpeek import Mixpeek
mix = Mixpeek(api_key="API_KEY")
# index one local pdf document without any extra metadata
mix.index("/user/desktop/file.pdf")
# with extra metadata
mix.index(
"/user/desktop/file.pdf",
# everything below is optional
description="This file contains a cat.",
user_id="123",
tags="document, legal",
static_file_url="cdn.host.com/file.pdf",
save=True
)
{ "file_id": "123" }
from mixpeek import Mixpeek
mix = Mixpeek(api_key="API_KEY")
# index one local pdf document without any extra metadata
mix.index("/user/desktop/file.pdf")
# with extra metadata
mix.index(
"/user/desktop/file.pdf",
# everything below is optional
description="This file contains a cat.",
user_id="123",
tags="document, legal",
static_file_url="cdn.host.com/file.pdf",
save=True
)
{ "file_id": "123" }