Is there any way to increase the performance getting products through Magento rest API call?

Viewed 538

I am trying to get data through Magento v2.0 rest API using Python. I am Using the API endpoints provided by the Magento v2.0. It is taking a longer period of time than expected.

I am using rest API endpoints provided by the Magento v2.0 https://devdocs.magento.com/guides/v2.0/rest/bk-rest.html

Endpoint to pull products data in batch GET "/V1/products"

The response should contain all the information along with stockitem and mediaGalleryEntries according to the devdocs provided by Magento.

Link for Response: https://devdocs.magento.com/swagger/index_20.html

In CatalogProductRepositoryV1 -> GET /v1/products

But the problem is, this endpoint does not contain the stockitem info and mediaGalleryEntries in actual API endpoint call. So I use another endpoint to get that information. GET /v1/products/{sku}

To work with "/V1/products/{sku}", Firstly I use the GET /V1/products to get all the SKUs. Then I use GET /V1/products/{sku} which is one to one request. This one to one request is taking much longer time. I am using a thread in python for this one to one request. Is there any other way to improve? I even tried to clear the cache from Magento Store. But the result seems the same.

Any further insight or links or solutions you can provide would be greatly appreciated Thanks a lot in advance!

0 Answers
Related