Skip to main content

Panopta REST API Client

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

panopta_rest_api-1.0.1.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file panopta_rest_api-1.0.1.tar.gz.

File metadata

File hashes

Hashes for panopta_rest_api-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1ef38e39c4894044ae20050d5d7d4222ed9a158697dd96cf3970372158437671
MD5 bb7259ed1ef0b535a05d078ca64998b7
BLAKE2b-256 f99597e0b796ba3b4ea758764f2c68ed0636fb2dc24e08f48c2c1e2fc4f248c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page