Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

glpi-api-client

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glpi-api-client

A package made with TypeScript to handle GLPI Rest API with interfaces and models

  • 1.0.4
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

GLPIAPIClient

GLPIClient is made for simplify interations between the developer and GLPI, with authentication and requests classes, with all CommonDB classes and requests from GLPI

  • Actives, Administration, Assistance, Dropdowns, Management and Tools classes and interfaces

  • Simple authentication with User Token or User Credentials

    npm i glpi-api-client

Example use

Instancing the GLPIClient

const  glpi  =  new  GLPIAPI({app_token:  "APP_TOKEN_HERE", glpi_url:  "http://GLPI_URL_HERE" })

Authenticating examples

glpi.authenticate.withUserCredential("LOGIN,"PASSWORD");
or
glpi.authenticate.withUserToken("USER_TOKEN_HERE");
Will return a promise that will can call requests, that is a wrapper with all classes from GLPI CommonDB

Making a request

glpi.authenticate.withUserToken("TOKEN").then(requests => {
    requests.actives.computer.getById("itemId", custom_params_here).then(response => {
	    const { data } = response; // will return all properties of a computer to handle
	    data.
    })
})

Keywords

FAQs

Package last updated on 21 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc