Skip to main content

REST API Delivery

An endpoint and a key. That’s it. The standard delivery mechanism for Virtual APIs. Get an endpoint and API key — ready for integration in seconds.

How it works

When you publish a Virtual API, DataHarbor automatically provisions:
  • A unique REST endpoint
  • An API key for authentication
  • Usage analytics
virtual_api:
  name: partner-view
  source: customer-api
  
  delivery:
    type: rest
    # Endpoint: https://harbor.dataharbor.dev/v1/partner-view

Authentication

All requests require an API key in the Authorization header:
curl -H "Authorization: Bearer dh_live_abc123..." \
  https://harbor.dataharbor.dev/v1/partner-view/customers

API key management

Create a new key

# Via configuration
delivery:
  type: rest
  keys:
    - name: production
      expires: 2025-12-31
    - name: development
      rate_limit: 100/h

Rotate keys

Generate a new key without downtime:
POST /v1/virtual-apis/partner-view/keys/rotate

{
  "current_key": "dh_live_abc123...",
  "grace_period": "24h"
}
During the grace period, both old and new keys are valid.

Revoke keys

Instantly invalidate a key:
DELETE /v1/virtual-apis/partner-view/keys/dh_live_abc123

Usage analytics

Track requests, latency, and error rates per Virtual API:
{
  "virtual_api": "partner-view",
  "period": "2025-01-01/2025-01-31",
  "metrics": {
    "total_requests": 45230,
    "successful_requests": 44892,
    "error_rate": 0.0075,
    "avg_latency_ms": 42,
    "p99_latency_ms": 156
  }
}

Request/response flow

Every request passes through the governance layer:
  1. Authenticate — Validate API key
  2. Authorize — Check access controls (geo, IP, expiration)
  3. Fetch — Call upstream source
  4. Transform — Apply Control Blocks (redact, tokenize, transform)
  5. Respond — Return governed data

Example integration

const response = await fetch(
  'https://harbor.dataharbor.dev/v1/partner-view/customers',
  {
    headers: {
      'Authorization': 'Bearer dh_live_abc123...',
      'Content-Type': 'application/json'
    }
  }
);

const customers = await response.json();
// customers contains governed data with controls applied

Next steps