Add files to collection
POST/api/v1/collections/:collection-id/files
To add files to the collection, provide a URL for each file. The URL can be public or private. For private files, upload them using the Files API and use the generated URL.
Request
Path Parameters
Collection ID
- application/json
Body
Array [
]
files
object[]
required
Possible values: >= 1
, <= 100
List of files to add to the collection
File name
File URL
Responses
- 200
- 401
- 403
- 404
Successful response
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
result
object[]
required
List of files added to the collection
File ID
File name
File's MIME type
Possible values: [pending
, indexed
, error
]
File status
Error message if the file indexing failed
Timestamp when the file was created
ID of creating user
File URL
File size in bytes
MD5 hash of the file
ID of the connector managing the file
{
"result": [
{
"id": "string",
"name": "string",
"type": "string",
"status": "pending",
"error": "string",
"created_at": "string",
"user_id": "string",
"url": "string",
"size": 0,
"md5_hash": "string",
"connector_id": "string"
}
]
}
Unauthorized request
- application/json
- Schema
- Example (from schema)
Schema
error
object
required
Human readable error message
Further details on the error
{
"error": {
"message": "string"
}
}
Forbidden collection, user does not have sufficient permissions to access the collection
- application/json
- Schema
- Example (from schema)
Schema
error
object
required
Human readable error message
Further details on the error
{
"error": {
"message": "string"
}
}
Collection not found
- application/json
- Schema
- Example (from schema)
Schema
error
object
required
Human readable error message
Further details on the error
{
"error": {
"message": "string"
}
}