Base URL: http://localhost:5000/api/messages
Returns any message posted in the last 5 minutes.
Get /api/messages/new
Returns the total count of all messages in the database.
GET /api/messages/total
Response
42Returns the count of all messages where signed = true.
GET /api/messages/signed
Response
30Returns the count of all messages where signed = false.
GET /api/messages/unsigned
Response
12Saves a new message to the database with the current timestamp.
POST /api/messages
Content-Type: application/json
Request Body
"your message content here"Response
"saved"# Get new messages
curl http://localhost:5000/api/messages/new
# Get total messages
curl http://localhost:5000/api/messages/total
# Get signed messages
curl http://localhost:5000/api/messages/signed
# Get unsigned messages
curl http://localhost:5000/api/messages/unsigned
# Post a new message
curl -X POST http://localhost:5000/api/messages \
-H "Content-Type: application/json" \
-d '"your message here"'- All responses return HTTP
200 OKon success. received_atis set automatically to the current UTC time on insert.signeddefaults tofalseon insert.