Using the API to fetch data: resourceUrl is empty
Con rispostaHi
We are building a php script to connect/fetch data from the API.
We are able to fetch a token,
and use it to get the LocationURL (using Document_id & Section_id).
'https://api.eu.wdesk.com/platform/v1/documents/'.$documentid.'/export'
In the result we are able to fetch the LocationURL that we use in the next api call:
https://api.eu.wdesk.com/platform/v1/operations/idfromprevieous call.
The issue is that the "resourceURL" is empty.
The status is started or acknowledged. When trying the url hardcoded we get an "completed" status.
what are we missing here?
-
Commento ufficiale
Hi, Koen. Tony is exactly right in that you may need to poll the operation multiple times before the task it represents has completed. Once completed, the resourceUrl should be available.
Colleen Hardie
Senior Software DeveloperHi Koen,
You may want to leverage the API forum for questions related to API coding to engage with a broader community of people that are closer to coding. Chains is an application that is specifically low/no code so you are engaing a smaller audience.
In my prior coding experience for asyncronous calls like document exports, you need to create a loop to monitor the execution and subsequent completion and status. This endpoint should help. I believe you would use the Location returned by the first endpoint as the OperationID in the endpoint I hyperlinked in the loop.
HTH.
Tony
0Accedi per aggiungere un commento.
Commenti
2 commenti