Using the REST API

Introduction

This is the REST-API that lets you get events from op5 Monitor by issuing regular HTTP requests. Basically, you 'visit' an URI, which triggers Monitor to do something, and you get a response telling you what happened.

You get help with the formulation of the requests on each object type's help page (look over to your left to find which object types are available). You also get tips on how to perform HTTP requests via the terminal (using cURL) and via scripting languages (using Python or PHP).

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

Traversing a paginated result set of result data

Since you might ask for all data retrieved for this year, we need to batch the response. To aid you do this, we give you a link to the next page, with every response that has a too large payload to handle in one response. See an example of this here.