2017 © Pedro Peláez
 

library php-panopta-api-client

A thin PHP wrapper for the Panopta API

image

panopta/php-panopta-api-client

A thin PHP wrapper for the Panopta API

  • Friday, August 28, 2015
  • by panopta
  • Repository
  • 2 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Panopta API PHP 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., (*1)

Installation

Run the Composer require command:, (*2)

composer require panopta/php-panopta-api-client

Add the Composer autoloader to your project:, (*3)

require 'vendor/autoload.php';

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. A token can be generated from the API management section of the Settings menu in the control panel at https://my.panopta.com., (*4)

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., (*5)

Instantiate the Panopta API client

$client = Panopta\ApiClient(
    'https://api2.panopta.com',
    'your-api-token',
    2, // API version
    Panopta\ApiClient::LOG_DEBUG,
    'logs/' // Log directory
);

GET

$fiveContacts = $client->get('/contact', ['limit' => 5]);

$serversWithACertainFullyQualifiedDomainName = $client->get(
    '/server',
    ['fqdn' => 'panopta.com']
);

$serverFortyTwo = $client->get('/server/42');

POST

$newNotificationSchedule = $client->post(
    '/notification_schedule',
    ['name' => 'New Notification Schedule', 'targets' => [$serverFortyTwo['url']]]
);

PUT

$updatedServerGroup = $client->put(
    '/server_group',
    [
        'name' => 'Updated Server Group',
        'notification_schedule' => $newNotificationSchedule['url']
    ]
);

DELETE

$client->delete('/contact/1');

The Versions

28/08 2015

dev-master

9999999-dev

A thin PHP wrapper for the Panopta API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar panopta

28/08 2015

1.1.0

1.1.0.0

A thin PHP wrapper for the Panopta API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar panopta

25/08 2015

1.0.2

1.0.2.0

A thin PHP wrapper for the Panopta API

  Sources   Download

MIT

The Requires

 

by Avatar panopta