https://github.com/glpi-project/node-module-glpi
Node client to interact with GLPI API REST
https://github.com/glpi-project/node-module-glpi
api-client glpi npm-module npm-package
Last synced: 10 days ago
JSON representation
Node client to interact with GLPI API REST
- Host: GitHub
- URL: https://github.com/glpi-project/node-module-glpi
- Owner: glpi-project
- License: gpl-3.0
- Created: 2017-09-06T19:11:10.000Z (almost 8 years ago)
- Default Branch: develop
- Last Pushed: 2020-05-23T12:06:04.000Z (about 5 years ago)
- Last Synced: 2025-06-11T05:25:18.913Z (21 days ago)
- Topics: api-client, glpi, npm-module, npm-package
- Language: JavaScript
- Homepage: https://glpi-project.github.io/node-module-glpi/
- Size: 4.15 MB
- Stars: 9
- Watchers: 5
- Forks: 9
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# GLPI node module

[](https://github.com/glpi-project/node-module-glpi/blob/develop/LICENSE.md)
[](https://twitter.com/GLPI_PROJECT)
[](http://www.repostatus.org/)
[](https://t.me/glpien)
[](https://conventionalcommits.org)
[](https://greenkeeper.io/)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.
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.
## Table of Contents
* [Synopsis](#synopsis)
* [Build Status](#build-status)
* [Compatibility Matrix](#matrix)
* [Documentation](#documentation)
* [Versioning](#versioning)
* [Contact](#contact)
* [Contribute](#contribute)
* [Copying](#copying)## Synopsis
Node Client interacts with GLPI webservices plugin, it features several functionalities common to all GLPI APIs, for example:
* HTTP transport to APIs.
* Error handling
* Authentication
* JSON parsing
* Custom Item Types
* Media download/upload
* BatchingYou will be able to call to all the methods that belong to the [GLPI REST API](https://github.com/glpi-project/glpi/blob/master/apirest.md), for more information visit the [project's website](https://glpi-project.github.io/node-module-glpi/).
## Build Status
|**Release channel**|Beta Channel|
|:---:|:---:|
|[](https://travis-ci.org/glpi-project/node-module-glpi)|[](https://travis-ci.org/glpi-project/node-module-glpi)|## Matrix
|**GLPI Version**|9.1.1|9.1.2|9.1.3|9.1.5|9.1.6|9.2.0|
|:----|----|----|----|---|---|---|
|**GLPI API Client**|||||||## Example with promises
``` js
const client = new GlpiRestClient(config.apirest)client.initSessionByCredentials(config.user.name, config.user.password, config.appToken)
.then((res) => {
client.getActiveProfile()
.then((res2) => {
console.log(res2)
client.killSession()
.catch((err3) => {
console.log(err3)
})
})
.catch((err2) => {
console.log(err2)
})
})
.catch((err) => {
console.log(err)
})
```## Example with async/await
``` js
(async () => {
try {
const client = new GlpiRestClient(config.apirest);
await client.initSessionByCredentials(config.user.name, config.user.password, config.appToken);
const ActiveProfile = await client.getActiveProfile();
console.log(ActiveProfile);
await client.killSession();
}
catch (err) {
console.log(err);
}
})();
```## Documentation
We maintain a detailed documentation of the project on the [website](https://glpi-project.github.io/node-module-glpi/).
## Versioning
In order to provide transparency on our release cycle and to maintain backward compatibility, GLPI is maintained under [the Semantic Versioning guidelines](http://semver.org/). We are committed to following and complying with the rules, the best we can.
See [the tags section of our GitHub project](https://github.com/glpi-project/node-module-glpi/tags) for changelogs for each release version of GLPI library for Node. Release announcement posts on [the official Teclib' blog](http://www.teclib-edition.com/en/communities/blog-posts/) contain summaries of the most noteworthy changes made in each release.
## Contact
For notices about major changes and general discussion of GLPI development, subscribe to the [/r/glpi](http://www.reddit.com/r/glpi) subreddit.
You can also chat with us via IRC in [#GLPI on freenode](http://webchat.freenode.net/?channels=GLPI) or [@glpien on Telegram](https://t.me/glpien).## Contribute
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our
guidelines for [contributing](./CONTRIBUTING.md) and then check out one of our issues in the [Issues Dashboard](https://github.com/glpi-project/node-module-glpi/issues).## Copying
* **Code**: you can redistribute it and/or modify
it under the terms of the GNU General Public License ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html)).
* **Documentation**: released under Attribution 4.0 International ([CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)).