Top Menu Entry
TopMenu is an API for registering entry in the Nextcloud Top Menu for ExApps. AppAPI takes responsibility to register TopMenu and proxy all requests to the ExApp.
Set Initial state
OCS endpoint: POST /apps/app_api/api/v1/ui/initial-state
Params
{
"type": "top_menu",
"name": "unique_name_of_top_menu",
"key": "key_name",
"value": "array with value(s)",
}
Remove Initial state
OCS endpoint: DELETE /apps/app_api/api/v1/ui/initial-state
Params
{
"type": "top_menu",
"name": "unique_name_of_top_menu",
"key": "key_name",
}
Add script
OCS endpoint: POST /apps/app_api/api/v1/ui/script
Params
{
"type": "top_menu",
"name": "unique_name_of_script",
"path": "Url to script, e.g.: js/ui_example-main",
"afterAppId": "optional value",
}
Remove script
OCS endpoint: DELETE /apps/app_api/api/v1/ui/script
Params
{
"type": "top_menu",
"name": "unique_name_of_script",
"path": "Url to script",
}
Add style
OCS endpoint: POST /apps/app_api/api/v1/ui/style
Params
{
"type": "top_menu",
"name": "unique_name_of_style",
"path": "Url to style, e.g.: css/my-style",
}
Remove style
OCS endpoint: DELETE /apps/app_api/api/v1/ui/style
Params
{
"type": "top_menu",
"name": "unique_name_of_style",
"path": "Url to style",
}