Code Monkey home page Code Monkey logo

cf-configmanager's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.