Skip to content

fmeschbe/rest-api-browser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API Asset Browse

An asset browser based on the REST API at /api.json

Getting started

Start an AEM 6.1 instance at http://localhost:4502

Optional: Browsing content will work out of the box. However, content modifications require the following re-configuration. Login and change the configuration of AEM's CSRFFilter to allow all methods. This can be achieved by setting the Filter Methods field (filter-methods) to the string NONE. Note that removing all filters methods will cause the default to be activated and thus filter out POST, PUT and DELETE methods.

Run the following commands:

# install all required dependencies
npm install

# run the app on a gulp's built-in server
npm run serve

A browser should automatically open, showing http://localhost:9000/#/browser/assets

The grunt server proxies the requests to the AEM instance and automatically logs in using the default credentials admin:admin.

Asset Select

The browser implements a mechanism to inject content urls into other applications. In order to use this feature, the browser needs to be opened in a new window from another app and a callback named insertImage(url) needs to be defined in the opener window. Take a look at apps/asset-select.html and http://localhost:9000/asset-select.html for a basic working example.

About

An asset browser based on the REST API at /api.json

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 79.5%
  • HTML 16.8%
  • CSS 3.7%