Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Accessing Replication agents through curl commands

Avatar

Level 1

I have a  requirement to access the custom replication agent(which will be created to publish out content until preview environment) through curl command.

I tried for direct activation(default publish replication agent) with below command

 

String[] command1 = { "curl", "--insecure", "-u", username + ":" + password, "-X", "POST", "-F",
                                         "path=" + pathForReplication, "-F", "cmd" + "=" + "activate", url };
 
                           executeCommand(command1);
                           System.out.println(command1.toString());
 
Requirement: Manually we need to initiate publish to preview workflow but though curl command how to access the replication agent(nothing but the workflow will link to preview replication agent)  which will send our content till preview environment.
1 Accepted Solution

Avatar

Correct answer by
Employee

You can get the status of the Replication Agent(as follows) and perform several other actions, such as creating a new one, deleting an existing one, etc.

curl -u admin:admin "http://localhost:4502/etc/replication/agents.author/publish/jcr:conten t.queue.json?agent=publish"
http://localhost:4502/etc/replication/agents.author/publish/jcr:content.queue.js on?agent=publish

 

Try this document:

https://docs.adobe.com/content/help/en/experience-manager-64/administering/operations/curl.html#repl...

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

You can get the status of the Replication Agent(as follows) and perform several other actions, such as creating a new one, deleting an existing one, etc.

curl -u admin:admin "http://localhost:4502/etc/replication/agents.author/publish/jcr:conten t.queue.json?agent=publish"
http://localhost:4502/etc/replication/agents.author/publish/jcr:content.queue.js on?agent=publish

 

Try this document:

https://docs.adobe.com/content/help/en/experience-manager-64/administering/operations/curl.html#repl...