- Replace gray->cool-steel, blue/indigo->cerulean, red->sweet-salmon, yellow/amber->wheat - Dark sidebar: sidebar/footer use cool-steel-800 bg, text lightened for contrast - ~11,600 color replacements across ~99 files - Update tests for new color class names
4835 lines
210 KiB
Text
4835 lines
210 KiB
Text
<!-- Sidebar -->
|
|
<div class="hidden lg:fixed lg:inset-y-0 lg:z-40 lg:flex lg:w-72 lg:flex-col xl:w-80">
|
|
<div class="flex grow flex-col gap-y-5 overflow-y-auto border-r border-zinc-900/10 px-6 pt-4 pb-8 dark:border-white/10">
|
|
<!-- Logo -->
|
|
<div class="flex h-16 shrink-0 items-center">
|
|
<.link navigate={~p"/"} class="text-2xl font-bold text-zinc-900 dark:text-white">
|
|
Towerops API
|
|
</.link>
|
|
</div>
|
|
|
|
<!-- Navigation -->
|
|
<nav class="flex flex-1 flex-col">
|
|
<ul role="list" class="flex flex-1 flex-col gap-y-7">
|
|
<!-- Guides Section -->
|
|
<li>
|
|
<h2 class="text-xs font-semibold text-zinc-900 dark:text-white">Guides</h2>
|
|
<ul role="list" class="mt-3 space-y-1 border-l border-zinc-900/10 dark:border-white/5">
|
|
<li>
|
|
<a
|
|
href="#introduction"
|
|
data-nav-link="introduction"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Introduction
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#authentication"
|
|
data-nav-link="authentication"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Authentication
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#errors"
|
|
data-nav-link="errors"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Errors
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<!-- Resources Section -->
|
|
<li>
|
|
<h2 class="text-xs font-semibold text-zinc-900 dark:text-white">Resources</h2>
|
|
<ul role="list" class="mt-3 space-y-1 border-l border-zinc-900/10 dark:border-white/5">
|
|
<li>
|
|
<a
|
|
href="#sites"
|
|
data-nav-link="sites"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Sites
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#devices"
|
|
data-nav-link="devices"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Devices
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#account-data"
|
|
data-nav-link="account-data"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Account Data (GDPR)
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#alerts"
|
|
data-nav-link="alerts"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Alerts
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#agents"
|
|
data-nav-link="agents"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Agents
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#organization"
|
|
data-nav-link="organization"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Organization
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#members"
|
|
data-nav-link="members"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Members
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#invitations"
|
|
data-nav-link="invitations"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Invitations
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#integrations"
|
|
data-nav-link="integrations"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Integrations
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#checks"
|
|
data-nav-link="checks"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Checks
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#check-results"
|
|
data-nav-link="check-results"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Check Results & Metrics
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#activity"
|
|
data-nav-link="activity"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Activity Feed
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#graphs"
|
|
data-nav-link="graphs"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Graphs & Live Polling
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#coverages"
|
|
data-nav-link="coverages"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
RF Coverages
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#maintenance-windows"
|
|
data-nav-link="maintenance-windows"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Maintenance Windows
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#schedules"
|
|
data-nav-link="schedules"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
On-Call Schedules
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="#escalation-policies"
|
|
data-nav-link="escalation-policies"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Escalation Policies
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<!-- Tools Section -->
|
|
<li>
|
|
<h2 class="text-xs font-semibold text-zinc-900 dark:text-white">Tools</h2>
|
|
<ul role="list" class="mt-3 space-y-1 border-l border-zinc-900/10 dark:border-white/5">
|
|
<li>
|
|
<a
|
|
href="#terraform"
|
|
data-nav-link="terraform"
|
|
class="nav-link block py-1 pl-4 pr-3 text-sm text-cool-steel-600 transition hover:text-cool-steel-900 dark:text-cool-steel-400 dark:hover:text-white"
|
|
>
|
|
Terraform Provider
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Main content -->
|
|
<div class="lg:ml-72 xl:ml-80">
|
|
<div class="relative flex h-full flex-col px-4 pt-14 sm:px-6 lg:px-8">
|
|
<main class="flex-auto max-w-7xl">
|
|
<!-- Introduction -->
|
|
<section id="introduction" class="scroll-mt-24 mb-16">
|
|
<h1 class="text-4xl font-bold tracking-tight text-zinc-900 dark:text-white sm:text-5xl">
|
|
Towerops API Reference
|
|
</h1>
|
|
<p class="mt-4 text-lg text-cool-steel-600 dark:text-cool-steel-400">
|
|
Use the Towerops API to manage your network monitoring infrastructure programmatically. Create and monitor sites, devices, and alerts.
|
|
</p>
|
|
<div class="mt-8 rounded-lg border border-zinc-900/10 bg-cool-steel-50 p-4 dark:border-white/10 dark:bg-cool-steel-900/40">
|
|
<h3 class="text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Official clients
|
|
</h3>
|
|
<p class="mt-2 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Drive Towerops as code. The Ansible collection wraps every resource on this page with idempotent modules: <a
|
|
href="https://codeberg.org/towerops/ansible"
|
|
class="font-medium text-emerald-600 hover:underline dark:text-emerald-400"
|
|
>codeberg.org/towerops/ansible</a>.
|
|
</p>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Authentication -->
|
|
<section id="authentication" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Authentication
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
All API requests require authentication using an API token. Include your token in the Authorization header:
|
|
</p>
|
|
<div class="mt-6 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl https://towerops.net/api/v1/sites \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
API tokens are created and managed in your organization settings. Each token is scoped to a single organization.
|
|
</p>
|
|
</section>
|
|
|
|
<!-- Errors -->
|
|
<section id="errors" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Errors
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
The API uses conventional HTTP response codes to indicate success or failure:
|
|
</p>
|
|
<div class="mt-6">
|
|
<table class="min-w-full divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<thead>
|
|
<tr>
|
|
<th class="py-3 text-left text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Code
|
|
</th>
|
|
<th class="py-3 text-left text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Description
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<tr>
|
|
<td class="py-3 text-sm font-mono text-emerald-600 dark:text-emerald-400">200</td>
|
|
<td class="py-3 text-sm text-cool-steel-600 dark:text-cool-steel-400">Success</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 text-sm font-mono text-emerald-600 dark:text-emerald-400">201</td>
|
|
<td class="py-3 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Created successfully
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 text-sm font-mono text-sweet-salmon-600 dark:text-sweet-salmon-400">
|
|
400
|
|
</td>
|
|
<td class="py-3 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Bad request - missing or invalid parameters
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 text-sm font-mono text-sweet-salmon-600 dark:text-sweet-salmon-400">
|
|
401
|
|
</td>
|
|
<td class="py-3 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Unauthorized - invalid or missing API token
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 text-sm font-mono text-sweet-salmon-600 dark:text-sweet-salmon-400">
|
|
403
|
|
</td>
|
|
<td class="py-3 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Forbidden - you don't have access to this resource
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 text-sm font-mono text-sweet-salmon-600 dark:text-sweet-salmon-400">
|
|
404
|
|
</td>
|
|
<td class="py-3 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Not found - resource doesn't exist
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 text-sm font-mono text-sweet-salmon-600 dark:text-sweet-salmon-400">
|
|
422
|
|
</td>
|
|
<td class="py-3 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Unprocessable entity - validation errors
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Sites Resource -->
|
|
<section id="sites" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Sites
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Sites represent physical locations where your network devices are deployed. Each site can have multiple devices and may have default SNMP configuration.
|
|
</p>
|
|
|
|
<!-- Site Model -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">The site model</h3>
|
|
<div class="mt-6">
|
|
<dl class="divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Unique identifier for the site (UUID).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
name
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
The name of the site.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
location
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Physical location or address of the site.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
snmp_community
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Default SNMP community string for devices at this site (optional).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
inserted_at
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
timestamp
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Timestamp when the site was created.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- List all sites -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">List all sites</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/sites
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<!-- Left column - description -->
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Lists all sites for the authenticated organization.
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Right column - code example -->
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/sites \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"sites": [
|
|
{
|
|
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"name": "Main Office",
|
|
"location": "New York, NY",
|
|
"snmp_community": "public",
|
|
"inserted_at": "2026-01-15T19:44:25Z"
|
|
}
|
|
]
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Create a site -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Create a site</h3>
|
|
<span class="inline-flex items-center rounded-md bg-cerulean-50 px-2 py-1 text-xs font-medium text-cerulean-700 ring-1 ring-inset ring-cerulean-600/20 dark:bg-cerulean-400/10 dark:text-cerulean-400 dark:ring-cerulean-400/30">
|
|
POST
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/sites
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<!-- Left column -->
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Creates a new site for the authenticated organization.
|
|
</p>
|
|
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Required parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
name
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
The name of the site.
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
location
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Physical location of the site.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Optional parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
snmp_community
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Default SNMP community string for devices at this site.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
|
|
<!-- Right column -->
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl https://towerops.net/api/v1/sites \
|
|
-H "Authorization: Bearer #{@sample_token}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"site": {
|
|
"name": "Main Office",
|
|
"location": "New York, NY",
|
|
"snmp_community": "public"
|
|
}
|
|
}'
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"name": "Main Office",
|
|
"location": "New York, NY",
|
|
"snmp_community": "public",
|
|
"inserted_at": "2026-01-15T19:44:25Z"
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Get a site -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Retrieve a site</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/sites/:id
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Retrieves a single site by ID.
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl https://towerops.net/api/v1/sites/550e8400-e29b-41d4-a716-446655440000 \
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"name": "Main Office",
|
|
"location": "New York, NY",
|
|
"snmp_community": "public",
|
|
"inserted_at": "2026-01-15T19:44:25Z"
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Update a site -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Update a site</h3>
|
|
<span class="inline-flex items-center rounded-md bg-wheat-50 px-2 py-1 text-xs font-medium text-wheat-700 ring-1 ring-inset ring-wheat-600/20 dark:bg-wheat-400/10 dark:text-wheat-400 dark:ring-wheat-400/30">
|
|
PATCH
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/sites/:id
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Updates an existing site. Only provided fields will be updated.
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X PATCH https://towerops.net/api/v1/sites/550e8400-e29b-41d4-a716-446655440000 \
|
|
-H "Authorization: Bearer #{@sample_token}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"site": {
|
|
"name": "Updated Office Name"
|
|
}
|
|
}'
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"name": "Updated Office Name",
|
|
"location": "New York, NY",
|
|
"snmp_community": "public",
|
|
"inserted_at": "2026-01-15T19:44:25Z"
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Delete a site -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Delete a site</h3>
|
|
<span class="inline-flex items-center rounded-md bg-sweet-salmon-50 px-2 py-1 text-xs font-medium text-sweet-salmon-700 ring-1 ring-inset ring-sweet-salmon-600/20 dark:bg-sweet-salmon-400/10 dark:text-sweet-salmon-400 dark:ring-sweet-salmon-400/30">
|
|
DELETE
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/sites/:id
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Deletes a site. Note: This will also delete all devices associated with the site.
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X DELETE https://towerops.net/api/v1/sites/550e8400-e29b-41d4-a716-446655440000 \
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"success": true
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Devices Resource -->
|
|
<section id="devices" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Devices
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Devices are network equipment monitored by Towerops. Each device belongs to a site and can be monitored via ICMP ping and SNMP.
|
|
</p>
|
|
|
|
<!-- Device Model -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">The device model</h3>
|
|
<div class="mt-6">
|
|
<dl class="divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Unique identifier for the device (UUID).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
name
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
The name of the device.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
ip_address
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
IP address of the device.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
site_id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
ID of the site this device belongs to.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
description
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Optional description of the device.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
monitoring_enabled
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
boolean
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Whether monitoring is enabled for this device.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
check_interval_seconds
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
integer
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
How often to poll this device (in seconds).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
snmp_enabled
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
boolean
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Whether SNMP monitoring is enabled.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
snmp_version
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
SNMP version to use (e.g., "2c").
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
snmp_port
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
integer
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
SNMP port (default: 161).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
inserted_at
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
timestamp
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Timestamp when the device was created.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- List all devices -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">List all devices</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/devices
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Lists all devices for the authenticated organization.
|
|
</p>
|
|
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Optional parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
site_id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Filter devices by site ID.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/devices \
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"devices": [
|
|
{
|
|
"id": "650e8400-e29b-41d4-a716-446655440001",
|
|
"name": "Core Router",
|
|
"ip_address": "192.168.1.1",
|
|
"site_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"monitoring_enabled": true,
|
|
"snmp_enabled": true,
|
|
"inserted_at": "2026-01-15T19:44:25Z"
|
|
}
|
|
]
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Create a device -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Create a device</h3>
|
|
<span class="inline-flex items-center rounded-md bg-cerulean-50 px-2 py-1 text-xs font-medium text-cerulean-700 ring-1 ring-inset ring-cerulean-600/20 dark:bg-cerulean-400/10 dark:text-cerulean-400 dark:ring-cerulean-400/30">
|
|
POST
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/devices
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Creates a new device.
|
|
</p>
|
|
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Required parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
site_id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
ID of the site this device belongs to.
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
name
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
The name of the device.
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
ip_address
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
IP address of the device.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Optional parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
description
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Description of the device.
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
monitoring_enabled
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
boolean
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Enable monitoring (default: true).
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
snmp_enabled
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
boolean
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Enable SNMP monitoring (default: true).
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
snmp_version
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
SNMP version (default: "2c").
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
snmp_community
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
SNMP community string (inherits from site/org if not set).
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
snmp_port
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
integer
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
SNMP port (default: 161).
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl https://towerops.net/api/v1/devices \
|
|
-H "Authorization: Bearer #{@sample_token}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"device": {
|
|
"site_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"name": "Core Router",
|
|
"ip_address": "192.168.1.1",
|
|
"description": "Main router",
|
|
"snmp_community": "public"
|
|
}
|
|
}'
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"id": "650e8400-e29b-41d4-a716-446655440001",
|
|
"name": "Core Router",
|
|
"ip_address": "192.168.1.1",
|
|
"site_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"monitoring_enabled": true,
|
|
"snmp_enabled": true,
|
|
"inserted_at": "2026-01-15T19:44:25Z"
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Get a device -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Retrieve a device</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/devices/:id
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Retrieves a single device by ID, including all configuration details.
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl https://towerops.net/api/v1/devices/650e8400-e29b-41d4-a716-446655440001 \
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"id": "650e8400-e29b-41d4-a716-446655440001",
|
|
"name": "Core Router",
|
|
"ip_address": "192.168.1.1",
|
|
"site_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"description": "Main router",
|
|
"monitoring_enabled": true,
|
|
"check_interval_seconds": 300,
|
|
"snmp_enabled": true,
|
|
"snmp_version": "2c",
|
|
"snmp_port": 161,
|
|
"inserted_at": "2026-01-15T19:44:25Z"
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Update a device -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Update a device</h3>
|
|
<span class="inline-flex items-center rounded-md bg-wheat-50 px-2 py-1 text-xs font-medium text-wheat-700 ring-1 ring-inset ring-wheat-600/20 dark:bg-wheat-400/10 dark:text-wheat-400 dark:ring-wheat-400/30">
|
|
PATCH
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/devices/:id
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Updates an existing device. Only provided fields will be updated.
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X PATCH https://towerops.net/api/v1/devices/650e8400-e29b-41d4-a716-446655440001 \
|
|
-H "Authorization: Bearer #{@sample_token}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"device": {
|
|
"name": "Updated Router Name",
|
|
"monitoring_enabled": false
|
|
}
|
|
}'
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"id": "650e8400-e29b-41d4-a716-446655440001",
|
|
"name": "Updated Router Name",
|
|
"ip_address": "192.168.1.1",
|
|
"site_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"description": "Main router",
|
|
"monitoring_enabled": false,
|
|
"check_interval_seconds": 300,
|
|
"snmp_enabled": true,
|
|
"snmp_version": "2c",
|
|
"snmp_port": 161,
|
|
"inserted_at": "2026-01-15T19:44:25Z"
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Delete a device -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Delete a device</h3>
|
|
<span class="inline-flex items-center rounded-md bg-sweet-salmon-50 px-2 py-1 text-xs font-medium text-sweet-salmon-700 ring-1 ring-inset ring-sweet-salmon-600/20 dark:bg-sweet-salmon-400/10 dark:text-sweet-salmon-400 dark:ring-sweet-salmon-400/30">
|
|
DELETE
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/devices/:id
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Deletes a device. Note: This will also delete all monitoring data associated with the device.
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X DELETE https://towerops.net/api/v1/devices/650e8400-e29b-41d4-a716-446655440001 \
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"success": true
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Account Data Resource (GDPR) -->
|
|
<section id="account-data" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Account Data (GDPR)
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
GDPR Right to Access endpoint that allows users to download all their personal data in JSON format. This endpoint complies with Article 15 of GDPR.
|
|
</p>
|
|
|
|
<div class="mt-6 rounded-lg bg-wheat-50 dark:bg-wheat-900/10 p-4 border border-wheat-200 dark:border-wheat-800">
|
|
<div class="flex">
|
|
<div class="flex-shrink-0">
|
|
<svg class="h-5 w-5 text-wheat-400" viewBox="0 0 20 20" fill="currentColor">
|
|
<path
|
|
fill-rule="evenodd"
|
|
d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z"
|
|
clip-rule="evenodd"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
<div class="ml-3">
|
|
<h3 class="text-sm font-medium text-wheat-800 dark:text-wheat-200">
|
|
Authentication Difference
|
|
</h3>
|
|
<div class="mt-2 text-sm text-wheat-700 dark:text-wheat-300">
|
|
<p>
|
|
This endpoint requires <strong>browser session authentication</strong>, not API tokens. Users must be logged into their Towerops account via the web interface to access this endpoint.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Export all account data -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Export all account data
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/account/data
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<!-- Left column - description -->
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Downloads all personal data associated with the authenticated user account as a JSON file. This includes:
|
|
</p>
|
|
|
|
<ul class="mt-4 space-y-2 text-sm text-cool-steel-600 dark:text-cool-steel-400 list-disc list-inside">
|
|
<li>Profile information (email, name, timezone)</li>
|
|
<li>Organizations and membership roles</li>
|
|
<li>Devices across all organizations</li>
|
|
<li>Recent alerts (last 90 days)</li>
|
|
<li>Audit logs (up to 1,000 most recent)</li>
|
|
</ul>
|
|
|
|
<div class="mt-6 rounded-lg bg-cerulean-50 dark:bg-cerulean-900/10 p-4 border border-cerulean-200 dark:border-cerulean-800">
|
|
<p class="text-sm text-cerulean-700 dark:text-cerulean-300">
|
|
<strong>Privacy Note:</strong>
|
|
Sensitive data like SNMP community strings are redacted from the export for security.
|
|
</p>
|
|
</div>
|
|
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Authentication
|
|
</h4>
|
|
<p class="mt-2 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Requires active browser session with CSRF token. Cannot be accessed via API tokens.
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Right column - code example -->
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request (Browser)</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
# This endpoint requires browser authentication
|
|
# Access via logged-in browser session:
|
|
GET https://towerops.net/api/v1/account/data
|
|
|
|
# Or via curl with session cookie:
|
|
curl https://towerops.net/api/v1/account/data \
|
|
-H "Cookie: _towerops_key=YOUR_SESSION_COOKIE"
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
{
|
|
"profile": {
|
|
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"email": "user@example.com",
|
|
"name": "John Doe",
|
|
"timezone": "America/New_York",
|
|
"is_superuser": false,
|
|
"confirmed_at": "2026-01-15T10:30:00Z",
|
|
"inserted_at": "2026-01-15T10:00:00Z",
|
|
"updated_at": "2026-01-20T14:22:00Z"
|
|
},
|
|
"credentials": [
|
|
{
|
|
"id": "750e8400-e29b-41d4-a716-446655440002",
|
|
"label": "MacBook Pro Touch ID",
|
|
"public_key_spki": "MFkwEwYHKoZIzj0CAQYIKoZI...",
|
|
"last_used_at": "2026-01-28T12:15:00Z",
|
|
"inserted_at": "2026-01-15T10:35:00Z"
|
|
}
|
|
],
|
|
"organizations": [
|
|
{
|
|
"id": "850e8400-e29b-41d4-a716-446655440003",
|
|
"name": "Acme Networks",
|
|
"slug": "acme-networks",
|
|
"role": "owner",
|
|
"inserted_at": "2026-01-15T10:32:00Z",
|
|
"updated_at": "2026-01-15T10:32:00Z"
|
|
}
|
|
],
|
|
"devices": [
|
|
{
|
|
"id": "650e8400-e29b-41d4-a716-446655440001",
|
|
"name": "Core Router",
|
|
"ip_address": "192.168.1.1",
|
|
"snmp_community": "[REDACTED]",
|
|
"monitoring_enabled": true,
|
|
"snmp_enabled": true,
|
|
"status": "up",
|
|
"organization": {
|
|
"id": "850e8400-e29b-41d4-a716-446655440003",
|
|
"name": "Acme Networks"
|
|
},
|
|
"site": {
|
|
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"name": "Main Office"
|
|
},
|
|
"inserted_at": "2026-01-16T09:00:00Z",
|
|
"updated_at": "2026-01-28T08:30:00Z"
|
|
}
|
|
],
|
|
"alerts": [
|
|
{
|
|
"id": "950e8400-e29b-41d4-a716-446655440004",
|
|
"alert_type": "equipment_down",
|
|
"severity": "critical",
|
|
"message": "Device is not responding to ping",
|
|
"triggered_at": "2026-01-27T15:45:00Z",
|
|
"resolved_at": "2026-01-27T16:10:00Z",
|
|
"acknowledged_at": null,
|
|
"device": {
|
|
"id": "650e8400-e29b-41d4-a716-446655440001",
|
|
"name": "Core Router"
|
|
},
|
|
"inserted_at": "2026-01-27T15:45:00Z"
|
|
}
|
|
],
|
|
"audit_logs": [
|
|
{
|
|
"id": "150e8400-e29b-41d4-a716-446655440005",
|
|
"action": "user.login",
|
|
"actor_email": "user@example.com",
|
|
"target_user_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"metadata": {
|
|
"ip_address": "203.0.113.42",
|
|
"user_agent": "Mozilla/5.0..."
|
|
},
|
|
"inserted_at": "2026-01-28T08:00:00Z"
|
|
}
|
|
],
|
|
"export_info": {
|
|
"exported_at": "2026-01-28T19:50:00Z",
|
|
"format": "JSON",
|
|
"gdpr_article": "Article 15 - Right to Access"
|
|
}
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950 p-4">
|
|
<p class="text-xs font-medium text-zinc-400 mb-2">Response Headers</p>
|
|
<pre class="text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
Content-Type: application/json
|
|
Content-Disposition: attachment; filename="towerops-data-{user_id}-{timestamp}.json"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Alerts Resource -->
|
|
<section id="alerts" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Alerts
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Alerts represent monitoring events triggered when a device check fails or recovers. You can list, view, acknowledge, and resolve alerts.
|
|
</p>
|
|
|
|
<!-- Alert Model -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">The alert model</h3>
|
|
<div class="mt-6">
|
|
<dl class="divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Unique identifier (UUID).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
alert_type
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Type of alert (e.g. "ping_down", "snmp_down").
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
message
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Human-readable alert message.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
triggered_at
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
timestamp
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
When the alert was triggered.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
acknowledged_at
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
timestamp
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
When the alert was acknowledged (null if not acknowledged).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
resolved_at
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
timestamp
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
When the alert was resolved (null if still active).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
device_id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
The device this alert belongs to.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
device_name
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Name of the associated device.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
acknowledged_by_email
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Email of the user who acknowledged this alert.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
gaiia_impact
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
AI-generated impact assessment (if available).
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- List alerts -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">List all alerts</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/alerts
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Returns all alerts for the authenticated organization.
|
|
</p>
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Optional parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
status
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Filter by status (e.g. "active", "acknowledged", "resolved").
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
device_id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Filter alerts for a specific device.
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
limit
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
integer
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Maximum number of alerts to return.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/alerts \\
|
|
-H "Authorization: Bearer #{@sample_token}" \\
|
|
-d status=active
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": [
|
|
{
|
|
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
"alert_type": "ping_down",
|
|
"message": "Device is not responding to ping",
|
|
"triggered_at": "2026-02-14T10:30:00Z",
|
|
"acknowledged_at": null,
|
|
"resolved_at": null,
|
|
"device_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"device_name": "Core Router",
|
|
"acknowledged_by_email": null,
|
|
"gaiia_impact": "High - affects 12 downstream devices",
|
|
"inserted_at": "2026-02-14T10:30:00Z"
|
|
}
|
|
]
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Show alert -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Retrieve an alert</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/alerts/:id
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Retrieves a single alert by its ID.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl https://towerops.net/api/v1/alerts/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Acknowledge alert -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Acknowledge an alert
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-cerulean-50 px-2 py-1 text-xs font-medium text-cerulean-700 ring-1 ring-inset ring-cerulean-600/20 dark:bg-cerulean-400/10 dark:text-cerulean-400 dark:ring-cerulean-400/30">
|
|
POST
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/alerts/:id/acknowledge
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Marks an alert as acknowledged. The acknowledging user is recorded automatically.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X POST https://towerops.net/api/v1/alerts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/acknowledge \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": {
|
|
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
"alert_type": "ping_down",
|
|
"message": "Device is not responding to ping",
|
|
"triggered_at": "2026-02-14T10:30:00Z",
|
|
"acknowledged_at": "2026-02-14T11:00:00Z",
|
|
"resolved_at": null,
|
|
"device_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"device_name": "Core Router",
|
|
"acknowledged_by_email": "admin@example.com",
|
|
"gaiia_impact": "High - affects 12 downstream devices",
|
|
"inserted_at": "2026-02-14T10:30:00Z"
|
|
}
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Resolve alert -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Resolve an alert</h3>
|
|
<span class="inline-flex items-center rounded-md bg-cerulean-50 px-2 py-1 text-xs font-medium text-cerulean-700 ring-1 ring-inset ring-cerulean-600/20 dark:bg-cerulean-400/10 dark:text-cerulean-400 dark:ring-cerulean-400/30">
|
|
POST
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/alerts/:id/resolve
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Manually resolves an alert. Alerts may also be resolved automatically when the underlying condition clears.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X POST https://towerops.net/api/v1/alerts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/resolve \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Agents Resource -->
|
|
<section id="agents" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Agents
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Agents are lightweight monitoring agents that run on your infrastructure to collect device data. Each agent has a token used for authentication.
|
|
</p>
|
|
|
|
<!-- Agent Model -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">The agent model</h3>
|
|
<div class="mt-6">
|
|
<dl class="divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Unique identifier (UUID).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
name
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Name of the agent.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
enabled
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
boolean
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Whether the agent is enabled.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
last_seen_at
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
timestamp
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
When the agent last checked in.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
last_ip
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Last known IP address of the agent.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
metadata
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
object
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Agent metadata (version, OS, etc.).
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- List agents -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">List all agents</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/agents
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Returns all agent tokens for the authenticated organization.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/agents \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": [
|
|
{
|
|
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
|
|
"name": "datacenter-agent-01",
|
|
"enabled": true,
|
|
"last_seen_at": "2026-02-14T11:00:00Z",
|
|
"last_ip": "10.0.1.50",
|
|
"metadata": {"version": "1.4.2", "os": "linux"},
|
|
"inserted_at": "2026-01-10T08:00:00Z"
|
|
}
|
|
]
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Create agent -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Create an agent</h3>
|
|
<span class="inline-flex items-center rounded-md bg-cerulean-50 px-2 py-1 text-xs font-medium text-cerulean-700 ring-1 ring-inset ring-cerulean-600/20 dark:bg-cerulean-400/10 dark:text-cerulean-400 dark:ring-cerulean-400/30">
|
|
POST
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/agents
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Creates a new agent token. The raw token is returned only once in the response — store it securely.
|
|
</p>
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Required parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
name
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
A descriptive name for the agent.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X POST https://towerops.net/api/v1/agents \\
|
|
-H "Authorization: Bearer #{@sample_token}" \\
|
|
-H "Content-Type: application/json" \\
|
|
-d '{"name": "new-site-agent"}'
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response (201 Created)</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": {
|
|
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
"name": "new-site-agent",
|
|
"enabled": true,
|
|
"last_seen_at": null,
|
|
"last_ip": null,
|
|
"metadata": null,
|
|
"inserted_at": "2026-02-14T11:10:00Z",
|
|
"token": "tow_agent_abc123..."
|
|
}
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Show agent -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Retrieve an agent</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/agents/:id
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Retrieves a single agent by ID. Includes a count of assigned devices.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl https://towerops.net/api/v1/agents/b2c3d4e5-f6a7-8901-bcde-f12345678901 \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": {
|
|
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
|
|
"name": "datacenter-agent-01",
|
|
"enabled": true,
|
|
"last_seen_at": "2026-02-14T11:00:00Z",
|
|
"last_ip": "10.0.1.50",
|
|
"metadata": {"version": "1.4.2", "os": "linux"},
|
|
"inserted_at": "2026-01-10T08:00:00Z",
|
|
"device_count": 24
|
|
}
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Delete agent -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Delete an agent</h3>
|
|
<span class="inline-flex items-center rounded-md bg-sweet-salmon-50 px-2 py-1 text-xs font-medium text-sweet-salmon-700 ring-1 ring-inset ring-sweet-salmon-600/20 dark:bg-sweet-salmon-400/10 dark:text-sweet-salmon-400 dark:ring-sweet-salmon-400/30">
|
|
DELETE
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/agents/:id
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Permanently deletes an agent token. Devices assigned to this agent will need to be reassigned.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X DELETE https://towerops.net/api/v1/agents/b2c3d4e5-f6a7-8901-bcde-f12345678901 \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response (204 No Content)</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
(empty response body)
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Organization Resource -->
|
|
<section id="organization" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Organization
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Retrieve and update settings for the authenticated organization, including SNMP defaults, MikroTik configuration, and general preferences.
|
|
</p>
|
|
|
|
<!-- Organization Model -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
The organization model
|
|
</h3>
|
|
<div class="mt-6">
|
|
<dl class="divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Unique identifier (UUID).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
name
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Organization display name.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
slug
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
URL-friendly identifier.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
subscription_plan
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Current subscription plan.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
snmp_version
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Default SNMP version (v2c or v3).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
snmp_community
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Default SNMP community string.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
mikrotik_enabled
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
boolean
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Whether MikroTik API integration is enabled.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Show organization -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Get organization settings
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/organization
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Returns the full settings for the authenticated organization.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl https://towerops.net/api/v1/organization \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": {
|
|
"id": "org-uuid-here",
|
|
"name": "Acme Networks",
|
|
"slug": "acme-networks",
|
|
"subscription_plan": "pro",
|
|
"use_sites": true,
|
|
"snmp_version": "v2c",
|
|
"snmp_community": "public",
|
|
"snmp_port": 161,
|
|
"snmp_transport": "udp",
|
|
"snmpv3_security_level": null,
|
|
"snmpv3_username": null,
|
|
"snmpv3_auth_protocol": null,
|
|
"snmpv3_priv_protocol": null,
|
|
"mikrotik_enabled": false,
|
|
"mikrotik_username": null,
|
|
"mikrotik_port": null,
|
|
"mikrotik_ssh_port": null,
|
|
"mikrotik_use_ssl": false,
|
|
"default_agent_token_id": null,
|
|
"inserted_at": "2025-06-01T00:00:00Z",
|
|
"updated_at": "2026-02-14T10:00:00Z"
|
|
}
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Update organization -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Update organization settings
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-wheat-50 px-2 py-1 text-xs font-medium text-wheat-700 ring-1 ring-inset ring-wheat-600/20 dark:bg-wheat-400/10 dark:text-wheat-400 dark:ring-wheat-400/30">
|
|
PATCH
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/organization
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Updates organization settings. Only the provided fields are changed.
|
|
</p>
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Parameters (all optional)
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
organization[name]
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Organization display name.
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
organization[snmp_community]
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Default SNMP community string.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X PATCH https://towerops.net/api/v1/organization \\
|
|
-H "Authorization: Bearer #{@sample_token}" \\
|
|
-H "Content-Type: application/json" \\
|
|
-d '{"organization": {"name": "Acme Networks LLC", "snmp_community": "private"}}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Members Resource -->
|
|
<section id="members" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Members
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Manage the users who belong to your organization. You can list members, change roles, and remove members.
|
|
</p>
|
|
|
|
<!-- Member Model -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">The member model</h3>
|
|
<div class="mt-6">
|
|
<dl class="divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
User ID of the member.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
email
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Email address of the member.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
role
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Member's role (e.g. "owner", "admin", "member").
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- List members -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">List all members</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/members
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Returns all members of the authenticated organization.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/members \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": [
|
|
{
|
|
"id": "user-uuid-1",
|
|
"email": "admin@example.com",
|
|
"role": "owner",
|
|
"inserted_at": "2025-06-01T00:00:00Z"
|
|
},
|
|
{
|
|
"id": "user-uuid-2",
|
|
"email": "tech@example.com",
|
|
"role": "admin",
|
|
"inserted_at": "2025-08-15T00:00:00Z"
|
|
}
|
|
]
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Change member role -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Change member role
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-wheat-50 px-2 py-1 text-xs font-medium text-wheat-700 ring-1 ring-inset ring-wheat-600/20 dark:bg-wheat-400/10 dark:text-wheat-400 dark:ring-wheat-400/30">
|
|
PATCH
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/members/:user_id
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Updates a member's role. Cannot change the owner's role.
|
|
</p>
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Required parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
role
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
New role for the member (e.g. "admin", "member").
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X PATCH https://towerops.net/api/v1/members/user-uuid-2 \\
|
|
-H "Authorization: Bearer #{@sample_token}" \\
|
|
-H "Content-Type: application/json" \\
|
|
-d '{"role": "member"}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Remove member -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Remove a member</h3>
|
|
<span class="inline-flex items-center rounded-md bg-sweet-salmon-50 px-2 py-1 text-xs font-medium text-sweet-salmon-700 ring-1 ring-inset ring-sweet-salmon-600/20 dark:bg-sweet-salmon-400/10 dark:text-sweet-salmon-400 dark:ring-sweet-salmon-400/30">
|
|
DELETE
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/members/:user_id
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Removes a member from the organization. The organization owner cannot be removed.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X DELETE https://towerops.net/api/v1/members/user-uuid-2 \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Invitations Resource -->
|
|
<section id="invitations" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Invitations
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Invite new users to your organization. Invitations expire after 7 days.
|
|
</p>
|
|
|
|
<!-- Invitation Model -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
The invitation model
|
|
</h3>
|
|
<div class="mt-6">
|
|
<dl class="divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Unique identifier (UUID).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
email
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Email address of the invited user.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
role
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Role the user will receive upon accepting.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
expires_at
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
timestamp
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
When the invitation expires.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
invited_by_email
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Email of the user who sent the invitation.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- List invitations -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
List pending invitations
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/invitations
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Returns all pending invitations for the organization.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/invitations \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": [
|
|
{
|
|
"id": "inv-uuid-1",
|
|
"email": "newuser@example.com",
|
|
"role": "member",
|
|
"expires_at": "2026-02-21T11:00:00Z",
|
|
"invited_by_email": "admin@example.com",
|
|
"inserted_at": "2026-02-14T11:00:00Z"
|
|
}
|
|
]
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Create invitation -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Create an invitation
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-cerulean-50 px-2 py-1 text-xs font-medium text-cerulean-700 ring-1 ring-inset ring-cerulean-600/20 dark:bg-cerulean-400/10 dark:text-cerulean-400 dark:ring-cerulean-400/30">
|
|
POST
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/invitations
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Sends an invitation to join the organization.
|
|
</p>
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Required parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
email
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Email address to invite.
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
role
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Role to assign (e.g. "admin", "member").
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X POST https://towerops.net/api/v1/invitations \\
|
|
-H "Authorization: Bearer #{@sample_token}" \\
|
|
-H "Content-Type: application/json" \\
|
|
-d '{"email": "newuser@example.com", "role": "member"}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Cancel invitation -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Cancel an invitation
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-sweet-salmon-50 px-2 py-1 text-xs font-medium text-sweet-salmon-700 ring-1 ring-inset ring-sweet-salmon-600/20 dark:bg-sweet-salmon-400/10 dark:text-sweet-salmon-400 dark:ring-sweet-salmon-400/30">
|
|
DELETE
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/invitations/:id
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Cancels a pending invitation.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X DELETE https://towerops.net/api/v1/invitations/inv-uuid-1 \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Integrations Resource -->
|
|
<section id="integrations" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Integrations
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Manage third-party integrations for your organization, such as notification providers and external monitoring systems.
|
|
</p>
|
|
|
|
<!-- Integration Model -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
The integration model
|
|
</h3>
|
|
<div class="mt-6">
|
|
<dl class="divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Unique identifier (UUID).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
provider
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Integration provider name (e.g. "slack", "pagerduty", "email").
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
enabled
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
boolean
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Whether the integration is active.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
sync_interval_minutes
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
integer
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
How often the integration syncs (in minutes).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
last_synced_at
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
timestamp
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
When the integration last synced.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
last_sync_status
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Status of the last sync ("success", "error", etc.).
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- List integrations -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
List all integrations
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/integrations
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Returns all integrations for the organization.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/integrations \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": [
|
|
{
|
|
"id": "intg-uuid-1",
|
|
"provider": "slack",
|
|
"enabled": true,
|
|
"sync_interval_minutes": 5,
|
|
"last_synced_at": "2026-02-14T11:00:00Z",
|
|
"last_sync_status": "success",
|
|
"inserted_at": "2025-12-01T00:00:00Z",
|
|
"updated_at": "2026-02-14T11:00:00Z"
|
|
}
|
|
]
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Create integration -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Create an integration
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-cerulean-50 px-2 py-1 text-xs font-medium text-cerulean-700 ring-1 ring-inset ring-cerulean-600/20 dark:bg-cerulean-400/10 dark:text-cerulean-400 dark:ring-cerulean-400/30">
|
|
POST
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/integrations
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Creates a new integration.
|
|
</p>
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Required parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
integration[provider]
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Provider name (e.g. "slack", "pagerduty").
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Optional parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
integration[enabled]
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
boolean
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Whether to enable the integration immediately (default: true).
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
integration[sync_interval_minutes]
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
integer
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Sync interval in minutes.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X POST https://towerops.net/api/v1/integrations \\
|
|
-H "Authorization: Bearer #{@sample_token}" \\
|
|
-H "Content-Type: application/json" \\
|
|
-d '{"integration": {"provider": "slack", "enabled": true, "sync_interval_minutes": 5}}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Show integration -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Retrieve an integration
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/integrations/:id
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Retrieves a single integration by ID.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl https://towerops.net/api/v1/integrations/intg-uuid-1 \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Update integration -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Update an integration
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-wheat-50 px-2 py-1 text-xs font-medium text-wheat-700 ring-1 ring-inset ring-wheat-600/20 dark:bg-wheat-400/10 dark:text-wheat-400 dark:ring-wheat-400/30">
|
|
PATCH
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/integrations/:id
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Updates an integration's settings.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X PATCH https://towerops.net/api/v1/integrations/intg-uuid-1 \\
|
|
-H "Authorization: Bearer #{@sample_token}" \\
|
|
-H "Content-Type: application/json" \\
|
|
-d '{"integration": {"enabled": false}}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Delete integration -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Delete an integration
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-sweet-salmon-50 px-2 py-1 text-xs font-medium text-sweet-salmon-700 ring-1 ring-inset ring-sweet-salmon-600/20 dark:bg-sweet-salmon-400/10 dark:text-sweet-salmon-400 dark:ring-sweet-salmon-400/30">
|
|
DELETE
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/integrations/:id
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Permanently deletes an integration.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X DELETE https://towerops.net/api/v1/integrations/intg-uuid-1 \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Test integration connection -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Test connection</h3>
|
|
<span class="inline-flex items-center rounded-md bg-cerulean-50 px-2 py-1 text-xs font-medium text-cerulean-700 ring-1 ring-inset ring-cerulean-600/20 dark:bg-cerulean-400/10 dark:text-cerulean-400 dark:ring-cerulean-400/30">
|
|
POST
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/integrations/:id/test
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Tests the connection for an integration to verify it's properly configured.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X POST https://towerops.net/api/v1/integrations/intg-uuid-1/test \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": {
|
|
"status": "ok",
|
|
"provider": "slack"
|
|
}
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Checks Resource -->
|
|
<section id="checks" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Checks
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Service checks monitor the availability and responsiveness of network services. Supported check types: HTTP, TCP, DNS, and ping. SNMP checks are managed internally and are not exposed via this API.
|
|
</p>
|
|
|
|
<!-- Check Model -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">The check model</h3>
|
|
<div class="mt-6">
|
|
<dl class="divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Unique identifier for the check (UUID).
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
name
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
The name of the check.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
check_type
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
The type of check: <code>http</code>, <code>tcp</code>, <code>dns</code>, or <code>ping</code>.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
enabled
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
boolean
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Whether the check is enabled and scheduled to run.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
config
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
object
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Type-specific configuration. HTTP: <code>url</code>, <code>method</code>, <code>expected_status</code>, <code>verify_ssl</code>, <code>follow_redirects</code>, <code>regex</code>. TCP: <code>host</code>, <code>port</code>, <code>send</code>, <code>expect</code>. DNS: <code>hostname</code>, <code>record_type</code>, <code>server</code>, <code>expected</code>. Ping: <code>host</code>, <code>count</code>.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
interval_seconds
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
integer
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
How often the check runs, in seconds. Default: 60.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
current_state
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
integer
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Current check state: 0=OK, 1=WARNING, 2=CRITICAL, 3=UNKNOWN.
|
|
</dd>
|
|
</div>
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
current_state_type
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Current state type: <code>soft</code> or <code>hard</code>.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- List all checks -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">List all checks</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/checks
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Lists all service checks for the authenticated organization. Only returns HTTP, TCP, DNS, and ping checks.
|
|
</p>
|
|
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Optional query parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
check_type
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Filter by check type: <code>http</code>, <code>tcp</code>, <code>dns</code>, or <code>ping</code>.
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
device_id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Filter checks by device UUID.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl -G https://towerops.net/api/v1/checks \
|
|
-H "Authorization: Bearer {token}" \
|
|
-d check_type=http
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
{
|
|
"checks": [
|
|
{
|
|
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
|
|
"name": "Web Health Check",
|
|
"check_type": "http",
|
|
"enabled": true,
|
|
"config": {"url": "https://example.com/health", "expected_status": 200},
|
|
"interval_seconds": 60,
|
|
"current_state": 0,
|
|
"current_state_type": "hard",
|
|
"last_check_at": "2026-03-16T12:00:00Z",
|
|
"inserted_at": "2026-03-15T10:00:00Z"
|
|
}
|
|
]
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Create a check -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Create a check</h3>
|
|
<span class="inline-flex items-center rounded-md bg-cerulean-50 px-2 py-1 text-xs font-medium text-cerulean-700 ring-1 ring-inset ring-cerulean-600/20 dark:bg-cerulean-400/10 dark:text-cerulean-400 dark:ring-cerulean-400/30">
|
|
POST
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/checks
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Creates a new service check for the authenticated organization. The check is automatically scheduled if enabled.
|
|
</p>
|
|
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Required parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
name
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
The name of the check.
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
check_type
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
One of: <code>http</code>, <code>tcp</code>, <code>dns</code>, <code>ping</code>.
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
config
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
object
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Type-specific configuration object. See check model for available fields.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Optional parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
enabled
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
boolean
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Whether the check is enabled. Default: <code>true</code>.
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
device_id
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Associate the check with a device.
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
interval_seconds
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
integer
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
How often the check runs. Default: <code>60</code>.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl https://towerops.net/api/v1/checks \
|
|
-H "Authorization: Bearer {token}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"check": {"name": "Web Health", "check_type": "http", "config": {"url": "https://example.com/health", "expected_status": 200}}}'
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">
|
|
Response <span class="text-zinc-500">201 Created</span>
|
|
</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
{
|
|
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
|
|
"name": "Web Health",
|
|
"check_type": "http",
|
|
"enabled": true,
|
|
"config": {"url": "https://example.com/health", "expected_status": 200},
|
|
"interval_seconds": 60,
|
|
"timeout_ms": 5000,
|
|
"current_state": null,
|
|
"inserted_at": "2026-03-16T10:00:00Z"
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Get a check -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Retrieve a check</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/checks/:id
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Retrieves a single check by its UUID.
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl https://towerops.net/api/v1/checks/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
|
|
-H "Authorization: Bearer {token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Update a check -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Update a check</h3>
|
|
<span class="inline-flex items-center rounded-md bg-wheat-50 px-2 py-1 text-xs font-medium text-wheat-700 ring-1 ring-inset ring-wheat-600/20 dark:bg-wheat-400/10 dark:text-wheat-400 dark:ring-wheat-400/30">
|
|
PATCH
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/checks/:id
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Updates an existing check. Only the provided fields will be updated.
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl -X PATCH https://towerops.net/api/v1/checks/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
|
|
-H "Authorization: Bearer {token}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"check": {"name": "Updated Name", "interval_seconds": 120}}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Delete a check -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Delete a check</h3>
|
|
<span class="inline-flex items-center rounded-md bg-sweet-salmon-50 px-2 py-1 text-xs font-medium text-sweet-salmon-700 ring-1 ring-inset ring-sweet-salmon-600/20 dark:bg-sweet-salmon-400/10 dark:text-sweet-salmon-400 dark:ring-sweet-salmon-400/30">
|
|
DELETE
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/checks/:id
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Deletes a check and cancels any scheduled executions.
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl -X DELETE https://towerops.net/api/v1/checks/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
|
|
-H "Authorization: Bearer {token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
{
|
|
"success": true
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Check Results & Metrics Resource -->
|
|
<section id="check-results" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Check Results & Metrics
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Access monitoring check results, historical metrics, and SNMP interface data for your devices.
|
|
</p>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Device checks -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
List device checks
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/devices/:device_id/checks
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Returns all monitoring checks configured for a device, including the latest result for each check.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/devices/550e8400-e29b-41d4-a716-446655440000/checks \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": [
|
|
{
|
|
"id": "check-uuid-1",
|
|
"name": "ICMP Ping",
|
|
"check_type": "ping",
|
|
"enabled": true,
|
|
"interval_seconds": 60,
|
|
"latest_status": "ok",
|
|
"latest_value": 12.5,
|
|
"latest_checked_at": "2026-02-14T11:10:00Z"
|
|
}
|
|
]
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Device metrics -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Get device metrics
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/devices/:device_id/metrics
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Returns historical check results for a device, useful for graphing and trend analysis.
|
|
</p>
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Optional parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
hours
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
integer
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Number of hours of history to return (default: 24).
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
check_type
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Filter by check type (e.g. "ping", "snmp").
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/devices/550e8400-e29b-41d4-a716-446655440000/metrics \\
|
|
-H "Authorization: Bearer #{@sample_token}" \\
|
|
-d hours=48 \\
|
|
-d check_type=ping
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": [
|
|
{
|
|
"check_id": "check-uuid-1",
|
|
"check_name": "ICMP Ping",
|
|
"check_type": "ping",
|
|
"data": [
|
|
{"timestamp": "2026-02-14T10:00:00Z", "value": 11.2, "status": "ok"},
|
|
{"timestamp": "2026-02-14T10:01:00Z", "value": 13.8, "status": "ok"},
|
|
{"timestamp": "2026-02-14T10:02:00Z", "value": null, "status": "timeout"}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Device interfaces -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
List device interfaces
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/devices/:device_id/interfaces
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Returns SNMP-discovered network interfaces for a device.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/devices/550e8400-e29b-41d4-a716-446655440000/interfaces \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": [
|
|
{
|
|
"id": "iface-uuid-1",
|
|
"if_index": 1,
|
|
"if_name": "GigabitEthernet0/0",
|
|
"if_descr": "GigabitEthernet0/0",
|
|
"if_alias": "Uplink to ISP",
|
|
"if_speed": 1000000000,
|
|
"if_admin_status": "up",
|
|
"if_oper_status": "up",
|
|
"monitored": true
|
|
}
|
|
]
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Activity Feed Resource -->
|
|
<section id="activity" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Activity Feed
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
View a chronological feed of actions and events across your organization.
|
|
</p>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- List activity -->
|
|
<div class="mt-12">
|
|
<div class="flex items-center gap-x-3">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
List organization activity
|
|
</h3>
|
|
<span class="inline-flex items-center rounded-md bg-emerald-50 px-2 py-1 text-xs font-medium text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/30">
|
|
GET
|
|
</span>
|
|
<span class="text-sm font-mono text-cool-steel-600 dark:text-cool-steel-400">
|
|
/api/v1/activity
|
|
</span>
|
|
</div>
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Returns recent activity events for the organization.
|
|
</p>
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Optional parameters
|
|
</h4>
|
|
<dl class="mt-3 divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
limit
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
integer
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Maximum number of events to return (default: 50).
|
|
</dd>
|
|
</div>
|
|
<div class="py-3">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
types
|
|
<span class="ml-2 font-sans text-xs font-normal text-cool-steel-500 dark:text-cool-steel-400">
|
|
string
|
|
</span>
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Comma-separated list of event types to filter by.
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Request</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/activity \\
|
|
-H "Authorization: Bearer #{@sample_token}" \\
|
|
-d limit=20
|
|
""") %></code></pre>
|
|
</div>
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Response</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
{
|
|
"data": [
|
|
{
|
|
"type": "device_created",
|
|
"message": "Device 'Core Router' was added",
|
|
"user_email": "admin@example.com",
|
|
"inserted_at": "2026-02-14T10:30:00Z"
|
|
},
|
|
{
|
|
"type": "alert_triggered",
|
|
"message": "Alert triggered: ping_down on Core Router",
|
|
"user_email": null,
|
|
"inserted_at": "2026-02-14T10:35:00Z"
|
|
}
|
|
]
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Coverages Resource -->
|
|
<section id="coverages" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
RF Coverages
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
RF coverage predictions model where each radio actually reaches. Compute is async — a created or recomputed coverage starts in
|
|
<code>queued</code>
|
|
and progresses through <code>computing</code>
|
|
to <code>ready</code>
|
|
or <code>failed</code>. The status field is present on every response so polling-based clients (Terraform, the <a
|
|
href="https://codeberg.org/towerops/ansible"
|
|
class="font-medium text-emerald-600 hover:underline dark:text-emerald-400"
|
|
>Ansible collection</a>, scripts) can wait for a healthy resource. Outputs include a coloured PNG heatmap, a Float32 GeoTIFF raster, and a downloadable KMZ bundle for Google Earth.
|
|
</p>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">List all coverages</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>GET /api/v1/coverages</code>. Returns every coverage in the authenticated organization, regardless of status.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/coverages \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Create a coverage</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>POST /api/v1/coverages</code>. Creates a new coverage and immediately enqueues compute. Required: <code>name</code>, <code>site_id</code>, <code>antenna_slug</code>, <code>frequency_mhz</code>, <code>tx_power_dbm</code>, <code>height_agl_m</code>, <code>azimuth_deg</code>, <code>radius_m</code>. Optional fields tune cell size, downtilt, foliage, receiver height, and threshold.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl -X POST https://towerops.net/api/v1/coverages \
|
|
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"coverage": {
|
|
"name": "North sector 5 GHz",
|
|
"site_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"antenna_slug": "rf-elements-twistport-symmetrical-horn-30",
|
|
"frequency_mhz": 5800,
|
|
"tx_power_dbm": 22.0,
|
|
"height_agl_m": 30,
|
|
"azimuth_deg": 0,
|
|
"downtilt_deg": 2,
|
|
"radius_m": 6000,
|
|
"cell_size_m": 10
|
|
}
|
|
}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Retrieve a coverage</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>GET /api/v1/coverages/:id</code>. Returns one coverage including its bbox, status, progress percentage, and (when ready) the
|
|
<code>png_path</code>
|
|
+ <code>raster_path</code>
|
|
outputs.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl https://towerops.net/api/v1/coverages/COV_ID \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Update a coverage</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>PATCH /api/v1/coverages/:id</code>. Mutates editable fields (name, antenna parameters, radius, cell size, etc.). Does
|
|
<strong>not</strong>
|
|
auto-recompute — call the recompute endpoint when you want fresh outputs.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl -X PATCH https://towerops.net/api/v1/coverages/COV_ID \
|
|
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"coverage": {"tx_power_dbm": 25.0}}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Recompute a coverage
|
|
</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>POST /api/v1/coverages/:id/recompute</code>. Re-queues the compute pipeline without changing any parameters. Returns
|
|
<code>409 Conflict</code>
|
|
if the coverage is already computing. Useful after a parameter update or after the antenna catalog is refreshed.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X POST https://towerops.net/api/v1/coverages/COV_ID/recompute \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Download as KMZ</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>GET /api/v1/coverages/:id/kmz</code>. Returns a Google Earth-compatible KMZ bundle (KML + PNG). Returns
|
|
<code>409 Conflict</code>
|
|
if the coverage is not yet ready.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -OJ https://towerops.net/api/v1/coverages/COV_ID/kmz \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Delete a coverage</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>DELETE /api/v1/coverages/:id</code>. Removes the coverage and any cached outputs. Returns
|
|
<code>204 No Content</code>
|
|
on success.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X DELETE https://towerops.net/api/v1/coverages/COV_ID \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Maintenance Windows Resource -->
|
|
<section id="maintenance-windows" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Maintenance Windows
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Maintenance windows tell Towerops to suppress alerts for a site or device during planned work. Windows can be one-off or recurring (iCal RRULE).
|
|
</p>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
List maintenance windows
|
|
</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>GET /api/v1/maintenance_windows</code>. Optional <code>filter</code>
|
|
query param accepts <code>active</code>, <code>upcoming</code>, or <code>past</code>.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -G https://towerops.net/api/v1/maintenance_windows \\
|
|
-H "Authorization: Bearer #{@sample_token}" \\
|
|
-d filter=active
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Create a maintenance window
|
|
</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>POST /api/v1/maintenance_windows</code>. Required: <code>name</code>, <code>starts_at</code>, <code>ends_at</code>. Scope to a site or a specific device. Set
|
|
<code>recurring: true</code>
|
|
with a <code>recurrence_rule</code>
|
|
(RRULE) to repeat.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl -X POST https://towerops.net/api/v1/maintenance_windows \
|
|
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"maintenance_window": {
|
|
"name": "Quarterly firmware roll",
|
|
"starts_at": "2026-06-01T05:00:00Z",
|
|
"ends_at": "2026-06-01T09:00:00Z",
|
|
"site_id": "SITE_UUID",
|
|
"suppress_alerts": true
|
|
}
|
|
}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">
|
|
Get / update / delete
|
|
</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Standard CRUD on <code>/api/v1/maintenance_windows/:id</code>. <code>GET</code>
|
|
returns the resource; <code>PATCH</code>
|
|
updates fields with the same body shape as create; <code>DELETE</code>
|
|
returns a JSON success body.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl -X DELETE https://towerops.net/api/v1/maintenance_windows/WINDOW_ID \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Schedules Resource -->
|
|
<section id="schedules" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
On-Call Schedules
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Schedules drive who gets paged when an alert fires. A schedule contains one or more
|
|
<em>layers</em>
|
|
(rotations); each layer has ordered <em>members</em>. Ad-hoc <em>overrides</em>
|
|
let you swap the on-call user for a fixed time window without changing the rotation.
|
|
</p>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Schedule CRUD</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>GET /api/v1/schedules</code>, <code>POST</code>, <code>GET /:id</code>, <code>PATCH /:id</code>, <code>DELETE /:id</code>. Required on create: <code>name</code>, <code>timezone</code>. Showing one schedule returns its layers + overrides nested.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl -X POST https://towerops.net/api/v1/schedules \
|
|
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"schedule": {
|
|
"name": "Primary on-call",
|
|
"description": "Weekly rotation",
|
|
"timezone": "America/Chicago"
|
|
}
|
|
}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Who is on call?</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>GET /api/v1/schedules/:id/on_call</code>. Returns the user currently on call (taking layers and overrides into account), or
|
|
<code>null</code>
|
|
if nobody is.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw("""
|
|
curl https://towerops.net/api/v1/schedules/SCHED_ID/on_call \\
|
|
-H "Authorization: Bearer #{@sample_token}"
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Layers and members</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>POST /api/v1/schedules/:id/layers</code>, <code>PATCH /api/v1/schedules/:id/layers/:layer_id</code>,
|
|
<code>DELETE</code>
|
|
the same. A layer requires <code>name</code>, <code>position</code>,
|
|
<code>rotation_type</code>
|
|
(<code>weekly</code>/<code>daily</code>/<code>custom</code>), <code>rotation_interval</code>, <code>handoff_time</code>, and <code>start_date</code>.
|
|
<br /><br /> Add and remove members with
|
|
<code>POST /:id/layers/:layer_id/members</code>
|
|
(body: <code>user_id</code>, <code>position</code>) and <code>DELETE /:id/layers/:layer_id/members/:member_id</code>.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl -X POST https://towerops.net/api/v1/schedules/SCHED_ID/layers \
|
|
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"layer": {
|
|
"name": "Primary",
|
|
"position": 0,
|
|
"rotation_type": "weekly",
|
|
"rotation_interval": 1,
|
|
"handoff_time": "09:00:00",
|
|
"start_date": "2026-06-01T00:00:00Z"
|
|
}
|
|
}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Overrides</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>POST /api/v1/schedules/:id/overrides</code>
|
|
creates a one-off cover ("Bob is on for Alice from Friday 17:00 to Monday 09:00"). Required: <code>user_id</code>, <code>start_time</code>, <code>end_time</code>. Remove with <code>DELETE /:id/overrides/:override_id</code>.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl -X POST https://towerops.net/api/v1/schedules/SCHED_ID/overrides \
|
|
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"override": {
|
|
"user_id": "USER_UUID",
|
|
"start_time": "2026-06-07T17:00:00Z",
|
|
"end_time": "2026-06-09T09:00:00Z"
|
|
}
|
|
}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Escalation Policies Resource -->
|
|
<section id="escalation-policies" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Escalation Policies
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Escalation policies are an ordered list of <em>rules</em>; each rule fires its
|
|
<em>targets</em>
|
|
after a delay if the previous rule's targets haven't acknowledged the alert. Targets can reference users, schedules, or arbitrary webhooks.
|
|
</p>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Policy CRUD</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Standard REST CRUD under <code>/api/v1/escalation_policies</code>.
|
|
<code>GET /:id</code>
|
|
returns the policy with its rules and targets nested. Required on create: <code>name</code>. Optional: <code>description</code>, <code>repeat_count</code>, <code>repeat_interval_minutes</code>.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl -X POST https://towerops.net/api/v1/escalation_policies \
|
|
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"escalation_policy": {
|
|
"name": "Critical alerts",
|
|
"description": "Page primary, then secondary, then manager",
|
|
"repeat_count": 3,
|
|
"repeat_interval_minutes": 15
|
|
}
|
|
}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Rules</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
<code>POST /api/v1/escalation_policies/:id/rules</code>
|
|
appends a rule. <code>PATCH /api/v1/escalation_policies/:id/rules/:rule_id</code>
|
|
updates one. <code>DELETE</code>
|
|
removes one. Required on create: <code>position</code>, <code>delay_minutes</code>.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl -X POST https://towerops.net/api/v1/escalation_policies/POLICY_ID/rules \
|
|
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"rule": {"position": 0, "delay_minutes": 5}
|
|
}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Targets</h3>
|
|
<div class="mt-4 grid grid-cols-1 gap-x-8 gap-y-4 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Each rule has one or more targets:
|
|
<code>POST /api/v1/escalation_policies/:id/rules/:rule_id/targets</code>
|
|
creates one,
|
|
<code>
|
|
DELETE /api/v1/escalation_policies/:id/rules/:rule_id/targets/:target_id
|
|
</code>
|
|
removes it. A target body specifies <code>target_type</code>
|
|
(<code>user</code>, <code>schedule</code>, or <code>webhook</code>) plus the corresponding identifier or URL.
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
curl -X POST https://towerops.net/api/v1/escalation_policies/POLICY_ID/rules/RULE_ID/targets \
|
|
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"target": {"target_type": "schedule", "schedule_id": "SCHED_UUID"}
|
|
}'
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr class="my-16 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Terraform Provider Section -->
|
|
<section id="terraform" class="scroll-mt-24 mb-16">
|
|
<h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-white">
|
|
Terraform Provider
|
|
</h2>
|
|
<p class="mt-4 text-base text-cool-steel-600 dark:text-cool-steel-400">
|
|
Manage your Towerops infrastructure as code using our official Terraform provider. Automate site and device provisioning, version control your network configuration, and integrate Towerops into your existing infrastructure workflows.
|
|
</p>
|
|
|
|
<div class="mt-6 rounded-lg bg-cerulean-50 dark:bg-cerulean-900/10 p-4 border border-cerulean-200 dark:border-cerulean-800">
|
|
<div class="flex">
|
|
<div class="flex-shrink-0">
|
|
<svg class="h-5 w-5 text-cerulean-400" viewBox="0 0 20 20" fill="currentColor">
|
|
<path
|
|
fill-rule="evenodd"
|
|
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z"
|
|
clip-rule="evenodd"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
<div class="ml-3">
|
|
<h3 class="text-sm font-medium text-cerulean-800 dark:text-cerulean-200">
|
|
Infrastructure as Code
|
|
</h3>
|
|
<div class="mt-2 text-sm text-cerulean-700 dark:text-cerulean-300">
|
|
<p>
|
|
The Terraform provider uses the same REST API documented above. All resource operations require API token authentication (not browser sessions).
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- What is Terraform -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">What is Terraform?</h3>
|
|
<p class="mt-4 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
<a
|
|
href="https://www.terraform.io/"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
class="text-cerulean-600 dark:text-cerulean-400 hover:underline"
|
|
>
|
|
Terraform
|
|
</a>
|
|
is an infrastructure as code tool that lets you define both cloud and on-premise resources in human-readable configuration files that you can version, reuse, and share. With the Towerops Terraform provider, you can:
|
|
</p>
|
|
|
|
<ul class="mt-4 space-y-2 text-sm text-cool-steel-600 dark:text-cool-steel-400 list-disc list-inside">
|
|
<li>Define sites and devices in declarative configuration files</li>
|
|
<li>Version control your network monitoring infrastructure</li>
|
|
<li>Automate device provisioning and updates</li>
|
|
<li>Integrate with CI/CD pipelines for automated deployments</li>
|
|
<li>Ensure consistent configuration across environments</li>
|
|
<li>Track infrastructure changes with git history</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Getting Started -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Getting Started</h3>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<!-- Left column - description -->
|
|
<div>
|
|
<h4 class="text-sm font-semibold text-zinc-900 dark:text-white">Installation</h4>
|
|
<p class="mt-2 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
The provider is available on the <a
|
|
href="https://registry.terraform.io/providers/towerops-app/towerops"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
class="text-cerulean-600 dark:text-cerulean-400 hover:underline"
|
|
>Terraform Registry</a>. Terraform will automatically download it when you run <code class="px-1.5 py-0.5 rounded bg-cool-steel-100 dark:bg-cool-steel-800 text-xs font-mono">terraform init</code>.
|
|
</p>
|
|
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Requirements
|
|
</h4>
|
|
<ul class="mt-2 space-y-1 text-sm text-cool-steel-600 dark:text-cool-steel-400 list-disc list-inside">
|
|
<li>Terraform >= 1.0</li>
|
|
<li>Towerops API token (create in Organization Settings)</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- Right column - code example -->
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Configuration</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
terraform {
|
|
required_providers {
|
|
towerops = {
|
|
source = "towerops-app/towerops"
|
|
version = "~> 0.1"
|
|
}
|
|
}
|
|
}
|
|
|
|
variable "towerops_api_token" {
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
provider "towerops" {
|
|
token = var.towerops_api_token
|
|
api_url = "https://towerops.net"
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Example Usage -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Example Usage</h3>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2">
|
|
<div>
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
This example creates a site and two devices. Terraform will automatically manage the lifecycle of these resources, creating, updating, or deleting them as needed to match your configuration.
|
|
</p>
|
|
|
|
<h4 class="mt-6 text-sm font-semibold text-zinc-900 dark:text-white">
|
|
Key Features
|
|
</h4>
|
|
<ul class="mt-3 space-y-2 text-sm text-cool-steel-600 dark:text-cool-steel-400 list-disc list-inside">
|
|
<li>Automatic dependency management (devices depend on sites)</li>
|
|
<li>State tracking to detect configuration drift</li>
|
|
<li>Plan preview before making changes</li>
|
|
<li>Rollback support via version control</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">main.tf</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
resource "towerops_site" "main_office" {
|
|
name = "Main Office"
|
|
location = "New York, NY"
|
|
}
|
|
|
|
resource "towerops_device" "core_router" {
|
|
site_id = towerops_site.main_office.id
|
|
name = "Core Router"
|
|
ip_address = "192.168.1.1"
|
|
description = "Primary gateway"
|
|
snmp_enabled = true
|
|
snmp_version = "2c"
|
|
}
|
|
|
|
resource "towerops_device" "backup_router" {
|
|
site_id = towerops_site.main_office.id
|
|
name = "Backup Router"
|
|
ip_address = "192.168.1.2"
|
|
description = "Failover gateway"
|
|
snmp_enabled = true
|
|
}
|
|
""") %></code></pre>
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-lg bg-cool-steel-900 dark:bg-cool-steel-950">
|
|
<div class="border-b border-zinc-800 px-4 py-2">
|
|
<p class="text-xs font-medium text-zinc-400">Commands</p>
|
|
</div>
|
|
<pre class="p-4 text-sm text-zinc-100 overflow-x-auto"><code><%= raw(~S"""
|
|
# Initialize and download provider
|
|
terraform init
|
|
|
|
# Preview changes
|
|
terraform plan
|
|
|
|
# Apply configuration
|
|
terraform apply
|
|
|
|
# Destroy all resources
|
|
terraform destroy
|
|
""") %></code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Available Resources -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Available Resources</h3>
|
|
|
|
<div class="mt-6">
|
|
<dl class="divide-y divide-cool-steel-200 dark:divide-white/10">
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
towerops_site
|
|
</dt>
|
|
<dd class="mt-2 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Manages a physical site/location. Supports name, location, and SNMP community string configuration.
|
|
</dd>
|
|
<dd class="mt-2">
|
|
<a
|
|
href="https://registry.terraform.io/providers/towerops-app/towerops/latest/docs/resources/site"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
class="text-sm text-cerulean-600 dark:text-cerulean-400 hover:underline"
|
|
>
|
|
View documentation →
|
|
</a>
|
|
</dd>
|
|
</div>
|
|
|
|
<div class="py-4">
|
|
<dt class="text-sm font-mono font-medium text-zinc-900 dark:text-white">
|
|
towerops_device
|
|
</dt>
|
|
<dd class="mt-2 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Manages network equipment at a site. Supports IP address, SNMP configuration, monitoring settings, and more.
|
|
</dd>
|
|
<dd class="mt-2">
|
|
<a
|
|
href="https://registry.terraform.io/providers/towerops-app/towerops/latest/docs/resources/device"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
class="text-sm text-cerulean-600 dark:text-cerulean-400 hover:underline"
|
|
>
|
|
View documentation →
|
|
</a>
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-12 border-cool-steel-200 dark:border-white/10" />
|
|
|
|
<!-- Documentation Links -->
|
|
<div class="mt-12">
|
|
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white">Full Documentation</h3>
|
|
|
|
<div class="mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2">
|
|
<a
|
|
href="https://registry.terraform.io/providers/towerops-app/towerops/latest/docs"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
class="group relative rounded-lg border border-cool-steel-200 dark:border-white/10 p-6 hover:border-cerulean-500 dark:hover:border-cerulean-400 transition"
|
|
>
|
|
<div class="flex items-start justify-between">
|
|
<div class="flex-1">
|
|
<h4 class="text-base font-semibold text-zinc-900 dark:text-white group-hover:text-cerulean-600 dark:group-hover:text-cerulean-400">
|
|
Provider Documentation
|
|
</h4>
|
|
<p class="mt-2 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Complete reference for all resources, data sources, and provider configuration options.
|
|
</p>
|
|
</div>
|
|
<svg
|
|
class="h-5 w-5 text-cool-steel-400 group-hover:text-cerulean-600 dark:group-hover:text-cerulean-400 ml-4"
|
|
viewBox="0 0 20 20"
|
|
fill="currentColor"
|
|
>
|
|
<path
|
|
fill-rule="evenodd"
|
|
d="M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z"
|
|
clip-rule="evenodd"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
</a>
|
|
|
|
<a
|
|
href="https://github.com/towerops-app/terraform-provider-towerops"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
class="group relative rounded-lg border border-cool-steel-200 dark:border-white/10 p-6 hover:border-cerulean-500 dark:hover:border-cerulean-400 transition"
|
|
>
|
|
<div class="flex items-start justify-between">
|
|
<div class="flex-1">
|
|
<h4 class="text-base font-semibold text-zinc-900 dark:text-white group-hover:text-cerulean-600 dark:group-hover:text-cerulean-400">
|
|
GitHub Repository
|
|
</h4>
|
|
<p class="mt-2 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
Source code, examples, and issue tracking for the Terraform provider.
|
|
</p>
|
|
</div>
|
|
<svg
|
|
class="h-5 w-5 text-cool-steel-400 group-hover:text-cerulean-600 dark:group-hover:text-cerulean-400 ml-4"
|
|
viewBox="0 0 20 20"
|
|
fill="currentColor"
|
|
>
|
|
<path
|
|
fill-rule="evenodd"
|
|
d="M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z"
|
|
clip-rule="evenodd"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-12 rounded-lg bg-cool-steel-50 dark:bg-cool-steel-900/50 p-6 border border-cool-steel-200 dark:border-white/10">
|
|
<h4 class="text-sm font-semibold text-zinc-900 dark:text-white">Need Help?</h4>
|
|
<p class="mt-2 text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
For questions about the Terraform provider, please open an issue on
|
|
<a
|
|
href="https://github.com/towerops-app/terraform-provider-towerops/issues"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
class="text-cerulean-600 dark:text-cerulean-400 hover:underline"
|
|
>
|
|
GitHub
|
|
</a>
|
|
or contact us at <a
|
|
href="mailto:hi@towerops.net"
|
|
class="text-cerulean-600 dark:text-cerulean-400 hover:underline"
|
|
>hi@towerops.net</a>.
|
|
</p>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Footer -->
|
|
<footer class="mt-24 border-t border-cool-steel-200 dark:border-white/10 pt-8 pb-16">
|
|
<p class="text-sm text-cool-steel-600 dark:text-cool-steel-400">
|
|
© 2026 Towerops. All rights reserved.
|
|
</p>
|
|
</footer>
|
|
</main>
|
|
</div>
|
|
</div>
|
|
|
|
<script nonce={@conn.private[:csp_nonce]}>
|
|
// Update active navigation link based on scroll position
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const sections = document.querySelectorAll('section[id]');
|
|
const navLinks = document.querySelectorAll('.nav-link');
|
|
|
|
const activeClasses = ['text-emerald-500', 'dark:text-emerald-400', 'font-medium', 'border-l-2', 'border-emerald-500', '-ml-px'];
|
|
const inactiveClasses = ['text-cool-steel-600', 'dark:text-cool-steel-400'];
|
|
|
|
function setActiveLink(id) {
|
|
navLinks.forEach(link => {
|
|
const linkId = link.getAttribute('data-nav-link');
|
|
if (linkId === id) {
|
|
// Remove inactive classes
|
|
inactiveClasses.forEach(cls => link.classList.remove(cls));
|
|
// Add active classes
|
|
activeClasses.forEach(cls => link.classList.add(cls));
|
|
} else {
|
|
// Remove active classes
|
|
activeClasses.forEach(cls => link.classList.remove(cls));
|
|
// Add inactive classes
|
|
inactiveClasses.forEach(cls => link.classList.add(cls));
|
|
}
|
|
});
|
|
}
|
|
|
|
// Use IntersectionObserver to track visible sections
|
|
const observer = new IntersectionObserver((entries) => {
|
|
entries.forEach(entry => {
|
|
if (entry.isIntersecting) {
|
|
setActiveLink(entry.target.id);
|
|
}
|
|
});
|
|
}, {
|
|
rootMargin: '-20% 0px -70% 0px', // Trigger when section is near top
|
|
threshold: 0
|
|
});
|
|
|
|
sections.forEach(section => observer.observe(section));
|
|
|
|
// Also update on hash change (when clicking nav links)
|
|
window.addEventListener('hashchange', function() {
|
|
const hash = window.location.hash.slice(1);
|
|
if (hash) {
|
|
setActiveLink(hash);
|
|
}
|
|
});
|
|
|
|
// Set initial active state
|
|
const initialHash = window.location.hash.slice(1) || 'introduction';
|
|
setActiveLink(initialHash);
|
|
});
|
|
</script>
|