canonical: https://jentic.com/apis/thruk.org/thruk

# Thruk REST API

Thruk REST API exposes monitoring data from Naemon, Nagios, Icinga, and Shinken monitoring systems. It provides access to hosts, services, hostgroups, servicegroups, contacts, commands, downtimes, comments, notifications, and more. The API exposes 42 endpoints secured with apiKey, basic authentication.

## For AI agents

Programmatically list all hosts, get a specific host. Covers 42 operations with apiKey, basic authentication.

## Scope

Does not handle payments, crm, or developer tools - use for communications only.

## Capabilities

- List all hosts
- Get a specific host
- Schedule downtime for a host
- Query and filter Thruk REST API records by parameters
- Monitor Thruk REST API operational status and events

## Use cases

### Communications Operations

Use the Thruk REST API to perform communications operations programmatically. The API provides 42 endpoints covering core functionality including list all hosts, get a specific host, schedule downtime for a host.

Example prompt: Call GET /hosts to list all hosts

### Automated Alerts Management

Automate alerts operations by combining multiple Thruk REST API endpoints. Agents can get a specific host and then schedule downtime for a host in a single workflow.

Example prompt: Call GET `/hosts/{name}` to get a specific host, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Thruk REST API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle apiKey, basic tokens manually.

Example prompt: Search Jentic for 'list all hosts', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/hosts` | List all hosts |
| GET | `/hosts/{name}` | Get a specific host |
| POST | `/hosts/{name}/cmd/schedule_host_downtime` | Schedule downtime for a host |
| GET | `/services` | List all services |
| GET | `/hosts/{hostName}/services/{description}` | Get a specific service |
| GET | `/hostgroups` | List all host groups |
| GET | `/servicegroups` | List all service groups |
| GET | `/contacts` | List all contacts |

## Key resources

- **Alerts** — Operations for alerts
- **Checks** — Operations for checks
- **Cmd** — Operations for cmd
- **Commands** — Operations for commands
- **Comments** — Operations for comments

## Why Jentic

- **Setup:** Wiring the Thruk REST API by hand means choosing between its X-Thruk-Auth-Key header and basic auth, filling in the {server} host for your own Thruk install, and building the host and service calls yourself. Through Jentic you install once, import the Thruk REST API from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** Thruk puts the host name in the URL path (`/hosts/{name}`, `/hosts/{name}/cmd/schedule_host_downtime`), so a rule can pin your agent to one host: it can read that host and its services and nothing else. You choose the operations it may call, so state-changing ones like scheduling host downtime are not included unless you add them.
- **Credential handling:** Your Thruk credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'list all hosts' or 'schedule host downtime', and Jentic returns the matching Thruk REST API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Twilio** — Alternative communications API
- **Sendgrid** — Alternative communications API
- **Pusher** — Complementary communications API

## FAQ

### What authentication does the Thruk REST API use?

The Thruk REST API uses apiKey, basic authentication. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I list all hosts with the Thruk REST API?

Yes. Use the GET /hosts endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Thruk REST API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I list all hosts through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'list all hosts'. Jentic returns the matching Thruk REST API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Thruk REST API have?

The Thruk REST API exposes 42 endpoints covering alerts, checks, cmd operations.

### Can I limit what my agent is allowed to do with the Thruk REST API?

Yes. Jentic One is self-hosted by you, so your own rules decide which Thruk operations and credentials the agent may use. Because Thruk puts the host name in the URL path (for example `/hosts/{name}` and `/hosts/{name}/cmd/schedule_host_downtime`), you can pin the agent to a single host and let it read only that host and its services. State-changing calls such as scheduling host downtime are not available to the agent unless you explicitly allow them.
