Skip to content

Latest commit

 

History

History
157 lines (114 loc) · 2.67 KB

notifications.adoc

File metadata and controls

157 lines (114 loc) · 2.67 KB

Notifications

Note

Those routes will only be available if pushover service is enabled

Send a notification

POST /pushover/notify

Note

Query parameters can be sent in one of the following format :

  • directly in the url (as usually done in GET requests)

  • in the body (application/x-www-form-urlencoded)

Mandatory query parameters

Name Type Description

message

string

Message to send

Optional query parameters

Name Type Default Description

title

string

Notification title. If not defined, app’s name (defined in PushOver GUI) is used

format

string (html,text)

html

Message format

priority

string (lowest,low,normal,high,emergency)

normal

Notification priority

device

string

Device name (used to restrict notification to a single device)

sound

string

Sound to play (must be a supported sound name, otherwise an error will be returned)

url

string

Url to open

urlTitle

string

Title to display instead of the url (will be ignored if url is not set)

timestamp

integer

A Unix timestamp of your message’s date and time to display to the user, rather than the time your message is received by PushOver API

retry

integer

Specifies how often (in seconds) the Pushover servers will send the same notification to the user. This parameter must have a value of at least 30 seconds between retries (will be ignored unless priority is emergency)

expire

integer

Specifies how many seconds your notification will continue to be retried for (every retry seconds). If the notification has not been acknowledged in expire seconds, it will be marked as expired and will stop being sent to the user (will be ignored unless priority is emergency)

Result

Result will be an empty object

Examples

Example for POST /pushover/notify?message=Test

{
}

Check messages counter

GET /pushover/counter

Result

Note

If method is call and no message has been sent since start, all values will be null

Result will be a dictionary

Name Type Description

max

integer

Maximum number of messages an application is allowed to send per period (ie: per month)

remaining

integer

How many messages can still be sent in current period

resetTimestamp

integer

Unix timestamp when new period will start

Examples

Example for GET /pushover/counter

{
    "max":7500,
    "remaining":7464,
    "resetTimestamp":1504242000
}