AEM Cloud Service - Run Assets Bulk Import Using PostMan | AEM Community Blog Seeding | Adobe Higher Education
Skip to main content
kautuk_sahni
Community Manager
Community Manager
June 21, 2023

AEM Cloud Service - Run Assets Bulk Import Using PostMan | AEM Community Blog Seeding

  • June 21, 2023
  • 4 risposte
  • 960 visualizzazioni

BlogImage.jpg

AEM Cloud Service - Run Assets Bulk Import Using PostMan by Sreekanth Choudry Nalabotu

Abstract

Kickoff Bulk Import from AEM

@Reference
private SlingRequestProcessor slingRequestProcessor;

@Reference
private RequestResponseFactory requestResponseFactory;

private static final String IMPORT_JOB_URL = "/conf/global/settings/dam/import/bulk-import-config-name.importJob.json";

private void runBulkImport(final ResourceResolver resolver){
final Map<String, Object> requestParams = new ConcurrentHashMap<>();
requestParams.put("operation", "run");

final HttpServletRequest request = requestResponseFactory.createRequest("POST", IMPORT_JOB_URL,
requestParams);
final ByteArrayOutputStream bos = new ByteArrayOutputStream();

final HttpServletResponse response = this.requestResponseFactory.createResponse(bos);
try {
slingRequestProcessor.processRequest(request, response, resolver);
} catch (ServletException | IOException e) {
logger.error("Error while running bulk import ", e);
}
}

Read Full Blog

AEM Cloud Service - Run Assets Bulk Import Using PostMan

Q&A

Please use this thread to ask the related questions.

Questo argomento è stato chiuso alle risposte.

4 risposte

MayurSatav
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 21, 2023

Thank you for sharing. I'm curious to know if it is compatible with AWS S3?

kautuk_sahni
Community Manager
Community Manager
June 21, 2023

@mayursatav , as per my conversation with Sreekanth, It should work with S3 as well. 

HTH

Kautuk Sahni
Rohan_Garg
Community Advisor
Community Advisor
July 20, 2023

Is this support also available for other cloud solutions as well ? (Besides Azure and S3)

Nilesh_Mali
Level 3
July 29, 2023

This is a great read and a very useful use case!!