Moving assets to PIM system - HTTP API the correct choice | Community
Skip to main content
Level 2
July 8, 2024
Solved

Moving assets to PIM system - HTTP API the correct choice

  • July 8, 2024
  • 1 reply
  • 1793 views

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.

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 EstebanBustamante

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/operations/workflows-starting#workflows-launchers

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-process-step-aem-workflow

 

Hope this helps.

1 reply

EstebanBustamante
Community Advisor and Adobe Champion
EstebanBustamanteCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
July 9, 2024

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/operations/workflows-starting#workflows-launchers

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-process-step-aem-workflow

 

Hope this helps.

Esteban Bustamante
Level 2
July 9, 2024

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