Documents
- POSTIngest Document
- POSTIngest Document From Url
- POSTIngest Document From Embedding
- POSTGet Document Answer
- POSTList Documents
- POSTSearch document pages (deprecated)
- POSTSearch Document Pages
- POSTSearch Document Paragraphs
- POSTSearch Document Sentences
- GETGet Document By External Id
- GETGet Document By Id
- DELDelete Document By Id
- GETGet Document By Task Id
- POSTPreview Delete By Metadata
- POSTDelete Documents By Metadata
Content
Extractions
Tasks
Documents
Preview Delete By Metadata
Preview how many documents would be deleted by the metadata filter.
POST
/
api
/
v1
/
documents
/
delete
/
preview
Copy
curl --request POST \
--url https://api.fieldwise.ai/api/v1/documents/delete/preview \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"metadata_filter": {
"$or": [
{
"category": "finance"
},
{
"$and": [
{
"status": "archived"
},
{
"age": {
"$gt": 365
}
}
]
}
]
}
}'
Copy
{
"success": true,
"data": {
"document_count": 123,
"document_ids": [
123
]
},
"error": {
"error_code": "RESOURCE_NOT_FOUND",
"message": "Resource not found"
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"version": "1.0"
}
}
Authorizations
Headers
Body
application/json
Request model for deleting documents by metadata filter.
Response
200
application/json
Successful Response
The response is of type object
.
Copy
curl --request POST \
--url https://api.fieldwise.ai/api/v1/documents/delete/preview \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"metadata_filter": {
"$or": [
{
"category": "finance"
},
{
"$and": [
{
"status": "archived"
},
{
"age": {
"$gt": 365
}
}
]
}
]
}
}'
Copy
{
"success": true,
"data": {
"document_count": 123,
"document_ids": [
123
]
},
"error": {
"error_code": "RESOURCE_NOT_FOUND",
"message": "Resource not found"
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"version": "1.0"
}
}
Assistant
Responses are generated using AI and may contain mistakes.