caronc/apprise

By caronc

Updated 7 days ago

Apprise API - Push Notifications that work with just about every platform!

Image
Message queues
API management
Web servers
66

5M+

caronc/apprise repository overview

Apprise API

Take advantage of Apprise through your network with a user-friendly API.

  • Send notifications to more than 130+ services.
  • An incredibly lightweight gateway to Apprise.
  • A production-ready micro-service at your disposal.
  • A Simple Website to verify and test your configuration with.

Apprise API was designed to easily fit into existing (and new) ecosystems that are looking for a simple notification solution.

Paypal Docker Pulls

Visit the Official Documentation site for more information on the Apprise API.

Installation

The following options should allow you to access the API at: http://localhost:8000/ from your browser.

Using Dockerhub
# Retrieve container
docker pull caronc/apprise:latest

# Start it up:
docker run --name apprise \
   -p 8000:8000 \
   --user "$(id -u):$(id -g)" \
   -v /path/to/local/config:/config \
   -v /path/to/local/plugin:/plugin \
   -v /path/to/local/attach:/attach \
   -e APPRISE_STATEFUL_MODE=simple \
   -e APPRISE_WORKER_COUNT=1 \
   -e APPRISE_ADMIN=y \
   -d caronc/apprise:latest
Docker Compose

A minimal docker-compose.yml might look like this:

services:
  apprise:
    image: caronc/apprise:latest
    container_name: apprise
    ports:
      - "8000:8000"
    environment:
      APPRISE_STATEFUL_MODE: simple
      APPRISE_WORKER_COUNT: "1"
      APPRISE_ADMIN: "y"
    volumes:
      - ./config:/config
      - ./plugin:/plugin
      - ./attach:/attach

Apprise URLs

📣 In order to trigger a notification, you first need to define one or more Apprise URLs to support the services you wish to leverage. Visit https://appriseit.com/services/ to see the ever-growing list.

API Details

Health Checks
PathMethodDescription
/statusGETReturns a server status. The http response code is 200 if working correctly.
Stateless Solution
PathMethodDescription
/notify/POSTSends one or more notifications to the URLs identified as part of the payload, or those identified in APPRISE_STATELESS_URLS.
Persistent (Stateful) Storage Solution
PathMethodDescription
/add/{KEY}POSTSaves Apprise Configuration (or set of URLs) to the persistent store.
/del/{KEY}POSTRemoves Apprise Configuration from the persistent store.
/get/{KEY}POSTReturns the Apprise Configuration from the persistent store. (Alias of /cfg/{KEY}).
/notify/{KEY}POSTSends notification(s) to all of the end points you've previously configured associated with a {KEY}.
/json/urls/{KEY}GETReturns a JSON response object containing all URLs and Tags associated with the specified key.
Example Usage
# Stateless Notification
curl -X POST -d 'urls=mailto://user:[email protected]&body=test message' \
    http://localhost:8000/notify

# Stateful Notification via {KEY}
curl -X POST -d "body=test message" http://localhost:8000/notify/abc123

# Trigger Notification by Tag
curl -X POST -d 'tag=devops&body=test message' http://localhost:8000/notify/abc123

Environment Variables

Below is a brief list of key environment variables. For the full list of configurations (including Kubernetes deployments, Nginx Overrides, and advanced Tagging), please review the Official Documentation.

  • APPRISE_STATEFUL_MODE: Set to hash, simple (default configuration straight to disk), or disabled.
  • APPRISE_CONFIG_LOCK: Set to yes to lock down your API hosting so stateful information cannot be accessed/modified (read-only mode).
  • APPRISE_WORKER_COUNT: Over-ride the number of workers to run.
  • APPRISE_ATTACH_SIZE: Over-ride the attachment size in MB (default 200).
  • APPRISE_API_ONLY: Set to yes to disable the web administration interface.

Apprise Integration (Python)

import apprise

# Point our configuration to this API server:
config = apprise.AppriseConfig()
config.add('http://localhost:8000/get/{KEY}')

# Create our Apprise Instance and send a test message
a = apprise.Apprise()
a.add(config)
a.notify('test message')

For full details on Webhooks, Custom Plugins, and extended API notes, visit the Apprise API Repository.

Tag summary

Content type

Image

Digest

sha256:913217554

Size

112 MB

Last updated

7 days ago

docker pull caronc/apprise