This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
var APIUtility = getBean('settingsManager').getSite({siteid}).getAPI('json', 'v1'); | |
APIUtility.registerEntity(entityName='myCustomEntity', config={}); | |
</cfscript> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
var APIUtility = getBean('settingsManager').getSite({siteid}).getAPI('json', 'v1'); | |
APIUtility.registerMethod(methodName='applyProperty', method=applyProperty); | |
public any function applyProperty() { | |
// do something | |
} | |
</cfscript> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"status": "succes" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST https://yourdomain.com/{context}/index.cfm/_api/json/v1/?method=logout&siteid={siteid} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST https://yourdomain.com/{context}/index.cfm/_api/json/v1/{siteid}/logout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"targetparams":"", | |
"path":"00000000000000000000000000000000001,2C91A3B0-E375-9383-0B05636E6926868D", | |
"menutitle":"Testing", | |
"releaseDate":"", | |
"fileid":"", | |
"responsesendto":"", | |
"id":"2C91A3B0-E375-9383-0B05636E6926868D", | |
"type":"Page", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET https://yourdomain.com/{context}/index.cfm/_api/json/v1/?method=findone&site={siteid}&entityname={entityName}&id={id} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET https://yourdomain.com/{context}/index.cfm/_api/json/v1/{siteid}/{entityname}/{id} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getJSON('/index.cfm/json/v1/default/content/').then( | |
function( resp ) { | |
if ( 'error' in resp ) { | |
//handle error | |
} else { | |
//do stuff | |
} | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"error": { | |
"message": "Insufficient Account Permissions" | |
} | |
} |