Broadcasting Tower v1.0.0

Broadcast message


Query messages


Tower stats

Messages stored: 50
Messages stored size in bytes: 17419
Messages stored size limit in bytes: 825648742
Messages per second: 0.0000



About

This is a simple broadcasting tower. You can broadcast messages and query them.
The goal of this service is to facilitate free Internet communication.

This project is open-sourced and the code and instructions can be found on https://github.com/michal-wrzosek/broadcasting-tower.

API v1

Broadcast message
POST /api/v1/broadcast
You can send a json (Header: "Content-Type: application/json") {"messageText": "Hello, World!"}
or a form data (Header: "Content-Type: application/x-www-form-urlencoded") messageText=Hello, World!
Max byte length of "messageText" is 10000 bytes (assuming "utf-8" encoding).
This broadcasting tower will store max 825648742 bytes of recent messages.
The successful response will have a status of 201 and the response body will contain a message entry, example:

        1725703790081|Hello, World!
      
A timestamp in milliseconds and a "|" separator in front of the message text.
In case of an error, the response status will be 400 and the response body will contain a string "failure".

Query messages
GET /api/v1/messages
You can query messages by specifying the following query parameters: Example query:
/api/v1/messages?startsWith=message&timestampFrom=1725703790070&timestampTo=1725703790081&order=desc&limit=4

Example response (status: 200):
        1725703790081|message4
        1725703790080|message3
        1725703790079|message2
        1725703790078|message1
      
Each message entry is separated by a newline character with a timestamp in milliseconds and a "|" separator in front of the message text.

Response type headers: In case of an error, the response status will be 400 and the response body will contain a string "failure".