I have noticed there is a varying delay (1 second or less) between when a corpus is created with /v1/create-corpus and ListCorpora returning the corpus. This makes sense as I assume creation task takes some time to update the DB and complete.
Does the API expose a way to track the task status so I can ensure the task completes before moving on to other logic?
You’ve raised an interesting point. The call to create-corpus is synchronous, in the sense that it returns after the corpus is created. List corpus should return it immediately afterwards, so this is something we’ll check into.
On the other hand, there is some small delay between the creation of the corpus and the point at which the indexing and query serving subsystems within the platform see it. It’s generally small, but trackable via our API. Let us know if it’s creating problems for your usecase.