[ Switch to styled version → ]
A blueprint is a JSON document that describes an enterprise network. It is applied with one command to provision the network's name, join rule, policies, identity provider, webhooks, audit export, role pre-assignments, and admin token.
A blueprint is a single JSON document that describes an entire enterprise network: its name, join rule, policies, identity provider, webhooks, audit export, role pre-assignments, and admin token. Applying it with one command causes the registry to provision everything in a deterministic sequence.
Blueprints are designed for infrastructure-as-code workflows. They can be stored in version control, with changes reviewed in pull requests and applied through CI/CD pipelines.
{
"name": "prod-fleet",
"join_rule": "invite_only",
"enterprise": true,
"policy": {
"max_members": 100,
"allowed_ports": [80, 443, 1001],
"description": "Production fleet - US East"
},
"identity_provider": {
"type": "oidc",
"url": "https://accounts.example.com/.well-known/openid-configuration",
"client_id": "pilot-prod"
},
"webhooks": [
{
"url": "https://ops.example.com/pilot-events",
"events": ["member.kicked", "network.policy_changed"]
}
],
"audit_export": {
"format": "splunk_hec",
"endpoint": "https://splunk.example.com:8088/services/collector",
"token": "hec-token-here"
},
"roles": {
"42": "admin",
"108": "admin"
},
"network_admin_token": "network-specific-secret"
} When a blueprint is applied, the registry executes these steps in order:
Each step is independent. If a later step fails, earlier steps are not rolled back. The result includes which actions were taken and which failed.
Blueprints are idempotent. Applying the same blueprint twice produces the same result. The registry looks up the network by `name`:
This makes blueprints safe to apply repeatedly in CI/CD pipelines. Re-applying after a partial failure completes the remaining steps without duplicating already-completed ones.
The registry validates the blueprint before applying any changes:
If validation fails, no changes are made and the error is returned immediately.
To apply a blueprint:
{
"command": "provision_network",
"blueprint": {
"name": "prod-fleet",
"enterprise": true,
"policy": { "max_members": 100 }
},
"admin_token": "your-admin-token"
} The blueprint is the only payload field besides `admin_token`. Ownership of a newly-created network is assigned to the registry node that the admin token authorizes.
Result format:
{
"network_id": 5,
"name": "prod-fleet",
"created": true,
"actions": [
"network created",
"enterprise enabled",
"policy set",
"audit export configured"
]
} The `created` field indicates whether a new network was created (`true`) or an existing one was updated (`false`).
For programmatic use, a blueprint can be loaded from a JSON file using a helper.
// Go SDK — pkg/registry/wire has the typed loader
import "github.com/TeoSlayer/pilotprotocol/pkg/registry/wire"
import "github.com/TeoSlayer/pilotprotocol/pkg/registry"
bp, err := wire.LoadBlueprint("network.json") // *wire.NetworkBlueprint
result, err := client.ProvisionNetwork(bp.ToMap(), adminToken) `wire.LoadBlueprint` reads and validates the JSON file, returning a typed struct. `registry.Client.ProvisionNetwork` takes the blueprint as a map and the admin token. The network owner is the node authenticated on the client connection.
To inspect the provisioning state of a network:
{
"command": "get_provision_status",
"network_id": 5,
"admin_token": "your-admin-token"
} This command returns the network’s current configuration as seen by the registry. This can be used to verify that a blueprint was applied correctly or to diff the current state against a desired state.