Skip to main content
Technology|API Security Engineer / AppSec

API Security Monitoring

Review public API documentation and configuration signals

Review public API documentation and configuration signals. Use the API workflow below to collect dated findings, review their scope, and decide which follow-up checks your team needs.

Implementation example by the EdgeDNS team · Updated

The Challenge

Public API documentation and browser access policies need review alongside authentication, authorization, and application testing.

The Solution

Check known OpenAPI locations, API version signals, CORS behavior, and HTTP security headers for a public API host. Detection at common paths is bounded; these endpoints do not enumerate every shadow API, compare implementation against a contract, or test authorization.

Endpoints Used

Combine these EdgeDNS endpoints to build this solution.

GET
/v1/domain/openapiAPI reference

OpenAPI Detection: Find OpenAPI/Swagger specifications

GET
/v1/domain/api-corsAPI reference

CORS Check: Analyze CORS configuration

GET
/v1/domain/api-versionAPI reference

API Version Detection: Detect API versioning strategy

GET
/v1/security/headersAPI reference

Security Headers: Analyze HTTP security headers, score, and compliance

What this workflow helps you do

Locate observable API documentation

Review exposed schemas and whether publication is intended.

Review CORS findings

Check the observed origin and credential policy against your browser clients.

Combine with application testing

Use dedicated tests for authorization, abuse resistance, and contract conformance.

Code Example

Review public API documentation and configuration signals

javascript
const headers = { Authorization: 'Bearer YOUR_API_KEY' };
const checks = [
  {
    "path": "/v1/domain/openapi",
    "params": {
      "domain": "api.example.com"
    }
  },
  {
    "path": "/v1/domain/api-cors",
    "params": {
      "domain": "https://api.example.com"
    }
  },
  {
    "path": "/v1/domain/api-version",
    "params": {
      "domain": "https://api.example.com"
    }
  }
];

// Run sequentially to keep concurrency bounded. API tier restrictions apply.
for (const { path, params } of checks) {
  const url = new URL(path, 'https://api.edgedns.dev');
  url.search = new URLSearchParams(params).toString();
  const response = await fetch(url, { headers });
  const result = await response.json();
  if (!response.ok) {
    throw new Error(`${path}: ${response.status} ${result.error?.message ?? 'Request failed'}`);
  }
  // Keep the response metadata and any partial/unknown findings for review.
  console.log(path, result);
}

Learn More

Explore industry standards and best practices related to this use case.

Ready to build API Security Monitoring?

Get started with 200 free API requests per month. No credit card required.

Other Use Cases

API Security Monitoring (CORS, headers, TLS) | EdgeDNS