Export JSON using FileVaultpackageExporter
This is my use-case:
1. I create some JSONs and upload it in /content/dam/fmdita-outputs
2. Whenever I create new/modify this JSON I want to have these JSON exported [using FileVaultpackageExporter as recommended by google].
I have setup my distribution agent that will basically POST the data [e.g action=ADD&path=%2Fcontent%2Fdam%2Ffmdita-outputs%2Fjson%2Fchild-map-1%2Fchild-map-1-topic_dita.json] to some path based servlet which in turn will process this JSON and then export the same using FileVaultpackageExporter.
I need help with the servlet - how to leverage the FileVaultpackageExporter to have the JSON exported.
Also, I get error as and when I try to distribute any data by making post call to a sample POST servlet. But it works when I setup a dummy node server.
An error has occurred while attempting to deliver test package. [org.apache.sling.distribution.common.RecoverableDistributionException: not enough rights for http://localhost:4502/bin/distribution/json-exporter]
Note : I tried using admin user but that did not get delivered also.
This is my distribution agent config :
{
"name": "json-exporter",
"enabled": true,
"queue.processing.enabled": true,
"allowed.roots": ["/content"],
"packageImporter.endpoints": [
"http://localhost:4502/bin/distribution/json-exporter"
],
"requestAuthorizationStrategy.target": "(name=default)",
"transportSecretProvider.target": "(name=default)"
}