0

How to create REST API which will fetch data from custom table?

  • Which version of Magento? – benmarks Jan 4 '16 at 22:23
  • could you pls explain how you get values from the table by using API – user51361 Jun 14 '17 at 6:55
1
  1. Declare new service contract interface, see this
  2. In the model implementing this interface read data from custom table (via resource model)
  3. Expose created service contract interface as web API, see this

Also might be useful to look at any core APIs as an example (e.g. \Magento\Customer\Api\CustomerRepositoryInterface)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.