bulk operation | Community
Skip to main content
Level 3
Apr 12, 2022 2:58 PM UTC
Solved

bulk operation

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.
DEBAL_DAS
DEBAL_DASAccepted solution
New Participant
Apr 12, 2022 5:09 PM UTC

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?

 

 

4 replies

DEBAL_DAS
New Participant
Apr 13, 2022 5:41 PM UTC

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.

 

Translate
arunpatidar
New Participant
Apr 14, 2022 7:18 AM UTC

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

 

Translate
Arun Patidar
DEBAL_DAS
DEBAL_DASAccepted solution
New Participant
Apr 12, 2022 5:09 PM UTC

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?

 

 

Translate
arunpatidar
New Participant
Apr 12, 2022 3:56 PM UTC

Hi,

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

Translate
Arun Patidar