Whatever message this page gives is out now! Go check it out!

RestInitApplication

Last update:
May 18, 2026

Description

Registers the directory path with the service mapping provided. If no service mapping is provided, the application name is used. If the rest application is already registered, it is refreshed.

Returns

Nothing

History

ColdFusion (2018 release): Introduced named parameters.
ColdFusion 11: Added the options parameter.
ColdFusion 10: Added this function.

Syntax

RestInitApplication( path [, serviceMapping, options] )

Parameters

Parameter
Description
path
Required. Path to the directory to be registered.
serviceMapping
Optional. Alternate string to be used for application name while calling the REST service.
options
Optional. Additional options passed for initializing the application.
  • "host" - The application will be registered for the particular host.
  • " useHost " - true/false - The application will extract the host from the URL and it will be used as the host name.
  • " isdefault " - Specifies whether the application should be registered as a default application or not. For accessing a default application, the URL should not contain the application name.

Example

restInitApplication( dirPath=expandPath('path/to/REST/api'),serviceMapping='api');

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page