Importing assets using ACS Commons URL Asset Import | Community
Skip to main content
Level 2
June 18, 2022

Importing assets using ACS Commons URL Asset Import

  • June 18, 2022
  • 2 replies
  • 1568 views

Hi Team,
Our requirement is to import assets presents in network mounted drive. We decided to use ACS Commons URL Asset Import. This fits to our requirement and importing assets in lower environment.

But in higher environments, We can't perform any step manually. Everything has to be done either using some job or some utility. We are not allowed to create/start process manually. 
Is there any way I can trigger URL Asset Import by using API or some other means.

Any help/approach please

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

2 replies

sunil_kumar_
Level 5
June 19, 2022

Hi @jnmatthew ,
You can execute this using curl or rest call using any client ex.  postman

jnmatthewAuthor
Level 2
June 20, 2022

@sunil_kumar_could you please share sample curl. Or there is any process to get curl

sunil_kumar_
Level 5
June 20, 2022

@jnmatthew This has been tested on MAC/Terminal. May need to adjust as per OS/Terminal in case you face encoding related issue. 

curl -u admin:admin POST 'http://localhost:4502/apps/acs-commons/content/manage-controlled-processes/jcr:content.start.json' \
--form 'definition="URL Asset Import"' \
--form 'retryPause="200"' \
--form 'dryRunMode="true"' \
--form 'jcrBasePath="/content/dam"' \
--form 'importFile=@"/Users/<your-path-to-file>/url-asset-import-example.xlsx"' \
--form 'filename="url-asset-import-example.xlsx"' \
--form 'defaultPrefix="nfile"' \
--form 'timeout="30000"'

I used only required parameters. Add other parameters as per your need.

ShaileshBassi
Community Advisor
Community Advisor
June 20, 2022

@jnmatthew Sample curl command to execute the servlet :

curl -u <username>:<password> -i -XPOST http://<domain-name>:<domain-port>/<servlet-path>

and if you want to pass the file along with it, you can use:

curl -u <username>:<password> -i -XPOST -F "file=@<filepath>" http://<domain-name>:<domain-port>/<servlet-path>

Some of the other examples of the curl commands can be found in the below link:

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

Thanks

jnmatthewAuthor
Level 2
June 20, 2022