bulk operation | Community
Skip to main content
April 12, 2022
Solved

bulk operation

  • April 12, 2022
  • 3 replies
  • 1084 views

Hi,

I want to perform CRUD bulk operation on asset with a single action via API call using postman. 

How can this be achieved?

 Thanks in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by DEBAL_DAS

1. We can achieve this using AEM servlet(post request) via postman .

    Steps are defined here https://aem4beginner.blogspot.com/access-aem-servlet-in-postman

     and we need to add custom logic to perform bulk operation in that servlet.

 

2. We can use groovy script to perform bulk operation.

 

Are you planning to publish assets after CRUD bulk operation?

 

 

3 replies

arunpatidar
Community Advisor
Community Advisor
April 12, 2022

Hi,

What kind of operations are you planning to perform? Could you please explain with examples?

Arun Patidar
DEBAL_DAS
DEBAL_DASAccepted solution
April 12, 2022

1. We can achieve this using AEM servlet(post request) via postman .

    Steps are defined here https://aem4beginner.blogspot.com/access-aem-servlet-in-postman

     and we need to add custom logic to perform bulk operation in that servlet.

 

2. We can use groovy script to perform bulk operation.

 

Are you planning to publish assets after CRUD bulk operation?

 

 

DEBAL_DAS
April 13, 2022

I have tried to execute below operation on asset from postman-

Update asset metadata

Updates the asset metadata properties. If you update any property in the dc: namespace, the API updates the same property in the jcr namespace. The API does not sync the properties under the two namespaces.

Request: PUT /api/assets/myfolder/myAsset.png -H"Content-Type: application/json" -d '{"class":"asset", "properties":{"jcr:title":"My Asset"}}'

 

Here is my postman entries with status code:200 -

 

property got added at jcr:content node as shown below -

 

Here I am able to update only one asset.

To perform bulk CRUD operation, I feel we can have custom logic to perform bulk operation from servlet if it is essential to use postman.

@arunpatidar , please correct me.

 

arunpatidar
Community Advisor
Community Advisor
April 14, 2022

Yeah that's true but for bulk operations following can be explored and API can be checked to do bulk operations

https://experienceleague.adobe.com/docs/experience-manager-64/assets/managing/managing-multiple-assets.html?lang=en

 

Arun Patidar