JSON API » menus » menus/update

Updates an existing menu.

Input parameters

Requires authentication and the menus role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
idIntegerID of menu to update.Yes
configStringOnly display menu if this Configuration key is enabled. Empty string for none.NoCurrent value.
descriptionStringDescription.NoCurrent value.
featuresStringOnly display menu if any of these rate plan features are allowed. Separate with commas. Empty string for any.NoCurrent value.
iconStringIcon URL. Only used if parent=0.NoCurrent value.
languageStringOnly display menu if user is set to this language key. Empty string for any.NoCurrent value.
nameStringName as displayed to users.NoCurrent value.
parentIntegerID of parent menu. 0 for top-level menu.NoCurrent value.
pathStringURL path when clicked.NoCurrent value.
planIntegerOnly display menu if user is on this rate plan. 0 for any.NoCurrent value.
plan_recursiveIntegerOnly display menu if user is on this rate plan, recursively. 0 for any.NoCurrent value.
rankIntegerOrder to show menu in. 1 for first, 100 for last.NoCurrent value.
rolesStringOnly display menu if any of these role privileges are allowed. Separate with commas. Empty string for any.NoCurrent value.
specialStringOnly display menu if special condition is met. Normally empty string.NoCurrent value.
tagStringTag as referenced in code.NoCurrent value.
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
201Input passed validation. Only returned if validation=1.
204Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
404The menu does not exist.

Data returned

No data is returned.

Example: Changing the name

http://enswitch.example.com/api/json/menus/update/?auth_username=user;auth_password=password;id=123;name=example

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Change history

VersionChanges
3.13Function added.