2017 © Pedro Peláez
 

library itopapi

Php library for accessing the iTop API

image

boddigr/itopapi

Php library for accessing the iTop API

  • Wednesday, February 14, 2018
  • by gboddin
  • Repository
  • 5 Watchers
  • 2 Stars
  • 661 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 17 Versions
  • 0 % Grown

The README.md

iTopApi PHP

Build Status Build Status, (*1)

iTopApi PHP is an helper class to use and query the iTop API from your PHP scripts., (*2)

Installation (with composer) :

composer require ec-europa/itopapi

Usage

Getting data

require 'vendor/autoload.php';

$iTopAPI = new \iTopApi\ITopClient( 'http://localhost/itop', 'itopUser', 'iTopPassword' );

//disable SSL checks ?
//$iTopAPI->setCertificateCheck(false);

$query = sprintf("SELECT Servers WHERE environment = '%s'",'development');

$serversRequest = $iTopAPI->coreGet("Servers",$query);

$servers = $serverRequest['objects'];

Creating data

require 'vendor/autoload.php';

$iTopAPI = new \iTopApi\ITopClient( 'http://localhost/itop', 'itopUser', 'iTopPassword' );

//disable SSL checks ?
//$iTopAPI->setCertificateCheck(false);

$request = $iTopAPI->coreCreate("Servers",array(
  'hostname' => 'localhost',
  'memory' => 2048,
  'cpu' => 4,
  'location' => 'dc1'
));

Updating data

require 'vendor/autoload.php';

$iTopAPI = new \iTopApi\ITopClient( 'http://localhost/itop', 'itopUser', 'iTopPassword' );

//disable SSL checks ?
//$iTopAPI->setCertificateCheck(false);

$request = $iTopAPI->coreUpdate("Servers",array(
  'hostname' => 'localhost'
),array(
  'memory' => 1024
));

Using object oriented

require 'vendor/autoload.php';

$iTopAPI = new \iTopApi\ITopClient( 'http://localhost/itop', 'itopUser', 'iTopPassword' );

//disable SSL checks ?
//$iTopAPI->setCertificateCheck(false);


/**
 * Query and iterate 
 */

$servers = $iTopAPI->getObjects("Server",
  array(
    'name' => 'server001'
  )
);

foreach($servers as $server) {
  echo $server->name.' is '.$server->status_friendlyname;
  $server->name = 'server001-eu';
  $server->save();
}


/**
 * Deletes a new server : 
 */
if($server->status_friendlyname == 'decommissioning')
  $server->delete();


/**
 * Creates a new server : 
 */
$server = $iTopClient->getNewObject('Server');

$server->name = 'server002';
$server->status_friendlyname = 'deployed';
$server->save();

The Versions

14/02 2018

dev-master

9999999-dev https://github.com/ec-europa/iTopApi

Php library for accessing the iTop API

  Sources   Download

EUPL EUPL-1.1

The Requires

  • ext-curl *
  • php >=5.6.0

 

The Development Requires

api client itop

14/02 2018

dev-feature/MULTISITE-19408

dev-feature/MULTISITE-19408 https://github.com/ec-europa/iTopApi

Php library for accessing the iTop API

  Sources   Download

EUPL-1.1

The Requires

  • ext-curl *
  • php >=5.6.0

 

The Development Requires

api client itop

14/12 2017

1.0.2

1.0.2.0 https://github.com/ec-europa/iTopApi

Php library for accessing the iTop API

  Sources   Download

EUPL

The Requires

  • ext-curl *
  • php >=5.6.0

 

The Development Requires

api client itop

14/12 2017

dev-fixTest

dev-fixTest https://github.com/ec-europa/iTopApi

Php library for accessing the iTop API

  Sources   Download

EUPL

The Requires

  • ext-curl *
  • php >=5.6.0

 

The Development Requires

api client itop

14/12 2017

dev-FPFISSUPP-1556

dev-FPFISSUPP-1556 https://github.com/ec-europa/iTopApi

Php library for accessing the iTop API

  Sources   Download

EUPL

The Requires

  • ext-curl *
  • php >=5.6.0

 

The Development Requires

api client itop

24/11 2015

1.0.1

1.0.1.0 https://github.com/ec-europa/iTopApi

Php library for accessing the iTop API

  Sources   Download

EUPL

The Requires

  • ext-curl *
  • php >=5.6.0

 

The Development Requires

api client itop

09/11 2015

1.0.0

1.0.0.0 https://github.com/ec-europa/iTopApi

Php library for accessing the iTop API

  Sources   Download

EUPL

The Requires

  • ext-curl *
  • php >=5.6.0

 

The Development Requires

api client itop

16/10 2015

0.5.2

0.5.2.0 https://github.com/ec-europa/iTopApi

Php library for accessing the iTop API

  Sources   Download

EUPL

The Requires

  • ext-curl *
  • php >=5.3.0

 

api client itop

25/09 2015

0.5

0.5.0.0 https://github.com/gboddin/iTopApi

Php library for accessing the iTop API

  Sources   Download

EUPL

The Requires

  • ext-curl *
  • php >=5.3.0

 

api client itop

23/09 2015

0.4.1

0.4.1.0 https://github.com/gboddin/iTopApi

Php library for accessing the iTop API

  Sources   Download

EUPL

The Requires

  • ext-curl *
  • php >=5.3.0

 

api client itop

22/09 2015

0.4

0.4.0.0

Php library for accessing the iTop API

  Sources   Download

The Requires

  • ext-curl *

 

17/09 2015

0.3.1

0.3.1.0

Php library for accessing the iTop API

  Sources   Download

The Requires

  • ext-curl *

 

15/09 2015

0.3

0.3.0.0

Php library for accessing the iTop API

  Sources   Download

The Requires

  • ext-curl *

 

09/09 2015

0.2

0.2.0.0

Php library for accessing the iTop API

  Sources   Download

The Requires

  • ext-curl *

 

01/09 2015

0.1.2

0.1.2.0

Php library for accessing the iTop API

  Sources   Download

The Requires

  • ext-curl *

 

17/08 2015

0.1.1

0.1.1.0

Php library for accessing the iTop API

  Sources   Download

The Requires

  • ext-curl *

 

27/05 2015

0.1

0.1.0.0

Php library for accessing the iTop API

  Sources   Download

The Requires

  • ext-curl *