Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Asynchronous Web API

Eugene Tulika edited this page Jan 8, 2018 · 10 revisions

As a Magento Developer, I would like to make WebAPI calls asynchronously so that my integrations don't have to wait for my requests to get processed to complete when it's not necessary.

In the product update context, this means that I can invoke single or bulk product APIs and get an immediate response that my request was accepted, and I'm offered a separate status reporting API to check on the progress of my requests by ID. For now this will only be available in Commerce and not Open Source.

Async Requirement

  • Service Contracts
interface Products {
 
    public save()

}

Make Async

either:

  • X-MAGENTO-ASYNC=true HEADER -- tells that request should be async
  • V1/async/customers POST

Response

  • Response
interface AsyncStatus {

   // status of async operatiuon
   public getStatus();

   // statuses for entities: (uuid, status)
   public getEntityStatuses();
}

Implemetation

  • re-use Asynchronous Operations interfaces

Acceptance Criteria

  • User can call product bulk update web API asynchronously by specifying certain info in the header
  • User can call product bulk update web API synchronously as before (this should be default)
  • Code Generation for Async responses should be possible
Clone this wiki locally