2017-25 © Pedro Peláez
 

library hostbase-api-client

The Hostbase API Client Library for PHP

image

shift31/hostbase-api-client

The Hostbase API Client Library for PHP

  • Monday, February 2, 2015
  • by shift31
  • Repository
  • 1 Watchers
  • 0 Stars
  • 65 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Hostbase API Client for PHP

Basic usage (if you're using Composer)

  • In your project, run composer require shift31/hostbase-api-client:dev-master
  • Example script:
<?php

require_once('vendor/autoload.php');

use Shift31\HostbaseClient;

/* The constructor will accept username and password parameters,
if you setup basic auth yourself, or for when I get around to implementing it. */
$client = new HostbaseClient("http://your.hostbase.server");

/* Optionally return arrays instead of objects */
//$client->decodeJsonAsArray();


// perform a search, limiting to 100 servers, retrieving just FQDNs
print_r($client->search('your.domain', 100, false));

// perform the same search, retrieving all data
print_r($client->search('your.domain', 100, true));

For an example of adding/updating hosts, check out the PuppetDB importer: https://github.com/shift31/hostbase-importer-puppetdb, (*1)

The Versions

02/02 2015

dev-master

9999999-dev

The Hostbase API Client Library for PHP

  Sources   Download

MIT

The Requires

 

by Shift 31 Consulting

02/02 2015

0.2.0

0.2.0.0

The Hostbase API Client Library for PHP

  Sources   Download

MIT

The Requires

 

by Shift 31 Consulting

02/02 2015

dev-develop

dev-develop

The Hostbase API Client Library for PHP

  Sources   Download

MIT

The Requires

 

by Shift 31 Consulting

12/03 2014

0.1.0

0.1.0.0

The Hostbase API Client Library for PHP

  Sources   Download

MIT

The Requires