Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Moving assets to PIM system - HTTP API the correct choice

Avatar

Level 1

I am creating an integration between the AEM system and our PIM system.  What I want to accomplish is I want to be able to "monitor" a particular folder structure and if an asset is moved to this folder or any subfolders I want to download it and upload it into our PIM system.  I need basically two capabilities:

1. A way to do a quick query to say are there any assets (other than folders) in a given folder

2. Download any of those assets

 

I have been through the documentation and it seems the HTTP Asset API seems like the most logical choice but I don't see an easy way to achieve #1 without manually iterating the folder structure I want to monitor and do a list contents call checking for assets.  This does not seem like a good choice.  Is there an easier way to do such a query?  Is the Http Assets API not the way to do it?

 

I should add that this is AEM 6.5 on premise not the cloud service.

 

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi, 

There are multiple ways to achieve what you are trying to do. I would suggest discarding the query approach and instead using a Workflow Launcher that triggers a Workflow upon a new asset being added or created. This will initiate a custom workflow that provides you with the asset path, allowing for various possibilities. You could directly POST from the workflow to your PIM, or you could implement an external process responsible for posting to the PIM, which the workflow could invoke.

 

You can read more about WF Launchers here: https://experienceleague.adobe.com/en/docs/experience-manager-65/content/sites/administering/operati...

https://medium.com/@toimrank/aem-launcher-3358aef72d8c

And here about custom step workflows: https://medium.com/@toimrank/aem-custom-workflow-process-step-56e176f8f067 

https://experienceleague.adobe.com/en/docs/experience-manager-learn/forms/adaptive-forms/custom-proc...

 

Hope this helps.



Esteban Bustamante

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi, 

There are multiple ways to achieve what you are trying to do. I would suggest discarding the query approach and instead using a Workflow Launcher that triggers a Workflow upon a new asset being added or created. This will initiate a custom workflow that provides you with the asset path, allowing for various possibilities. You could directly POST from the workflow to your PIM, or you could implement an external process responsible for posting to the PIM, which the workflow could invoke.

 

You can read more about WF Launchers here: https://experienceleague.adobe.com/en/docs/experience-manager-65/content/sites/administering/operati...

https://medium.com/@toimrank/aem-launcher-3358aef72d8c

And here about custom step workflows: https://medium.com/@toimrank/aem-custom-workflow-process-step-56e176f8f067 

https://experienceleague.adobe.com/en/docs/experience-manager-learn/forms/adaptive-forms/custom-proc...

 

Hope this helps.



Esteban Bustamante

Thank you for your suggestions!  I will look into these approaches and see if this will work for us.