Page

Hotpot's API for paging

Page

A page is an urgent notification that will be delivered to an entity to get their attention on an issue.

Paging team members

These endpoints page team members when there is something that requires their immediate attention.

A page has three elements.

  • text: The full body of the page, with any details a user would need to address the issue.

  • title: A short summary of the reason for the page.

  • recipient: The target for the page.

An example of a JSON body for a page after an automatic sandwich-maker experiences a problem:

{
  "text": "The peanut butter dispenser is jammed and requires maintenance."
  "title": "SandwichBot needs attention"
  "recipient": "fred@example.com"
}

When issuing the page, you will get an immediate response from the API handing you a request ID, as detailed above in Asynchronous Requests. You will use that ID for the GET /request endpoints.

POST /page/person

Page a user. The recipient value for these requests should be the user's email address.

cURL example:

curl -X POST https://api.hotpot.works/page/person \
  -H "Authorization: Bearer my-api-key" \
  -H "Content-Type: application/json" \
  -d '
    {
      "title": "This tiny title tells the tale",
      "text": "A more verbose discussion of the problem",
      "recipient": "mary@example.com"
    }'

Example response:

{
  "hotpot_request_id": <a unique character string>,
  "response": {
        "success": true,
        "message": "Your request has been queued."
    }
}

If your JSON body has a syntax error, it will look like this:

{
  "error: "Bad Request"
}

All other errors are post-queue and will be retrieved via the GET /request/:request_id/status endpoint.

POST /page/team

This will find the currently on-call user for a team's stint, and page them. The recipient value for these requests should be the target team's slug, which can be found on the Team Settings page.

cURL example:

curl -X POST https://api.hotpot.works/page/team \
  -H "Authorization: Bearer my-api-key" \
  -H "Content-Type: application/json" \
  -d '
    {
      "text": "The full text of the problem!",
      "title": "A title, short and to the point",
      "recipient": "operations-group"
    }'

The responses will look identical to the ones in POST /page/person.

Last updated