Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The SONARPLEX REST API offers an easy way to gather information and even post information to the SONARPLEX. 

/hosts

...

API Basics

Base URIhttp(s)://

...

All hosts (only fields current_state and plugin_output)

...

example.com/{version}/{location}/{resource}/
AuthenticationBasic HTTP Auth
Encryption

HTTPS with certificate can be configured in the

administrative web interface Configuration :: Network :: HTTP Configuration

MethodsGET and POST depending on the resource
Response content typeapplication/json
WildcardAsterisk '*'
Column
width400px
Note

The RESTful API access is restricted to username 'admin'

Resources

/hosts

Example/hosts/{host_name}
Get all hosts
hosts/*

Get all hosts, filter details for the fields current_state and plugin_output

hosts/*?fields=current_state,plugin_output
Get onyl the host named 'Google' with all details
hosts/Google

/services

Example/services/{service_name}
Get all services
services/*

Get all hosts for services 'ICMP'

services/ICMP/hosts/*
Get all hosts for service 'ICMP' but only show particular fields
services/ICMP/hosts/*?fields=current_state,plugin_output 
Get the full detail view for service 'ICMP' on host 'SAP'
services/ICMP/hosts/SAP
Get all services for host 'Email_Loop'
services/*/hosts/Email_Loop
Get all services for host 'Email_Loop' but only show certain fields
services/*/hosts/Email_Loop?fields=current_state,plugin_output

...

Host Google (all available fields - detail view)

...

/problems


Example/services/{service_name}
Get all problems
problems/*

Get all problems for service 'Mail_out'

problems/services/Mail_out/hosts/*
Get all problems of host 'Email_Loop'
problems/services/*/hosts/Email_Loop
Get detail view for problem of host 'Email_Loop' for service 'Mail_out'
problems/services/Mail_out/hosts/Email_Loop
Get all problems of host 'Email_Loop'
problems/services/*/hosts/Email_Loop

Acknowledge host Problem

http://192.168.111.1/v1/*/local/cmd/ACKNOWLEDGE_HOST_PROBLEM/Google/1/1/1/Operator/Aware of this problem, acknowledged

...

http://192.168.111.1/v1/*/local/checknow/Google/http

Problems

All problems

http://192.168.111.1/v1/*/local/problems/*

== All problems with services name Mail_out http://192.168.111.1/v1/*/local/problems/services/Mail_out/hosts/*

Problem with service name Mail_out and host name EMail_Loop (all available fields - detail view)

http://192.168.111.1/v1/*/local/problems/services/Mail_out/hosts/Email_Loop

All Problem of host EMail_Loop

http://192.168.111.1/v1/*/local/problems/services/*/hosts/Email_Loop

 

Actions

List available actions

...