2017 © Pedro Peláez
 

library php-library-glpi

GLPI API Client Library for PHP

image

glpi-project/php-library-glpi

GLPI API Client Library for PHP

  • Thursday, May 3, 2018
  • by trasher
  • Repository
  • 8 Watchers
  • 5 Stars
  • 992 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 4 Open issues
  • 5 Versions
  • 30 % Grown

The README.md

GLPI API Client Library for PHP

GLPI banner, (*1)

License Follow twitter Project Status: WIP Telegram Group Conventional Commits, (*2)

GLPI (_Gestionnaire Libre de Parc Informatique_) is a free IT Asset Management, issue tracking system and service desk solution. This open source software is written in PHP., (*3)

It helps companies to manage their information system, since it's able to build an inventory of all the organization's assets and to manage administrative and financial tasks., (*4)

Table of Contents

Synopsis

This library specifically designed for PHP, features several functionalities common to all GLPI APIs, for example:, (*5)

  • HTTP transport to APIs.
  • Error handling
  • Authentication
  • JSON parsing
  • Custom Item Types
  • Media download/upload
  • Batching.

You will be able to call to all the methods that belong to the GLPI REST API, for more information visit the project's website., (*6)

Build Status

Release channel Beta Channel
Travis build Travis build

Matrix

GLPI Version 9.1.1 9.1.2 9.1.3 9.1.5 9.1.6 9.2.0
GLPI API Client 1.x 1.x 1.x 1.x 1.x 1.x

Installation

You will need the following minimum dependencies to use the library (composer will automatic check for the first two):, (*7)

  • PHP >= 5.6.0
  • Guzzle >= 6.3
  • GLPI >= 9.1.1
composer require glpi-project/php-library-glpi

Code examples

It's easy to implement, as you see in the following example:, (*8)

// Instanciate the API client
$client = new Glpi\Api\Rest\Client('http://localhost/glpi/apirest.php/', new GuzzleHttp\Client());

// Authenticate
try {
   $client->initSessionByCredentials('glpi', 'glpi');
} catch (Exception $e) {
   echo $e->getMessage();
   die();
}

// The client handles the session token for you (app token not yet supported)

// do something
$itemHandler = new \Glpi\Api\Rest\ItemHandler($client);
$response = $itemHandler->getItem('User', 2);
$user = json_decode($response['body']);
echo "User name: " . $user->name . "\n";

Documentation

We maintain a detailed documentation of the project on the website., (*9)

Versioning

In order to provide transparency on our release cycle and to maintain backward compatibility, GLPI is maintained under the Semantic Versioning guidelines. We are committed to following and complying with the rules, the best we can., (*10)

See the tags section of our GitHub project for changelogs for each release version. Release announcement posts on the official Teclib' blog contain summaries of the most noteworthy changes made in each release., (*11)

Contact

For notices about major changes and general discussion of GLPI development, subscribe to the /r/glpi subreddit. You can also chat with us via IRC in #GLPI on freenode or @glpien on Telegram., (*12)

Contribute

Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the Issues Dashboard., (*13)

Copying

  • Code: you can redistribute it and/or modify it under the terms of the GNU General Public License (GPLv3).
  • Documentation: released under Attribution 4.0 International (CC BY 4.0).

The Versions

03/05 2018

dev-develop

dev-develop https://glpi-project.github.io/php-library-glpi/

GLPI API Client Library for PHP

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Thierry Bugier
by Domingo Oropeza

api rest client glpi

11/04 2018

dev-bugfix/65-cannot_connect_using_user_token

dev-bugfix/65-cannot_connect_using_user_token https://glpi-project.github.io/php-library-glpi/

GLPI API Client Library for PHP

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Thierry Bugier
by Domingo Oropeza

api rest client glpi

11/04 2018

dev-C-Duv-bugfix/65-cannot_connect_using_user_token

dev-C-Duv-bugfix/65-cannot_connect_using_user_token https://glpi-project.github.io/php-library-glpi/

GLPI API Client Library for PHP

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Thierry Bugier
by Domingo Oropeza

api rest client glpi

12/03 2018

dev-master

9999999-dev https://glpi-project.github.io/php-library-glpi/

GLPI API Client Library for PHP

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Thierry Bugier
by Domingo Oropeza

api rest client glpi

12/03 2018

0.1.0

0.1.0.0 https://glpi-project.github.io/php-library-glpi/

GLPI API Client Library for PHP

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Thierry Bugier
by Domingo Oropeza

api rest client glpi