Skip to content

API Reference

All API endpoints are under /v1. The API speaks JSON and uses Bearer token authentication.

Authentication

curl -H "Authorization: Bearer <your-api-key>" https://api.wanepia.com/v1/...

API keys are created in the frontend under Settings → API Keys, or via CLI:

wnp keys create "my-key"

Response format

Success responses return the resource directly (object or array).

Error responses:

{
  "error": "not found",
  "code": "NOT_FOUND"
}

Common error codes: UNAUTHORIZED, FORBIDDEN, NOT_FOUND, VALIDATION_ERROR, ACCOUNT_DISABLED.


Account

GET /v1/me

Returns plan limits and account metadata.

{
  "id": "...",
  "email": "admin@example.com",
  "name": "Acme Corp",
  "blueprint_limit": 10,
  "entity_limit_per_bp": 50,
  "check_limit_per_entity": 5,
  "retention_days": 30
}

Blueprints

GET /v1/blueprints

List all blueprints.

POST /v1/blueprints

Create a blueprint.

{
  "slug": "api",
  "name": "HTTP API",
  "description": "...",
  "fields": [
    {"name": "team", "field_type": "string", "required": true, "sort_order": 1}
  ]
}

GET /v1/blueprints/{slug}

Get a blueprint.

POST /v1/blueprints/{slug}/fields

Add a field to an existing blueprint.


Entities

GET /v1/blueprints/{blueprint_slug}/entities

List entities for a blueprint.

POST /v1/blueprints/{blueprint_slug}/entities

Create an entity.

{
  "slug": "payments-api",
  "name": "Payments API",
  "fields": {"team": "platform"}
}

GET /v1/blueprints/{blueprint_slug}/entities/{slug}

Get an entity.

PUT /v1/blueprints/{blueprint_slug}/entities/{slug}

Update an entity.

DELETE /v1/blueprints/{blueprint_slug}/entities/{slug}

Delete an entity and all its checks.


Checks

GET /v1/checks

List all checks (tenant-scoped).

POST /v1/checks

Create a health check.

{
  "entity_id": "...",
  "check_type": "http",
  "target_url": "https://api.wanepia.com/health",
  "interval_seconds": 60,
  "timeout_ms": 5000,
  "expected_status": 200,
  "body_contains": "",
  "failure_threshold": 3,
  "enabled": true
}

For TCP / TLS / DNS checks, pass the type-specific config in config:

{
  "entity_id": "...",
  "check_type": "tcp",
  "config": {"host": "db.internal", "port": 5432},
  "interval_seconds": 60,
  "failure_threshold": 3,
  "enabled": true
}

GET /v1/checks/{id}

Get a check.

PUT /v1/checks/{id}

Update a check (partial update — only supplied fields are changed).

DELETE /v1/checks/{id}

Delete a check.

GET /v1/checks/{id}/results

Get check results (paginated by cursor).

Query params: limit (default 50), cursor (for pagination).

{
  "results": [
    {
      "id": "...",
      "check_id": "...",
      "status_code": 200,
      "latency_ms": 42,
      "success": true,
      "error_message": "",
      "checked_at": "2024-01-20T09:15:00Z"
    }
  ],
  "next_cursor": "..."
}

GET /v1/checks/{id}/transitions

Get state transitions for a check.


Notification policies

GET /v1/checks/{check_id}/policy

Get the notification policy (includes channels).

POST /v1/checks/{check_id}/policy

Create or update the policy.

{
  "cooldown_seconds": 300,
  "notify_on_recovery": true,
  "silenced": false,
  "repeat_interval_seconds": 0
}

POST /v1/checks/{check_id}/policy/channels

Add a notification channel.

{
  "channel_type": "slack",
  "config": {"url": "https://hooks.slack.com/services/..."}
}

DELETE /v1/checks/{check_id}/policy/channels/{channel_id}

Remove a channel.


Notifications (global)

GET /v1/notify/logs

Recent delivery logs across all channels.

GET /v1/notify/channels

All channels across all checks.


Status

GET /v1/status

Fleet health summary.

{
  "entities": [...],
  "total": 12,
  "up": 10,
  "degraded": 1,
  "down": 1
}

GET /v1/status/transitions

Recent state transitions across all entities.


Relations

GET /v1/relations

List all entity relations.

POST /v1/relations

{
  "from_entity_id": "...",
  "to_entity_id": "...",
  "relation_type": "depends_on"
}

DELETE /v1/relations/{id}

Remove a relation.


Auth (API keys)

GET /v1/auth/keys

List API keys (raw key is never returned after creation).

Warning

Read-only keys cannot call this endpoint. The request will return 403 READ_ONLY.

POST /v1/auth/keys

Create a key.

{"label": "CI pipeline"}

To create a read-only key, set is_read_only: true:

{"label": "Public dashboard", "is_read_only": true}

Response includes the raw keysave it immediately.

The is_read_only flag is permanent for the lifetime of a key. To change the access level, delete the key and create a new one.

DELETE /v1/auth/keys/{id}

Delete a key.


Read-only API keys

A read-only key lets you share monitoring access with stakeholders, embed status widgets in public dashboards, or use in demo environments — without exposing write access to your account.

Common use cases:

  • Public status page widgets or embeds
  • Sharing a live monitoring view with stakeholders who should not be able to make changes
  • Demo environments and screenshares
  • Third-party integrations that only need to read entity state

What a read-only key can and cannot do:

Operation Read-only key
Read entity status, check results, state transitions Yes
Read blueprints and sparklines Yes
Read notify logs Yes
Create, update, or delete entities No
Create, update, or delete blueprints, relations, or checks No
List API keys (GET /v1/auth/keys) No
Any POST, PUT, or DELETE request No

All blocked operations return 403 with error code READ_ONLY.

Tip

Channel webhook URLs and other sensitive config fields are automatically redacted from responses when accessed with a read-only key. Status and health data are always returned in full.


Team

GET /v1/settings/users

List team members and pending invitations.

POST /v1/settings/users/invite

{"email": "user@example.com", "role": "member"}

DELETE /v1/settings/users/{id}

Remove a team member.


Skills (MCP)

GET /v1/skills

List skills.

POST /v1/skills

Register a skill.

GET /v1/skills/{slug}

Get a skill.

PUT /v1/skills/{slug}

Update a skill (enable/disable, update tools).

DELETE /v1/skills/{slug}

Delete a skill.

GET /v1/mcp

MCP server endpoint (SSE transport).

POST /v1/mcp

MCP message endpoint.