RestInitApplication

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');
Adobe logo

Sign in to your account