Skip to main content

API

This page documents the HTTP endpoints for Pager Reborn.

How to Use

The endpoints documented below are made available directly from the resource. To access the API, you first need to know the IP address or domain, and port of the server. With this information, you can append /inferno-pager-reborn/ and then the endpoint name.

For example, if your domain is my-server.com, the port is 30120, and you wanted the page endpoint, you would access http://my-server.com:30120/inferno-pager-reborn/page.

Every request requires an Authorization header containing the ic_pr_httpAccessToken. If ic_pr_httpAccessToken is not set, then a 404 - Not Found will be returned, and an error will be logged to the console. If ic_pr_httpAccessToken does not match the token provided in the Authorization header, then a 401 - Unauthorized will be returned.

If ic_pr_whitelistedIps contains any valid IP addresses, then any requests sent from an IP address not contained within ic_pr_whitelistedIps will be rejected with 401 - Unauthorized, and an error will be logged to the console.

Valid HTTP requests are logged to the console when Debug Mode is enabled.

Pages

Create a New Page

Use this endpoint to create a new page.

Endpoint

POST /page

Body

  • addresses - string[]
    • List of capcodes/addresses.
  • players - number[]
    • List of target player server IDs.
  • nature - string | number
    • Page nature value.
    • Accepts lowercase names (emergency, nonemergency, administrative) or enum values (0-2).
  • body - string
    • Page message body text.

Example Request

{
"addresses": ["emg.fire.bc", "emg.ems.bc"],
"players": [1, 2, 3],
"nature": "administrative",
"body": "Training drill at Station 1."
}

Return Value

  • 200 - OK
    • No return body, headers only.
  • 400 - Bad Request
    • Request contains an invalid nature
    • Request body cannot be empty
    • Malformed body.
  • 404 - Not Found
    • Endpoint not found, or API access token is not configured.
    • May return a message in the response body.
  • 413 - Request Entity Too Large
    • Request address count cannot exceed X addresses (request contained Y addresses)
    • Request body cannot exceed X characters (body was Y characters)
  • 416 - Requested Range Not Satisfiable
    • Request contains no recipients