sentrix-sdk
v1.0.0
Published
Official SDK for Sentrix — uptime monitoring, security scanning, status pages, and testimonials API
Downloads
125
Maintainers
Readme
sentrix-sdk
Official Node.js SDK for Sentrix — uptime monitoring, security scanning, status pages, and testimonials.
Install
npm install sentrix-sdkUsage
import SentrixClient from "sentrix-sdk";
const sentrix = new SentrixClient({
apiKey: "sx_your_api_key_here",
});
// List monitors
const { monitors } = await sentrix.getMonitors();
// Create a monitor
const { monitor } = await sentrix.createMonitor({
url: "https://example.com",
name: "Example",
interval: 60,
});
// Get monitor details with checks and incidents
const details = await sentrix.getMonitor(monitor.id);
// Security scan
const { scan } = await sentrix.createScan({
target: "https://example.com",
});
// Alert channels
await sentrix.createAlert({
type: "email",
config: { email: "[email protected]" },
});
// Testimonial collections
await sentrix.createCollection({
slug: "my-product",
name: "My Product Reviews",
});API Reference
Monitors
getMonitors()— List all monitorscreateMonitor(data)— Create a monitorgetMonitor(id)— Get monitor with checks and incidentsupdateMonitor(id, data)— Update a monitordeleteMonitor(id)— Delete a monitor
Status Pages
getStatusPages()— List status pagescreateStatusPage(data)— Create a status page
Security
getScans()— List security scanscreateScan(data)— Start a security scan
Alerts
getAlerts()— List alert channelscreateAlert(data)— Create an alert channeltoggleAlert(id)— Enable/disable an alertdeleteAlert(id)— Delete an alert
Testimonials
getCollections()— List testimonial collectionscreateCollection(data)— Create a collection
License
MIT
