Retraiter un document
import requests
url = "https://app.ubik-agent.com/api/v1/documents/{document_id}/reprocess"
files = { "file.0": ("example-file", open("example-file", "rb")) }
payload = {
"file": "<string>",
"pipeline": "<string>"
}
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('pipeline', '<string>');
form.append('file.0', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
options.body = form;
fetch('https://app.ubik-agent.com/api/v1/documents/{document_id}/reprocess', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.ubik-agent.com/api/v1/documents/{document_id}/reprocess \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-KEY: <api-key>' \
--form 'file=<string>' \
--form 'pipeline=<string>' \
--form file.0='@example-file'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Retraiter un document
Retraite un document en utilisant un pipeline différent, en mettant éventuellement à jour le contenu du fichier.
POST
/
documents
/
{document_id}
/
reprocess
Retraiter un document
import requests
url = "https://app.ubik-agent.com/api/v1/documents/{document_id}/reprocess"
files = { "file.0": ("example-file", open("example-file", "rb")) }
payload = {
"file": "<string>",
"pipeline": "<string>"
}
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('pipeline', '<string>');
form.append('file.0', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
options.body = form;
fetch('https://app.ubik-agent.com/api/v1/documents/{document_id}/reprocess', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.ubik-agent.com/api/v1/documents/{document_id}/reprocess \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-KEY: <api-key>' \
--form 'file=<string>' \
--form 'pipeline=<string>' \
--form file.0='@example-file'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Cette page vous a-t-elle été utile ?
⌘I

