Skip to content

Connect an External Service

OLAV can connect to any external service that provides a REST API. Once connected, you can query it using natural language or generate automation scripts for it.

Feature Claims

ID Claim Status
C-L2-19 olav registry register <url> registers an OpenAPI service with a single command ✅ v0.10.0
C-L2-20 DevOps agent generates environment-aware automation scripts ✅ v0.13.0

Use Cases

Your team likely uses multiple operations tools: NetBox (IPAM), Zabbix (monitoring), ServiceNow (ticketing), in-house platforms, and more. Each tool has its own API and query methods. OLAV lets you query across systems with a single sentence:

olav "How many devices are in rack A1?"        # queries NetBox
olav "What active alerts are there in Zabbix?"  # queries Zabbix
olav "List all sites in Europe"                 # queries NetBox

Quick Registration: One Command

If the target service provides an OpenAPI (Swagger) specification, registration takes just one command:

olav registry register http://netbox.example.com/api/schema/

OLAV automatically reads the OpenAPI schema, generates API reference documentation, and makes the service queryable via api_request. No code generation — agents use the reference to construct API calls directly.

Services That Require Authentication

Most services require an API Token or other authentication method:

olav registry register http://netbox.example.com/api/schema/ \
  --header "Authorization: Token YOUR_TOKEN"

OLAV's service registration supports multiple authentication methods (Bearer Token, API Key, Basic Auth, JWT), configured in .olav/config/services.yaml.

Managing Registered Services

olav registry list                        # list all registered services
olav registry status netbox               # check reachability of a service
olav registry refresh netbox              # force re-fetch the schema

Generating Automation Scripts

After connecting a service, the DevOps agent can generate production-ready scripts that interact with your infrastructure:

olav --agent devops "write a script that pulls all NetBox devices and exports them to CSV"
olav --agent devops "write a Zabbix maintenance window script for all routers in site LON1"

The DevOps agent reads your actual device data from the OLAV database and generates environment-aware scripts with --dry-run mode and error handling. Scripts are exported to exports/scripts/ as executable files.

See DevOps Agent → and Infra Agent → for details.


Comparison of Approaches

registry register DevOps agent
Speed Completes in seconds Generates scripts in one query
Output Generic API proxy for natural language queries Executable bash/Python scripts
Device awareness No Yes — reads from netops.devices
Best for Ad-hoc queries, quick lookups Automated workflows, CI/CD integration