nextcloud/admin_notifications

Name: admin_notifications

Owner: Nextcloud

Description: ?? Allows admins to generate notifications for users via the console or an HTTP endpoint

Created: 2017-02-09 09:28:10.0

Updated: 2018-04-10 08:19:26.0

Pushed: 2018-03-01 11:48:10.0

Homepage: https://apps.nextcloud.com/apps/admin_notifications

Size: 68

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

?? App “admin_notifications” is obsoleted with Nextcloud 14 ??

The functionality of the “admin_notifications” app has been merged into the default notifications app for Nextcloud 14. You can savely uninstall and delete the “admin_notifications” app, because it does not do anything anymore.

The new documentation is in the notifications repository.

?? Admin notifications

Allows admins to generate notifications for users via the console or an HTTP endpoint

Console command
do -u www-data ./occ notification:generate \
min "Short message up to 255 characters" \
 "Optional: longer message with more details, up to 4000 characters"
Help
do -u www-data ./occ notification:generate --help
e:
tification:generate [options] [--] <user-id> <short-message>

ments:
er-id                          User ID of the user to notify
ort-message                    Short message to be sent to the user (max. 255 characters)

ons:
, --long-message=LONG-MESSAGE  Long mesage to be sent to the user (max. 4000 characters) [default: ""]
HTTP request
 -H "OCS-APIREQUEST: true" -X POST \
tps://admin:admin@localhost/ocs/v2.php/apps/admin_notifications/api/v1/notifications/admin \
 "shortMessage=Short message up to 255 characters" \
 "longMessage=Optional: longer message with more details, up to 4000 characters"
Help
 -H "OCS-APIREQUEST: true" -X POST \
tps://<admin-user>:<admin-app-password-token>@<server-url>/ocs/v2.php/apps/admin_notifications/api/v1/notifications/<user-id> \
 "shortMessage=<short-message>" \
 "longMessage=<long-message>"

n-user:                User ID of a user with admin priviliges
n-app-password-token:  Password or an "app password" of the "admin-user"
er-url:                URL with Webroot of your Nextcloud installation
-id:                   User ID of the user to notify
t-message:             Short message to be sent to the user (max. 255 characters)
-message:              Long mesage to be sent to the user (max. 4000 characters)
Return codes

Status | Description —— | ———– 200 | Notification was created successfully 400 | Too long or empty short-message, too long long-message 404 | Unknown user 500 | Unexpected server error 503 | Instance is in maintenance mode

Screenshot

Both the occ command and the HTTP request generate the same notification

Admin notification triggered from console


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.