Open bigludo7 opened 1 week ago
@bigludo7 A great suggestion. For larger areas, the statistical time may indeed be longer. Introducing asynchronous interfaces is a good solution, and the Population Density Data API provides a great implementation. I will refer to and add this feature to our API
Thanks @chinaunicomyangfan !! :)
Problem description The standard behavior of the API is synchronous, although for large area requests the API may behave asynchronously
Possible evolution An API invoquer can enforce asynchronous behavior by providing a callback URL (sink) is in the request, in this case the API sends a callback to the callback URL provided with the result of the request. Additionally response code 202 should be added.
Alternative solution
Additional context This is a pattern already provided in Population Density Data API and make sense to replicate it. It means that we add in the request
sink
attribute &sinkCredential
object.