1. Uptime Checks
  2. Assertions

Uptime Checks

Assertions

In OnlineOrNot, assertions make it possible to monitor your response data for correctness, and get notified when your response data stops being correct (the word "assertion" is a fancy computer science word for "something you know to be correct").

How assertions work

When you create an uptime check, under "HTTP request settings", you can add multiple assertions to your check.

For JSON body responses, OnlineOrNot uses JSONPath to find the key in your JSON object. There's also an online sandbox that you can test your assertions in.

Assertions have three main fields:

  • Property, where we enter the JSONPath to the key we want to assert
  • Comparison, which is described below
  • Expected value, where we enter the value we expect to find once we find the value

API monitoring assertions in OnlineOrNot

Assertions let you check multiple things in your response:

  • That your HTTP response JSON contains an object key called "title", with the value "The Phantom Menace"
  • That your HTTP response JSON contains an object key called "errors", with a value of NULL

If any of your assertions fail, the check is considered "DOWN".

Comparisons

Assertions support the following comparisons (in which the Property is compared to the Expected Value)

  • Equals
  • Not equals
  • Greater than
  • Less than
  • Null
  • Not null
  • Empty
  • Not empty
  • Contains
  • Not contains
  • True
  • False

© 2024 OnlineOrNot SASU, 66 Av. des Champs-Élysées 75008 Paris
Made with in Sydney, Australia 🇦🇺 and Toulouse, France 🇫🇷