O
Omniper
API Reference

Omniper Network Security API

Programmatically analyze network configurations for security issues, compliance gaps, and misconfigurations.

Overview

The Omniper API allows you to integrate network configuration security scanning into your CI/CD pipelines, automation scripts, or third-party tools.

Secure

API key authentication with rate limiting

Real-time

Server-sent events for live progress updates

Extensible

Additional endpoints coming soon

Quick Start

Integrate the Omniper API into your application in three steps.

1

Get an API key

Sign in to your Omniper account, go to Dashboard → Settings → API Keys, and generate a new key. Keys always start with omni_.

2

Make a request

Send a POST request to /api/analyze with the configuration content and your API key in the Authorization header. The projectId field is optional — use it to associate the analysis with a project.

curl -X POST https://omniper.com/api/analyze \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "router-config.cfg",
    "content": "! Cisco IOS configuration\nhostname R1\n...",
    "projectId": "optional-project-id"
  }'
3

Handle the streaming response

The API returns a stream of JSON events (Server-Sent Events). Parse each line starting with data: . The final event has "type": "result" and contains the full security report.

async function analyzeConfig(apiKey, filename, content, projectId = null) {
  const response = await fetch("https://omniper.com/api/analyze", {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${apiKey}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ filename, content, projectId }),
  });

  if (!response.ok) {
    const error = await response.json();
    throw new Error(error.error || "Request failed");
  }

  const reader = response.body.getReader();
  const decoder = new TextDecoder();

  while (true) {
    const { done, value } = await reader.read();
    if (done) break;

    const chunk = decoder.decode(value);
    const lines = chunk.split("\n");

    for (const line of lines) {
      if (line.startsWith("data: ")) {
        const data = JSON.parse(line.slice(6));
        if (data.type === "result") {
          console.log("Final report:", data.result);
          return data.result;
        } else {
          console.log("Progress:", data.message);
        }
      }
    }
  }
}

Every request counts toward your plan's usage limit. For bulk scanning, store the API key as a secret in your environment rather than hardcoding it.

Authentication

All API requests require a valid API key sent in the Authorization header.

Authorization: Bearer omni_xxxxxxxxxxxxxxxx

Include this header in every request. The key must start with omni_.

Endpoints

Currently available API endpoints.

POSThttps://omniper.com/api/analyze

Request Body

{
  "filename": "string (required)",
  "content": "string (required) – the raw configuration text",
  "projectId": "string (optional) – associate with a project"
}

Response (Server-Sent Events)

The endpoint streams JSON events. Each event starts with data: . The final event has "type": "result".

data: {"stage":"parsing","message":"Reading configuration file…"}

data: {"stage":"analysis","message":"Checks complete: 12 findings."}

data: {"type":"result","result":{"score":{"overall":72},"result":{"security":{"critical":[],"high":[...]}}}}

Example cURL

curl -X POST https://omniper.com/api/analyze \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "router-config.cfg",
    "content": "! Cisco IOS configuration\nhostname R1\n...",
    "projectId": "optional-project-id"
  }'

Rate Limits

To ensure fair usage, each API key is limited to 10 requests per 60 seconds.

Limit10 requests per minute
Exceeded response429 Too Many Requests
HeadersX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Error Responses

All errors return a JSON object with an error field describing what went wrong.

401 Unauthorized
{
  "error": "Unauthorized"
}

Missing or invalid API key.

429 Too Many Requests
{"error":"Rate limit exceeded. Try again later."}

You have exceeded 10 requests per minute. Wait for the reset window indicated by the X-RateLimit-Reset header before retrying.

400 Bad Request

Missing required fields: filename and content.

Need Help?

Resources to help you get the most out of the Omniper API.

  • Check our documentation for integration guides.
  • Contact support for API access questions.
  • Explore our blog for security best practices.