Skip to main content

Help & Documentation

Learn how to use Towerops to monitor your network infrastructure

GraphQL API

The GraphQL API lets you query exactly the data you need in a single request. The endpoint is POST /api/graphql and uses the same API token authentication as the REST API.

Why GraphQL?

  • Fetch related data in one query — Get devices with their sites, alerts, and latest metrics in a single request
  • No over-fetching — Request only the fields you need
  • Introspection — The schema is self-documenting; use any GraphQL client to explore available types and fields

Quick Example

curl -X POST https://app.towerops.net/api/graphql \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ devices { id name ipAddress status } }"}'

Available Queries

  • devices — List devices with filtering and nested site/alert data
  • device(id) — Single device with full detail including sensors and interfaces
  • sites — Sites with nested device lists
  • alerts — Active and historical alerts with device context
  • agents — Remote poller agents and their assignments

Mutations

  • createDevice / updateDevice — Manage devices
  • acknowledgeAlert / resolveAlert — Alert lifecycle management

Full reference: GraphQL API Documentation → — complete schema reference with query examples and variable usage.