Get information about the Navigation Menu Editors developer resources

JavaScript API

In einigen Fällen ist es nötig das Menü an anderen Stellen der Seite einzufügen oder das Markup für das Menü selbst zu erzeugen. Dafür gibt es eine JavaScript-Komponente, mit der die MenüStruktur für den aktuellen Nutzer als HTML-Markup oder im JSON-Format bezogen werden kann.

/**
 * Get the JSON representation for the menu of the current user.
 * @param callback Function to process JSON, e.g. processJSON(Object menuJson){ ... }
 */
SeibertMedia.MenuEditor.MenuBuilder.buildJsonMenu(function callback)

Navigation Menu Editor REST API

ResourceDescriptionPermission
GET menueditor/1.0/menuReturns the navigation structure in JSON formatEveryone

GET menueditor/1.0/menu/unfiltered

Returns the unfiltered navigation structure in JSON formatAdmins, Editors
GET menueditor/1.0/menu/backup/{backupKey}Returns the backuped navigation structure in JSON formatAdmins, Editors
DELETE menueditor/1.0/lockservice/unlockEnds the locked session of the current menu editorEveryone
ResourceDescriptionPermission
GET menueditor/1.0/configurationRetrieve the list of fields, that are configured for filteringEveryone
GET linchpin/1.0/fieldsReturns the possible user fieldsEveryone
GET linchpin/1.0/cupinstalledChecks Custom User Profile Plugin is installedEveryone
ResourceDescriptionPermission
GET menueditor/1.0/permissions/checkReturns true or false if the current logged in user has permission to edit the navigation structureEveryone

GET menueditor/1.0/permissions

Get a list of all permitted users and groupsAdmin
POST menueditor/1.0/permissionsGrant edit permission to a user or groupAdmin
DELETE menueditor/1.0/permissions/{name}Revoke edit permission of a user or groupAdmin

GET linchpin/1.0/profile

Get the user profile data of a userEveryone

Resource URL: <HOST><CONTEXT>/rest/menueditor/1.0/menu

filter0

Specifies the value for the first set up user field.
e.g. If you have set up the Confluence locale as your first user field, you might set filter0=en_GB to get the navigation structure for an english user.

filter1Same as above. Filter value for the second set up user field.
filter2Same as above. Filter value for the third set up user field.
{
   "entries":[
      {
         "title":"Kategorie 1",
         "type":"category",
         "targetBlank":false,
         "menu":{
            "entries":[
               {
                  "title":"Item 1.1",
                  "link":"http://www.example.com",
                  "type":"entry",
                  "targetBlank":false
               },
               {
                  "title":"Item 1.2",
                  "link":"http://www.example.com",
                  "type":"entry",
                  "targetBlank":false
               },
               {
                  "title":"Kat 1.3",
                  "type":"category",
                  "targetBlank":false
               },
               {
                  "title":"Item 1.5 (mit Unterelementen)",
                  "link":"http://www.example.com",
                  "type":"entry",
                  "targetBlank":false,
                  "menu":{
                     "entries":[
                        {
                           "title":"Kat 1.5.1",
                           "type":"category",
                           "targetBlank":false
                        },
                        {
                           "title":"Item 1.5.2",
                           "link":"http://www.example.com",
                           "type":"entry",
                           "targetBlank":false
                        }
                     ]
                  }
               }
            ]
         }
      },
      {
         "title":"Kategorie 2",
         "type":"category",
         "targetBlank":false,
         "menu":{
            "entries":[
               {
                  "title":"Item 2.1",
                  "link":"http://www.example.com",
                  "type":"entry",
                  "targetBlank":false
               },
               {
                  "type":"separator",
                  "targetBlank":false
               },
               {
                  "title":"Item 2.3",
                  "link":"http://www.example.com",
                  "type":"entry",
                  "targetBlank":false
               },
               {
                  "title":"Item 2.4 (ohne Link)",
                  "link":"",
                  "type":"entry",
                  "targetBlank":false
               }
            ]
         }
      }
   ]
}

Resource URL: <HOST><CONTEXT>/rest/menueditor/1.0/menu/unfiltered

-

Have a look at GET menueditor/1.0/menu

Resource URL: <HOST><CONTEXT>/rest/menueditor/1.0/menu/unfiltered

-

Have a look at GET menueditor/1.0/menu

Resource URL: <HOST><CONTEXT>/rest/menueditor/1.0/lockservice/unlock

-

null

Resource URL: <HOST><CONTEXT>/rest/menueditor/1.0/configuration

-

[
	"confluece.locale",
	"cup.location-5",
	"cup.department-7"
]

Resource URL: <HOST><CONTEXT>/rest/linchpin/1.0/fields

-

[
  {
    "userFieldBK": "confluence.name",
    "labelPropertyKey": "Name"
  },
  {
    "userFieldBK": "confluence.email",
    "labelPropertyKey": "Email"
  },
  {
    "userFieldBK": "confluence.fullname",
    "labelPropertyKey": "Fullname"
  },
  {
    "userFieldBK": "confluence.locale",
    "labelPropertyKey": "Locale"
  }
]

Resource URL: <HOST><CONTEXT>/rest/linchpin/1.0/cupinstalled

-

false

Resource URL: <HOST><CONTEXT>/rest/menueditor/1.0/permissions/check

-

{
    "permitted":true
}

Resource URL: <HOST><CONTEXT>/rest/menueditor/1.0/permissions

-

{
  "permissions": [
    {
      "name": "editor",
      "type": "user",
      "fullname": "Eddi Editor"
    },
	{
	 "name": "Editors",
	 "type": "group"
	}
  ]
}

Resource URL: <HOST><CONTEXT>/rest/menueditor/1.0/permissions

nameName of the user or group that should be permitted to edit the menu
{
  "permissions": [
    {
      "name": "editor",
      "type": "user",
      "fullname": "Eddi Editor"
    },
	{
	 "name": "Editors",
	 "type": "group"
	}
  ]
}

Resource URL: <HOST><CONTEXT>/rest/menueditor/1.0/permissions/{name}

nameName of the user or group that should be removed
{
  "permissions": [
    {
      "name": "editor",
      "type": "user",
      "fullname": "Eddi Editor"
    },
	{
	 "name": "Editors",
	 "type": "group"
	}
  ]
}

Resource URL: <HOST><CONTEXT>/rest/linchpin/1.0/profile

{
  "confluence.fullname": "admin",
  "confluence.name": "admin",
  "confluence.locale": "de_DE",
  "confluence.email": "admin@example.com"
}
  • No labels

This content was last updated on 06/23/2015.

This content hasn't been updated in a while. That doesn't have to be a problem. Some of our pages live for years without becoming obsolete. Please click this link if you want us to update this page. Old content can be incorrect, misleading or outdated. Please get in contact with us via a form on this page, our live chat or via email with content@seibert.group if you are in doubt, have a question, suggestion, or want changes from us.