File API
Index Directory
POST

/v1/file/index-many

Authorization*
curl --request POST \
  --url https://api.mixpeek.com/v1/file/index-many \
  --header 'Authorization: <authorization>'

S3 is currently the only supported directory. In order to use this API, you need to provision an IAM role in your AWS control plane. Follow this tutorial to do so.

Request

s3_bucket
string

S3 bucket name.

aws_access_key
string

Access key. This is never stored on our servers, removing IAM read permissions will cause this API to fail.

aws_secret_key
string

Secret key. This is never stored on our servers, removing IAM read permissions will cause this API to fail.

region
string

Region of bucket.

Response

file_idsrequired
array

Your uploaded files’ unique identifiers.

from mixpeek import Mixpeek

mix = Mixpeek(
    api_key="mixpeek_api_key",
    access_key="aws_access_key",
    secret_key="aws_secret_key",
    region="region"
)

mix.index_bucket("mixpeek-public-demo")
{
  "file_ids": [
    "63a47891614b9c2f4988a0e6",
    "63a47891614b9c2f4988a0e7",
    "63a47891614b9c2f4988a0e8",
    "63a47893614b9c2f4988a0e9"
  ]
}