Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Wrapper API to provide remote access to setter functions in the ColdFusion Administrator API.
Branch: master

This branch is 13 commits behind nmische:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
api
tests/mxunit
README.md
build.xml
index.cfm

README.md

ColdFusion Configuration Manager

The ColdFusion Configuration Manager provides remote access to setter functions in the ColdFusion Administrator API via a very simple wrapper API.

Installation

Download the configmanager.zip file and extract to a folder named configmanager under the ColdFusion Administrator directory. You can optionally create a link to the extension by adding the following to the Administrator's custommenu.xml.

<submenu label="Configuration Manager">
    <menuitem href="configmanager/index.cfm" target="content">Recent Changes</menuitem>
</submenu>

For more information see the Custom Extensions section of the ColdFusion Administrator documentation.

Usage

To set a configuration value simply post a JSON document to /CFIDE/administrator/configmanager/api/index.cfm including administrator credentials via basic authentication. The JSON document should identify the administrator api component, method, and method invocation arguments. For example, to call the runtime.cfc's setCacheProperty method with and argument collection of { propertyName="TrustedCache", propertyValue=true } you would post the following JSON.

{ 
    "runtime" : { 
        "cacheProperty" : [ 
            {"propertyName" : "TrustedCache", "propertyValue" : true } 
        ]
    }
}

The top level key, runtime in the above example, identifies the administrator api component. The second level key, cacheProperty in the above example, identifies the setter method to call on the administrator api component. This key contains an array of invocation arguments that will be passed to the method, so you can invoke a method several times if necessary. For example, the follow JSON document will invoke the runtime.setCacheProperty method four times, setting four distinct property values.

{ 
    "runtime" : { 
        "cacheProperty" : [ 
            {"propertyName" : "TrustedCache", "propertyValue" : true },
            {"propertyName" : "InRequestTemplateCache", "propertyValue" : true },
            {"propertyName" : "ComponentCache", "propertyValue" : true },
            {"propertyName" : "CacheRealPath", "propertyValue" : true } 
        ]
    }
}

You can also call multiple admin components as in the following example.

{ 
    "runtime" : { 
        "cacheProperty" : [ 
            {"propertyName" : "TrustedCache", "propertyValue" : true } 
        ]
    },
    "extensions" : {
        "mapping" : [
            {"mapName" : "\/test", "mapPath" : "C:\/test" }
        ]
    }
}

NOTE: The remote API relies on basic authenication, and as such should be accessed via HTTPS.

Something went wrong with that request. Please try again.