restInitApplication

Scans all the CFCs in dirPath, and places those that are REST enabled at the serviceMapping URL. Requires the web admin password under Lucee.

restInitApplication(dirPath,serviceMapping,default,password) → returns void

Argument Reference

dirPath string
Required

The path to a folder of CFCs to scan. Should be a full file system path

serviceMapping string
Required

The root of the exposed API, minus the server-wide prefix. E.g. to expose at '/rest/api/' you should set this to 'api'.

default string

If the mapping is a default mapping set this to true (Lucee only)

password string
Required

The password for the web admin (Lucee only)

Examples
Sample code invoking the restInitApplication function

restInitApplication( dirPath=expandPath('./cfcs/api/'),serviceMapping='api',password='password' )

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub