Result file GUID

Hello.


I’m trying to use next code from the documentation :

api.Compare(function(response) {
console.log(“success callback”);
console.log(response.result);
},“your clientId”, “your source file GUID”, “your target file GUID”, “callback Url”)

And after execution in the response.result  I have only “job_id” value. 

To download result file I need “result file GUID”: 
api.DownloadResult(function(response) {
console.log(“success callback”);
console.log(response);
},“your result file GUID”, “format file, which will be downloaded(pdf , docx or doc)”)

So how can I get result file GUID after api.Compare() execution using API? 
Thanks.
Hello,

Thank you for your request.

To get "result file GUID" you should call GetJobDocuments method for AsyncApi . So your code should be next:
async = new groupdocs.AsyncApi(aClient, "Base path to API server");
api.Compare(function(response) {
console.log("success callback");
console.log(response.result);
async.GetJobDocuments(function(response) {
console.log("success callback");
console.log(response);
api.DownloadResult(function(response) {
console.log("success callback");
console.log(response);
},response.result['outputs'][0]['guid'])
}"your clientId" ,response.result['job_id'], "format file")
},"your clientId", "your source file GUID", "your target file GUID", "callback Url")

If you will have more questions please feel free to contact us.

--------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Thank you a lot.


However, when I’m trying to run this code
api.Compare(function(response) {
console.log(“success callback”);
console.log(response.result);
async.GetJobDocuments(function(response) {
console.log(“success callback”);
console.log(response);
api.DownloadResult(function(response) {
console.log(“success callback”);
console.log(response);
},response.result[‘outputs’][0][‘guid’])
}“your clientId” ,response.result[‘job_id’], “format file”)
},“your clientId”, “your source file GUID”, “your target file GUID”, “callback Url”)

I’m getting job_status is “pending” and result[‘outputs’][0][‘guid’] is null.
Is there a way to get the result file GUID after job complete? Or I should check job_status every N seconds?

Thanks.
Hello,

Yes, you should create a delay for 3-5 seconds that the server can process the request to compare. Also you can check the job_status . To get the file guid status of the job should be "Completed" or "Archived" .

Note: if you will compare two large document then you should increase the delay.

---------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Thanks for the answer.


Seems that it is work.
But sometimes I’m getting ‘Postponed’ status when trying to compare different documents and seems that this status never changes. When compare equals everything is ok.


Maybe I should do additional things to avoid this problem?

Thanks.
Hello,

Thank you for coming back.

Could you please share with us these two different documents and your current account that you use for api requests. Could be that you have reached allowed for your subscription plan max. number of requests or maybe the issue in your documents.

We will investigate these details and will notify you.

-------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Thanks.


I sent you a pm with information.
Hello,

Sorry but we haven't received your details yet . Please send them to our support email support@groupdocs.com.

We will be glad to help you.

---------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hello ,

We have checked your account logs with our product team and we have found the error, seems that one of your files wasn't found. Could you please recheck the guid of the files . Also you can use our cloud API console and dashboard for tests.

Note: We also checked your files with our test account and the comparison works well for these files.

Please recheck all twice and if you will have any questions please feel free to contact us.

-------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hello,


I didn’t find a solution for my problem. Hope you can help me.

When I’m trying to compare 2 files (both via JS Api and Dev Console), comparison job getting ‘Postponed’ status.

For example:
Request URL: https://api.groupdocs.com/v2.0/comparison/7913263c6b2fdaab/compare?source=a5442916198b3ac70df3c0396f36fafc4859e0c62cf29c9da168e3b06778c310&target=01fb7ac287656c093b52c0a6a142ca6d5ca58f97b78f504b474f8a7de227c0a8&callback=123&signature=eihQJLL%2ByTlTWMi4wQ7TMxwVqj8

Source GUID : a5442916198b3ac70df3c0396f36fafc4859e0c62cf29c9da168e3b06778c310
Target GUID :
01fb7ac287656c093b52c0a6a142ca6d5ca58f97b78f504b474f8a7de227c0a8

Client ID : 7913263c6b2fdaab

Im using AWS S3 as file storage. And files changing there in runtime.
Today I did successfully comparison 2 times but this requests does not differs from requests that fails.

Files that compared successfully:
source guid: f3dfe55ce4e25eb03c16e4c176e5f5a3b9a259fb23a446ee6424a15ec00113a9
target guid:
c7443c2bade0c98edad62333381f39fd58c725ce318fda46dd85208539233628

Thanks.

This message was posted using Email2Forum by evgen.efimov.

Hello,


Thank you for your details.

We will investigate them with our Product team and when we will have any news, then you will be notified.

Sorry for the inconvenience.

-------

Best regards,

Evgen Efimov


http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hi Evgen,


I spoke with Leo on the phone earlier.

Can you give us an update on this issue please?

Many thanks,

John
Hello ,

I was notified by the Product team that the hot-fix release will be today or tomorrow. I will notify you here, when it will be available.

---------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hi Evgen,


Please let me know if the hot-fix is now available.

Thank you,

Leo
Hello Leo,

Sorry for the delay.

We had to delay the deploy on last week, so it should be available this week.(today or maybe tomorrow). Don't worry I will notify you here when it will be deployed.

We apologize for the inconvenience.

----------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hi Evgen,


Haven’t heard back about the hotfix. Thanks, Leo.

Hi Evgen,


Haven’t heard back about the hotfix deployment. Please let me know. Thanks!

Leo
Hello Leo,

Sorry for the delay with callback.

Yes, the deploy with the hotfix was performed yesterday.

Please re-check the issue on your side and share with us your results.

---------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hello Leo,

I have notified you in my previous post that we have released the hotfix previous week, but looks like you doesn't received it - could be that you saw the cached version of the forum thread with out my post.

Sorry for the confusion.

--------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hi Evgen,


Unfortunately we are getting the same problem on our end (Error: Got Postponed Status).

Thanks,

Leo