[PR #1392] [CLOSED] FEAT : add get topic subscribers endpoint #1590

Closed
opened 2026-05-07 01:02:48 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/1392
Author: @MohamedElbashar
Created: 7/17/2025
Status: Closed

Base: mainHead: get-topic-subscribers-endpoint


📝 Commits (1)

  • 9ca2c32 FEAT : add get topic subscribers endpoint

📊 Changes

2 files changed (+47 additions, -0 deletions)

View changed files

📝 server/server.go (+40 -0)
📝 server/types.go (+7 -0)

📄 Description

ntfy Subscriber Endpoint Implementation

Overview

This implementation adds a new REST API endpoint to ntfy that allows you to check if a topic has active subscribers and get real-time connectivity information between topics and consumers.

New Feature Added

Endpoint: GET /v1/topics/{topic}/subscribers

This endpoint returns real-time information about whether anyone is currently subscribed to a specific topic, enabling you to verify connectivity before sending important notifications.

Check if anyone is subscribed to a topic:

curl http://localhost:8080/v1/topics/my-topic/subscribers

Response format:

{
  "topic": "my-topic",
  "subscribed": true,
  "count": 2,
  "last_access": "2025-07-17T13:30:17Z"
}


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/1392 **Author:** [@MohamedElbashar](https://github.com/MohamedElbashar) **Created:** 7/17/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `get-topic-subscribers-endpoint` --- ### 📝 Commits (1) - [`9ca2c32`](https://github.com/binwiederhier/ntfy/commit/9ca2c32450f7305e59425e292cd773ef31ef2c1e) FEAT : add get topic subscribers endpoint ### 📊 Changes **2 files changed** (+47 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/server.go` (+40 -0) 📝 `server/types.go` (+7 -0) </details> ### 📄 Description # ntfy Subscriber Endpoint Implementation ## Overview This implementation adds a new REST API endpoint to ntfy that allows you to check if a topic has active subscribers and get real-time connectivity information between topics and consumers. ### New Feature Added **Endpoint:** `GET /v1/topics/{topic}/subscribers` This endpoint returns real-time information about whether anyone is currently subscribed to a specific topic, enabling you to verify connectivity before sending important notifications. ### Check if anyone is subscribed to a topic: ```bash curl http://localhost:8080/v1/topics/my-topic/subscribers ``` ### Response format: ```json { "topic": "my-topic", "subscribed": true, "count": 2, "last_access": "2025-07-17T13:30:17Z" } ``` --- --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:02:48 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1590
No description provided.