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-one
Authorization*
Request
filerequired
file
Provide your file.
save
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.
description
string
Description of the file.
user_id
string
Filter used to run isolated searches on individual user’s files.
tags
string
List of tags which can be used to influence search results.
static_file_url
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" }