Documentation PI Nexus+ Documentation

PI Nexus+ / Administration Guide

Connect Other Applications

This chapter connects other applications, such as a CMDB, a ticketing system or a monitoring platform, to PI Nexus+: they read health, objects, issues and lineage through the public API, and receive issue changes as webhooks. Endpoints, scopes, event types, error codes and code samples are in the Public API Reference.

Overview

This chapter connects other applications, such as a CMDB, a ticketing system or a monitoring platform, to PI Nexus+: they read health, objects, issues and lineage through the public API, and receive issue changes as webhooks. Endpoints, scopes, event types, error codes and code samples are in the Public API Reference.

The public API is read-only and off by default. Everything here is under Admin > Integrations and needs the Admin role. Every change is written to the Security Audit.

Turn on the public API

  1. Open Admin > Integrations.
  2. Choose Turn on. The banner shows the address applications call, for example https://pinexus.contoso.com/api/v1, and links to the OpenAPI document that describes every field.

Turn off stops every application at once: requests get 404 and webhooks are not sent. Keys and webhooks are kept and work again when you turn it on.

API keys are sent with every request like a password, so let applications call PI Nexus+ over HTTPS only. The installer lets API keys through IIS for the /api/v1 path only; every other path still needs Windows sign-in.

Create an API key

Create one key per application, so that you can revoke one without touching the others.

Integrations page with the public API on, three API keys and Create key (1)
Create API key dialog with the name (2), what the key can read (3), its site and expiry (4) and Create key (5)
  1. On the API keys tab, choose Create key.
  2. Enter a Name that says which application uses it.
  3. Under Can read, tick only what the application needs: Health and issues, Objects and servers, Lineage, Event feed.
  4. Optionally choose a Site, so the application sees only that site, and an Expires date.
  5. Choose Create key, copy the key and give it to the application's owner. It is not shown again.

The list shows when each key was last used and from which address. Regenerate replaces a key's secret: the old key stops working at once. Revoke ends a key for good; revoked and expired keys are hidden unless you tick Show revoked and expired.

An application that runs as a Windows account with the Viewer role can call the public API without a key.

Subscribe a webhook

A webhook sends issue changes to a URL as they happen, within about a minute, in batches of up to 100 events. The receiver is built by the application's owner; the Public API Reference has samples.

Webhooks tab with one webhook retrying and one active, Add webhook (1) and a webhook's menu (5)
Add webhook dialog with the name and URL (2), the events, severity, site and object kinds (3) and Save (4)
  1. On the Webhooks tab, choose Add webhook.
  2. Enter a Name and the receiver's URL.
  3. Tick the Events to send. Object health changed is the one to use for "tell me when something fails". Optionally choose a minimum Severity, a Site, or only some Objects kinds.
  4. Choose Save, copy the Signing secret and give it to the receiver's owner. It is not shown again.
  5. Choose Send test from the webhook's menu. The receiver should answer within 15 seconds; the result appears as a message and in Delivery history.

The receiver checks every post's X-PINexus-Signature with the signing secret and rejects posts that do not match. New signing secret replaces the secret at once, so give the new one to the receiver before posts can be accepted again.

Watch webhook delivery

The Webhooks list shows each webhook's state, how many events it is Behind and its last delivery.

  • Active: delivering.
  • Retrying: the receiver failed, and PI Nexus+ sends the same events again, in order, every 1 to 30 minutes. The message under Last delivery says what the receiver answered.
  • Paused: paused by you, or after 72 hours of failures, which also shows a warning above the tabs and under Admin > Support > Readiness. Fix the receiver, then choose Resume: delivery continues from the last event the receiver accepted.

Events are kept for 14 days. A receiver that was down longer gets a gap notice when it resumes and must read the open issues again; one that was down for less loses nothing. An application can also read the same events itself from /api/v1/events, which suits one that polls instead of receiving webhooks.

Reference: Public API Reference