Retraiter un document
import requests
url = "https://app.ubik-agent.com/api/v1/documents/{document_id}/reprocess"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"pipeline\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "multipart/form-data; boundary=---011000010111000001101001"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('pipeline', '<string>');
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>'{
"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"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"pipeline\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "multipart/form-data; boundary=---011000010111000001101001"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('pipeline', '<string>');
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>'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Cette page vous a-t-elle été utile ?

