Adobe 38043755 - ColdFusion Enterprise - Mac Administration Manual page 71

Configuring and administering
Hide thumbs Also See for 38043755 - ColdFusion Enterprise - Mac:
Table of Contents

Advertisement

CONFIGURING AND ADMINISTERING COLDFUSION 10
Using the ColdFusion Administrator
The adminapi directory also contains an Application.cfm file and two subdirectories.
Note: If you are using sandbox security, enable access to the cf_web_root/CFIDE/adminapi directory to use the
Administrator API.
Following are the styles of methods in the Administrator API:
When setting complex or varied values, the Administrator API uses method arguments.
Method arguments
Getting and setting simple values
API uses get and set property methods.
To view the methods, method arguments, and documentation for the Administrator API CFCs, use the CFC Explorer.
For example, to view datasource.cfc when running in the server configuration, open a browser to
http://localhost:8500/CFIDE/adminapi/datasource.cfc.
Use the Administrator API
1
Instantiate administrator.cfc:
<cfscript>
// Login is always required.
adminObj = createObject("component","cfide.adminapi.administrator");
Note: You can instantiate administrator.cfc and call the
example shows:
createObject("component","cfide.adminapi.administrator").login("admin");
Note: You can log in as a user other than administrator, but with proper permissions, as follows. Provide the user
name after the password.
createObject("component","cfide.adminapi.administrator").login("#password#","#username#")
Call the administrator.cfc
2
adminObj.login("admin");
3
Instantiate the desired CFC:
myObj = createObject("component","cfide.adminapi.debugging");
4
Call the desired CFC method (this example enables debugging):
myObj.setDebugProperty(propertyName="enableDebug", propertyValue="true");
Examples
The following example adds a SQL Server data source:
When setting simple values, such as true or false debug settings, the Administrator
method, passing the ColdFusion Administrator password or the RDS password:
login
Last updated 7/9/2012
method in a single line of code, as the following
login
66

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 10

Table of Contents