这是基于vue-vben-admin 模板适用于abp vNext的前端管理项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1.8 KiB

LINGYUN.Abp.Notifications.HttpApi

The HTTP API module of the notification system, providing REST API interfaces for the notification system.

Features

  • Notification management API
  • Notification subscription API
  • Notification status management API
  • Support for API versioning
  • Support for Swagger documentation

Module References

[DependsOn(typeof(AbpNotificationsHttpApiModule))]
public class YouProjectModule : AbpModule
{
  // other
}

API Endpoints

NotificationController

  • GET /api/notifications/{id} - Get notification details
  • GET /api/notifications - Get notification list
  • DELETE /api/notifications/{id} - Delete notification
  • PUT /api/notifications/{id}/read - Mark notification as read
  • PUT /api/notifications/read - Mark all notifications as read

NotificationSubscriptionController

  • POST /api/notifications/subscriptions - Subscribe to notification
  • DELETE /api/notifications/subscriptions - Unsubscribe from notification
  • GET /api/notifications/subscribers - Get list of assignable subscribers
  • GET /api/notifications/subscriptions - Get list of subscribed notifications

Basic Usage

  1. Configure Startup
public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddApplication<YourHttpApiModule>();
    }

    public void Configure(IApplicationBuilder app)
    {
        app.InitializeApplication();
    }
}
  1. API Call Examples
# Get notification list
curl -X GET "https://localhost:44300/api/notifications"

# Subscribe to notification
curl -X POST "https://localhost:44300/api/notifications/subscriptions" \
     -H "Content-Type: application/json" \
     -d '{"notificationName":"YourNotification"}'

More Information