Hello there,
I extracted a page content configuration by adding the suffix "infinity.json", then I did a curl to that page to extract this JSON to a file.
Can I somehow edit this JSON and upload it again in order to update the content with a curl or a fetch?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @caradeotario ,
That's not recommended
as@Sudheer_Sundalam suggested, have a process for content updating with proper user permissions and you can export data as JSON.
Thanks,
Aditya Chabuku
Hi @caradeotario ,
You could achieve this by updating JCR Node property.
eg.
curl -v -u admin:admin -X POST http://localhost:4502/content/mysite/jcr:content --data-urlencode 'isCurlWorking=true'
Hope that helps!
Regards,
Santosh
Hi @SantoshSai ,
What If i need to update multiple properties?
Is there a way to use the json file that I edited with all the properties?
Thanks for your answer!
@caradeotario - In that case (making multiple edits), I would prefer Bulk Editor:
The Bulk Editor allows for efficient editing when the visual page context is not needed. Kindly refer below articles for more details:
[2]: https://www.dlighthouse.co/2018/11/using-aem-bulk-editor.html
Not sure if I could use that. The points is to have a "Content as Code" and whenever I want to change something I just had to upload the json. Is that somehow feasible?
Hi @caradeotario ,
That's not recommended
as@Sudheer_Sundalam suggested, have a process for content updating with proper user permissions and you can export data as JSON.
Thanks,
Aditya Chabuku
I wonder what could be the use case where you want to update the page content using the curl command when the same page can be authored via page editor. With or without curl, you would need same level of user permission to update the content nodes.
If the content nodes of a page needs to be updated based on an event/schedule, I would read the nodes in an OSGI service and update them accordingly using a system_user where I will more control over the nodes and permissions.
Just a thought!
Hello @caradeotario
The curl and Bulk Editor options have already been suggested by @SantoshSai and @Aditya_Chabuku .
Requesting you please check the "Data Importer" on https://adobe-consulting-services.github.io/acs-aem-commons/features/mcp-tools/data-importer/index.h...
- This utility allows you to import data from a spreadsheet into AEM.
- It should allow you to update multiple metadata via excel
Views
Likes
Replies