astarte
astarte copied to clipboard
Creation API calls should be synchronous
Current async API provide no why to know if a call has been successful or not. The only available option is to check in a loop if the resource is present. How long should we check before assuming an error? What about the error?
The API should be synchronous and report a meaningful error code.
If an API is supposed to take a very long time to complete a good async implementation should provide an endpoint to query for the status of the background operation and related errors.
Btw, the status code for async processing should be https://httpstatuses.com/202
Closed by #666 and #669, which add support for sync operations on Realm Management and Housekeeping API