@webpros/360-api-client
v0.5.26
Published
JS API Client to connect to the Plesk 360 Monitoring Engine
Downloads
473
Readme
360 API Client
The library is used to communicate with the 360 Monitoring Engine.
Please contact [email protected]
if you want to use the API.
Multi language support
The KoalityEngine API can return the results in different languages. The preferred language can be defined in the
connect argument or later on via the setLanguage
method.
await client.connect({ username: 'demo', password: 'demo', language: 'de' })
// or
client.setLanguage('de')
Connect
// via username and password
await client.connect({ username: 'demo', password: 'demo' })
// via wakeup token
await client.connect({ wakeUpToken })
// via refresh token
await client.connect({ refreshToken, userId })
Examples
This example returns a list of projects the user demo
is part of.
import { LeankoalaClient } from '@webpros/360-api-client'
(async () => {
const client = new LeankoalaClient('stage')
await client.connect({ username: 'demo', password: 'demo', autoSelectCompany: true})
const user = client.getUser()
console.log('user', user)
const alerts = (await client
.getRepositoryCollection())
.getAlertingChannelRepository()
const alertList = await alerts.list(3333)
})()