Add a page property using curl command | Community
Skip to main content
New Participant
May 31, 2023

Add a page property using curl command

  • May 31, 2023
  • 4 replies
  • 1657 views

Hi All,

I have a aem page(/content/xyz/page1) under page properties under advanced tab there is a searchable checkbox field, its unchecked, I want to make it as checked.

But in crxd I didnt see this property(searchable)

Actually I have so many pages and I need to update it to all page, I tried using curl command

curl -u admin:admin -Fsearchable="true" http://localhost:4502/content/xyz/page1

but its not updated, I didnt see that property in crxd.

 

Can anyone help me to fix this.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

Rohit_Utreja
New Participant
June 2, 2023

@vani1012 

please have a look at curl commands below.

https://experienceleague.adobe.com/docs/experience-manager-65/administering/operations/curl.html?lang=en

https://github.com/paulrohrbeck/aem-links/blob/master/curl_cheatsheet.md

 

Other than that, you can use groovy script to fetch details of the page and making modifications afterwrds.

Here is the link for your reference.

https://aemgeeks.com/aem-tools/use-groovy-script-in-aem/

 

I hope it helps!

aanchal-sikka
New Participant
June 1, 2023

Hello @vani1012 

Please visit https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/curl-command-to-set-property-on-the-page/td-p/414224

 

It contains few examples.

 

In the example you have shared, the path is only till page. We cannot add properties there. It should be the location of exact node like http://localhost:4502/content/xyz/page1/jcr:content

Aanchal Sikka
DPrakashRaj
New Participant
June 1, 2023

Doesn’t you need to update at jcr:content node as page property is stored at that level.

curl -u admin:admin -Fsearchable="true" http://localhost:4502/content/xyz/page1/jcr:content

 

Vani1012Author
New Participant
June 1, 2023

@dprakashraj 
I want to add a new property for aem pages which uses a specific template.

Can you please share curl command for it

Shiv_Prakash_Patel
New Participant
May 31, 2023
Shiv Prakash