Skip to content

Instantly share code, notes, and snippets.

@dgundi
dgundi / current.js
Last active December 27, 2015 13:09
var request = $.ajax({
url: "/api/v2/admin/sites/current/webapps/Some_sample_app/items",
type: "POST",
headers: {
"Authorization": access_token
},
contentType: "application/json",
data: '{ "name": "MyWebAppItem" }'
}); // Request successful, response is in "msg" variable
request.done(function (msg) {
{
"menu-customers": {
"title": "Members"
},
"menu-useful_stuff": {
"weight": 11000,
"icon": "/AdminConsole/static/images/icons/webforms.png",
"title": "Useful links"
},
"menu-useful_pages": {
{
"menu-webapps-posts": {
"visible": false,
"applyIf": {
"menusExist": ["menu-webapps-posts"],
"userHasRoles": ["Business Owner"]
}
},
"menu-webapp-authors": {
"visible": false,
{
"menu-my_agency_blog": {
"weight": 25200,
"icon": "/blog/icons/blog.png",
"title": "Blog"
},
"menu-my_agency_blog-posts": {
"parent": "menu-my_agency_blog",
"weight": 10,
"title": "Posts",
{
"menu-my_agency_blog-authors": {
"parent": "menu-my_agency_blog",
"weight": 20,
"title": {
"en": "Authors",
"fr": "Les authors"
},
"attr": {
"href": {
{
"menu-settings-site-map": {
"visible": false
}
}
{
"menu-**Existing menu item name**": {
"visible": false
}
}
{
"menu-reports": {
"weight": 11000
}
}
{
"menu-": * * Existing menu item name * * {
"weight": * * 1234 * *
}
}