Skip to content

Instantly share code, notes, and snippets.

{
"menu-test1_google": {
"weight": 500000,
"icon": "/google/icons/google.png",
"title": "Google Apps"
},
"menu-test1_google-webmail": {
"parent": "menu-test1_google",
"weight": 10,
"title": "Webmail",
{
"menu-sub-menu-item": {
"parent": "menu-parent-item",
}
}
{
"ribbon-test1_training": {
"weight": 500000,
"icon": "/icons/training.png",
"title": "Training"
}
}
{
"menu-customers": {
"title": "Members"
}
}
{
"menu-**Existing menu item name** ": {
"title": "**New item name**"
}
}
var f = BCAPI.Models.FileSystem.Root.file('hello_world.txt');
f.destroy().done(function() {
console.log('File was destroyed');
});
var f = BCAPI.Models.FileSystem.Root.file('hello_world.txt');
var data = 'Hello World !';
f.upload(data).done(function () {
console.log('File uploaded succesfully');
});
var apps = new BCAPI.Models.WebApp.AppCollection();
apps.fetch({
success: function (webAppItems) {
//Do something for each of the webapps found
},
error: function (webAppItems, xhr) {
// handle errors
}
});
// Perform the AJAX request (make sure you've set the access token
var request = $.ajax({
url: "/api/v2/admin/sites/current/tokens",
type: "DELETE",
headers: {
"Authorization": access_token
},
contentType: "application/json",
}); // Request successful, response is in "msg" variable
request.done(function (msg) {