Hi Team, right now I'm trying to restore an agent using this method.
When I do it from the documentation It works, but when I do it from the curl Google provide, I get the same server response, but the restore doesn't happen.
Example:
Empty Bot
Executing from google documentation.
got 200 from server
And the chatbot was restored with just this test intent.
then I delete the same intent, and if I call again the method from the documentation will load again this test intent.
Now we are calling the curl, and when executing it, I got the same response format
but when reloading the bot, the restoration hasn't happened.
so server response from curl is telling me, the restoration was fine but when loading the bot, it is not.
Any suggestions?
Solved! Go to Solution.
yup, and that is correct. it creates a LONG TIME OPERATION. You have to check the output of that long-time operation to see why is the import failing: https://cloud.google.com/dialogflow/es/docs/how/long-running-operations
So once you call the import endpoint, you have to call the long-time operation that it returns to check the operation itself.
So what you see as a result of your call is a 200 OK and a link to a Long Time Operation. This does not mean that your agent was restored, this means that the long-time operation was successfully created. The long-time operation is the one that imports the agent, you have to query that operation to check the actual status and the errors.
Check these docs: https://cloud.google.com/dialogflow/es/docs/how/long-running-operations
Hi @xavidop both calls take just 3 seconds. There are not differences between then, just that one is from Google Doc and another is a cUrl
yup, and that is correct. it creates a LONG TIME OPERATION. You have to check the output of that long-time operation to see why is the import failing: https://cloud.google.com/dialogflow/es/docs/how/long-running-operations
So once you call the import endpoint, you have to call the long-time operation that it returns to check the operation itself.
I already see that this starts an Operation and won't send a false even if the import had an error.
So after checking operations, we are able to see the error and fix it after fixing its working fine.
that is awesome! so happy that you figured it out!! I'm curious, what was the issue?
Credentials, when the OAUTH token was created I was using Dialogflow scope instead of Google Auth in general, so after changing the scope it worked
that makes sense! thanks for the input!