Skip to content

Blueprints

A blueprint is a template that defines the shape of a category of infrastructure component — its name, description, and a set of typed custom fields. Every entity belongs to exactly one blueprint.

Think of blueprints as database schemas: you define the columns once, then populate rows (entities) that conform to them.

Anatomy of a blueprint

Field Type Description
slug string URL-safe identifier, unique per tenant
name string Human-readable label
description string Optional long description
fields array List of field definitions (see below)
is_default bool Marks the tenant's default blueprint

Field definitions

Each field in a blueprint has:

Attribute Values Description
name string Field name (used as key when setting values)
field_type string, number, boolean, url, array Validation type
required bool Whether entities must supply a value
default_value string Fallback if no value is provided
sort_order int Display order in the UI and API

Creating a blueprint

wnp blueprints create --slug database --name "Database" --desc "PostgreSQL clusters"
curl -X POST https://api.wanepia.com/v1/blueprints \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "database",
    "name": "Database",
    "description": "PostgreSQL clusters",
    "fields": [
      {"name": "engine",   "field_type": "string",  "required": true,  "sort_order": 1},
      {"name": "version",  "field_type": "string",  "required": false, "sort_order": 2},
      {"name": "replicas", "field_type": "number",  "required": false, "sort_order": 3},
      {"name": "docs_url", "field_type": "url",     "required": false, "sort_order": 4}
    ]
  }'

Listing and inspecting

wnp blueprints list
wnp blueprints get database
GET /v1/blueprints
GET /v1/blueprints/{slug}

Common blueprint patterns

Microservices

{
  "slug": "service",
  "name": "Microservice",
  "fields": [
    {"name": "team",       "field_type": "string", "required": true,  "sort_order": 1},
    {"name": "language",   "field_type": "string", "required": false, "sort_order": 2},
    {"name": "repo_url",   "field_type": "url",    "required": false, "sort_order": 3},
    {"name": "on_call",    "field_type": "string", "required": false, "sort_order": 4}
  ]
}

Databases

{
  "slug": "database",
  "name": "Database",
  "fields": [
    {"name": "engine",   "field_type": "string", "required": true,  "sort_order": 1},
    {"name": "version",  "field_type": "string", "required": false, "sort_order": 2},
    {"name": "replicas", "field_type": "number", "required": false, "sort_order": 3}
  ]
}

External dependencies

{
  "slug": "third-party",
  "name": "Third-party dependency",
  "fields": [
    {"name": "vendor",    "field_type": "string", "required": true,  "sort_order": 1},
    {"name": "status_url","field_type": "url",    "required": false, "sort_order": 2},
    {"name": "sla",       "field_type": "string", "required": false, "sort_order": 3}
  ]
}

Limits

Blueprint and entity counts are governed by your plan's limits, surfaced at GET /v1/me:

{
  "blueprint_limit": 10,
  "entity_limit_per_bp": 50
}