astarte icon indicating copy to clipboard operation
astarte copied to clipboard

Creation API calls should be synchronous

Open zanettea opened this issue 4 years ago • 1 comments

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.

zanettea avatar Jul 09 '20 12:07 zanettea

Btw, the status code for async processing should be https://httpstatuses.com/202

zanettea avatar Jul 21 '20 11:07 zanettea

Closed by #666 and #669, which add support for sync operations on Realm Management and Housekeeping API

rbino avatar Jan 17 '23 14:01 rbino