@Abdullah Safdar Ali Does your target container contain a file called target.pdf already? If that is the case then that is the most probable cause of the failure. You could try a different target name for your file in the target container. Please ensure the required permissions are allocated to the SAS signature of your target container though.
Microsoft Document Translator API target file empty
Abdullah Safdar Ali
1
Reputation point
Hello.
I was able to make a 202 request using postman through endpoint https://<Name of resource>.cognitiveservices.azure.com/translator/text/batch/v1.0/batches
but I see an empty file in the blob. When I query the Get translated status endpoint it shows the status as failed. I don't see any reason why is that. The Json body for the request was:
{
"inputs": [
{
"storageType": "file",
"source": {
"sourceUrl": "https://<name of resource>.blob.core.windows.net/source/S0003598X20000265a.pdf?sv=2020-04-08&st=2021-07-11&se=2021-07-12%3A39%3A57Z&sr=b&sp=r&sig="
},
"targets": [
{
"targetUrl": "https://<name of resource>.blob.core.windows.net/target/target.pdf?sv=2020-04-08&st=2021-07-11&se=2021-07-12&sr=c&sp=wl&sig=",
"language": "ar"
}
]
}
]
}
sourceUrl was SAS for the document and targetUrl was SAS for the blob.
1 answer
Sort by: Most helpful
-
romungi-MSFT 45,961 Reputation points Microsoft Employee
2021-07-13T11:34:48.497+00:00