I need curl command to display list of queued agents in AEM author and publisher using Linux scripting. If someone have idea please share.
Thank you.
Solved! Go to Solution.
Views
Replies
Total Likes
To clarify, you cannot achieve this with a single request. Instead, you need to follow a series of steps. As I mentioned in my previous answer, first, you should query all the available agents. Then, use the dynamically retrieved agents to gather their details. With that information, you can refine and produce whatever output or formatted response you need. You’ll need to incorporate these steps into a Bash script and use curl
as necessary to implement your desired outcome.
I hope this helps!
Hi,
Could you elaborate on what you are trying to achieve? Are you looking to see which agents are full or empty? Is this specifically related to replication agents?
One way to accomplish this is to build your own service (servlet) that returns the information you need in the desired format, which you can then invoke from your Linux script. In the servlet, you have access to the Agent Interface, allowing you to check aspects like the queue: Agent Interface Documentation. Depending on your requirements, you can also use other OOTB Java APIs to build your service.
Servlet reference:
https://medium.com/@toimrank/aem-sling-servlet-ca9e5926a384
https://www.youtube.com/watch?v=ZAlR0nPdpSI&ab_channel=AEMGEEKS
Hope this helps
Thank for the response.
But i have the requirement to display the queued or blocked agents names and count using Linux scripting for the AEM author and publisher. So I am expecting curl command to get all blocked agents list from server.
And i need to know we can archive or not for this in Linux scripting.
Yes, you can use the following URLs to achieve what you need:
These will give you the list of agents: http://aemHost:port/etc/replication/agents.author.2.json
and http://aemHost:port/etc/replication/agents.publish.2.json
. These endpoints will provide all the agents, and from here, you will need to filter out which ones are "enabled."
You can build new requests based on the results from step 1, following this format: http://aemHost:port/etc/replication/agentLocation/nameOfTheAgent/jcr:content.queue.json?agent=nameOf...
, where agentLocation
is either agents.author
or agents.publish
, and nameOfTheAgent
is the name of the agent.
For example: http://aemHost:port/etc/replication/agents.author/publish/jcr:content.queue.json?agent=publish
.
Based on the above request, you can count and check the status of the agents to see if they are blocked or queued.
Hope this helps
Hi EstebanBustamante,
I reviewed above comments and i am able to check the status using below command for single agent.
http://aemHost:port/etc/replication/agents.author/publish/jcr:content.queue.json?agent=publish
But my expectation is to check dynamic for all the queued agents list
present under publisher location(/etc/replication/agents.publish).
Note: I have large no.of agents under publisher.
To clarify, you cannot achieve this with a single request. Instead, you need to follow a series of steps. As I mentioned in my previous answer, first, you should query all the available agents. Then, use the dynamically retrieved agents to gather their details. With that information, you can refine and produce whatever output or formatted response you need. You’ll need to incorporate these steps into a Bash script and use curl
as necessary to implement your desired outcome.
I hope this helps!
Thanks for your suggestion. I will work on it.
Did you check this documentation - https://experienceleague.adobe.com/en/docs/experience-manager-65/content/sites/administering/operati...
Hi Narendiran,
Thanks for your response.
Yes. i have already viewed the article and mentioned only shingle agent status check.
But my expectation is to check dynamic for all the queued agents list
present under publisher location(/etc/replication/agents.publish).
Views
Likes
Replies