HTTP API

  • 58 Views
  • Last Post 2 weeks ago
Gosforth posted this 4 weeks ago

The result of https POST to method "processimage" is:

{

    "taskId""14e1db30-77813-4b3f-a529-0e05ea1234549",

    "registrationTime""2020-01-31T16:21:11Z",

    "statusChangeTime""2020-01-31T16:21:11Z",

    "status""Queued",

    "filesCount"1,

    "requestStatusDelay"10000

}

 

What should I do now with it? This documentaion is nightmare.

Order By: Standard | Newest | Votes
Gosforth posted this 4 weeks ago

After trying I found "getTaskStatus" method. But when I try add exportFormat=txt parameter it says "

"Invalid parameter: exportFormat""

JP_OCR posted this 3 weeks ago

Hi there, 


You can use the getTasksStatus GET method to retrieve the OCR informations.
The HTTP request is something like :

https://cloud-eu.ocrsdk.com/v2/getTaskStatus?taskId=14e1db30-77813-4b3f-a529-0e05ea1234549

You'll need the same authInfo as your processImage method.
And in the result Json you'll find the status of your request, if it was completed you'll get an url where you can download the OCRed file :

{
    "taskId": "14e1db30-77813-4b3f-a529-0e05ea1234549",
    "registrationTime": "2020-02-03T09:57:18Z",
    "statusChangeTime": "2020-02-03T09:57:26Z",
    "status": "Completed",
    "filesCount": 1,
    "requestStatusDelay": 0,
    "resultUrls": [
        "https://ocrsdk.blob.core.windows.net/files/14e1db30-77813-4b3f-a529-0e05ea1234549.result?sv=2012-02-12&se=2020-02-03T19%3A00%3A00Z&sr=b&si=downloadResults&sig=Vqfge7074S85vajF1%2BTHN6Lq5bt9QAYNcfWu2cPN54k%3D"
    ]
}


The "exportFormat" parameter is something to specify in the POST request.

JonsonSmith posted this 2 weeks ago

Hi, Poncelin JuriaanI. I appreciate your opinion.

Close