Extraer todos los documentos del Master Data con Scroll Documents

Buenos días comunidad,

Actualmente lo que quiero hacer es automatizar la extracción de datos del “Formulário Clientes da aplicação Profile System”, por lo que estoy utilizando la API de data entities - scroll (https://developers.vtex.com/vtex-rest-api/reference/scrolldocuments-1) para extraer todos los ID’s de los clientes existentes en el sistema. Sin embargo, viendo la documentación veo que solo se pueden extraer 1000 y no he encontrado algún tipo de paginación en esta vista para extraer toda la data. Alguna recomendación ? Tengo aprox. medio millón de registros.

Gracias de antemano por su apoyo y tiempo !

Hi @EduHuiza, one possible solution to fetch consecutive data using scroll API is to make use of X-MD-TOKEN.In the first scroll request, the X-VTEX-MD-TOKEN token will be obtained in the header.
Then pass this MD-Token, in the query params with key being “_token”. This token will persist for only 10 minutes and you can fetch consecutive data with this token.
Refer Link: Scroll documents
You can also check the image attached:

Regards,
Rakshit

Hey @Rakshit , Same usecase I do have…! Any solution for the same ?

As per suggested solution , it can hit 10 calls consecutively after that, it gives the error of “maximum hit reaches” and if we wait for this to be normal then again it gives the same result as earlier.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.