Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento 2 REST API Get All Product [closed]

I am trying to get all products from Magento 2 using REST api, is there any resource that can do the GET for all products ?

like image 882
Hamza Avatar asked May 17 '17 14:05

Hamza


2 Answers

For all products: /V1/products?searchCriteria[pagesize]

For 20 products: /V1/products?searchCriteria[pageSize]=20

like image 104
Nahid Avatar answered Oct 20 '22 20:10

Nahid


Magento 2 Provides Swagger Module and it listed all API resources:

Magento2 RESTful API is based on swagger specification and uses swagger ui tool to generate and visualize API documentation so it can be easily understood and used.

Magento2 provides Magento_Swagger module to list, visualise and at the same time test the API resources.

If you have installed Magento2 on your server then you can easily access all the API resources listed on your website by just hitting this URL:

  • example: http://www.your_url.com/swagger

All the API resources will be listed. you can click on each resource to check all the details about the api, resource url, method, params and even you can execute the API call on the same place and check the response.

like image 44
Renga Avatar answered Oct 20 '22 21:10

Renga