Using the REST API

Introduction

Ask Monitor what it knows about your system in this very moment. Filters are written in a made up query language which let's you retrieve data based on certain columns' values, for example "only show me data belonging to hosts whose name begins with an 'A'".

The major differences from using the regular /api/status/host/a_host calls are:

Start out by choosing any of the sections on the left, either count or query.

Technical information

Authentication

You send along a pair of regular op5 Monitor user credentials in a basic auth header with every request. View any example and you will understand how to do this.

Requests

In a REST-API, there are a couple of important things that make up for a valid request:

Once again, viewing any of the examples helps you get into the REST mindset.

Responses

You need to examine two things in the response: the status code and the body. The status code tells you what Monitor did with your input and the body gives you a detailed response.

Examples of status codes:

These status codes are general for all web traffic and can be found at the List of HTTP status codes