Skip to main content

Panopta API Python Package

The Panopta REST API provides full access to all configuration, status and outage management functionality of the Panopta monitoring service, including the ability to create and modify monitoring checks that are being performed, manage notification configuration, respond to active outages and to pull availability statistics for monitored servers.

Installation

To install, just do a pip install of the package:

pip install panopta_rest_api

The library depends on the httplib2 module, which will also be installed if it’s not already available.

API Documentation

Full documentation for the API is available at https://api2.panopta.com/v2/api-docs/. By entering your API token you can view full details on all of the API methods and issue API requests from the documentation page.

Usage

The library provides a wrapper around the Panopta REST API, making it easy to issue GET, POST, PUT and DELETE operations to the API. A sample use of the library is below.

import api_client
import json

api_url = 'http://api2.panopta.com'
api_token = 'testing'
version = '2'

if __name__ == '__main__':
  #-- initialize the client
  client = api_client.api_client(api_url,
                                 api_token,
                                 version=version,
                                 log_level=api_client.LOG_DEBUG,
                                 log_path='./')

  #-- get a server
  query_params = { 'fqdn': 'panopta.com', 'limit': 10, 'offset': 0 }
  results = client.get('/server', query_params=query_params)
  print json.dumps(results, indent=2)

  #-- create a contact
  data = { 'name': 'john', 'timezone': '%s/v%s/timezone/America/Chicago' % (api_url, version) }
  results = client.post('/contact', request_data=data)
  print json.dumps(results, indent=2)

Release files for panopta_rest_api 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for panopta_rest_api 1.0.1
File Size Uploaded
panopta_rest_api-1.0.1.tar.gz 3.1 kB Details

Release files / panopta_rest_api-1.0.1.tar.gz

Download URL panopta_rest_api-1.0.1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1ef38e39c4894044ae20050d5d7d4222ed9a158697dd96cf3970372158437671
BLAKE2b-256 checksum
How to use checksums
f99597e0b796ba3b4ea758764f2c68ed0636fb2dc24e08f48c2c1e2fc4f248c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page