Backwards

Use with Bash

Make HTTP GET call, manage errors and know API.


Basic example:


#!/bin/bash
token="TOKEN"
testonoti="Low hard disk space"

curl --request GET "http://api.rpinotify.it/notification/$token/text/$(echo ${testonoti// /%20})"
						


Variable explanation:

  • $tokenPersonal token assigned during the registration process.
  • $testonoti Notification text.

$(echo ${testonoti// /%20}) is one of the several ways to convert spaces into %20.

API - Call structure

http://api.rpinotify.it/notification/$TOKEN/text/$TEXT

Variable name Description Format
$TOKEN Personal token. Alphanumeric string
$TEXT Notification text. Text (without spaces - use %20)

API - Errors

Error codes are in curl answer.

  • InUrl parameters error Call structure not correct.
  • Token error Token not valid or digital signature void.
  • Database connection error Database error.
  • Database read error Database error.
  • SendNotifications bot (in server) error Notification sending impossible.
  • Database write error Database error.
  • No error Everything okay.
Service spammers will be automatically banned by RpiNotify.

RpiNotify is an Italian project supported by RaspberryItaly

The first Italian RaspberryPi community.