JSON API » menus » menus/update
Updates an existing menu.
Input parameters
Requires authentication and the menus role privilege.
| Name | Type | Description | Required | Default value |
|---|---|---|---|---|
| auth_username | String | Authentication username. | Yes | |
| auth_password | String | Authentication password. | Yes | |
| id | Integer | ID of menu to update. | Yes | |
| config | String | Only display menu if this Configuration key is enabled. Empty string for none. | No | Current value. |
| description | String | Description. | No | Current value. |
| features | String | Only display menu if any of these rate plan features are allowed. Separate with commas. Empty string for any. | No | Current value. |
| icon | String | Icon URL. Only used if parent=0. | No | Current value. |
| language | String | Only display menu if user is set to this language key. Empty string for any. | No | Current value. |
| name | String | Name as displayed to users. | No | Current value. |
| parent | Integer | ID of parent menu. 0 for top-level menu. | No | Current value. |
| path | String | URL path when clicked. | No | Current value. |
| plan | Integer | Only display menu if user is on this rate plan. 0 for any. | No | Current value. |
| plan_recursive | Integer | Only display menu if user is on this rate plan, recursively. 0 for any. | No | Current value. |
| rank | Integer | Order to show menu in. 1 for first, 100 for last. | No | Current value. |
| roles | String | Only display menu if any of these role privileges are allowed. Separate with commas. Empty string for any. | No | Current value. |
| special | String | Only display menu if special condition is met. Normally empty string. | No | Current value. |
| tag | String | Tag as referenced in code. | No | Current value. |
| validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
Responses
| Code | Description |
|---|---|
| 201 | Input passed validation. Only returned if validation=1. |
| 204 | Success. |
| 400 | Invalid input parameters specified. Check the key and message fields for more details. |
| 401 | The authentication details provided are invalid. |
| 402 | Your role does not allow this. |
| 404 | The 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
| Version | Changes |
|---|---|
| 3.13 | Function added. |
