trebol-ecommerce / api

eCommerce web service REST specification
GNU General Public License v3.0
0 stars 0 forks source link

Resource to request uploading a single file through an external service #45

Closed bglamadrid closed 2 years ago

bglamadrid commented 2 years ago

This comes from an issue to integrate storage services in the backend repository, but more specifically, Dropbox.

Integrating with other APIs poses an obvious concern. Even if called, this API alone would have no way of knowing whether any action of uploading is ever started, finished, failed nor aborted.

But the implementing backend, which has state can do two things when called:

  1. save a notice of the upload, as if reserving a "slot"
  2. expect that sometime, an update on the state of the upload is made

Then, it will need to just be notified when the latter happens and the process will be complete (regardless of success).

Designing that is simple enough.

Suggested resources

With the above in mind, a single object schema can be created with the following metadata to support the whole solution:

Additional considerations