Public Read-Only · No API Key Required

Getting Started with
Herbrich-API

Unified access to all Herbrich Corporation services through a single, centralized platform. No API keys required for read operations.

https://api.herbrich.org/v1/

Currently public read-only. Login / JWT for write comes next.

Core Concepts

Foundational entities of the Herbrich grid model.

GridNode Entity

Primary infrastructure node. Central unit of the Herbrich grid.

NodeName HerbrichName HallAddress LocJ / LocH SubNodes[]
LINKED

GridNodeConnection Linked

Directed edge between nodes with type and parameters.

Name Type Param Description

NodeApplication

Software / service deployed on a GridNode. Versioned, stateful workloads linked to node lifecycle.

versioned · stateful · node-bound

Delphinariat

Isolated compute enclosure within a node. Provides sandboxed execution for experimental subsystems.

sandboxed · isolated · experimental

Endpoints

4 routes · public · JSON
operational
GET /grid/nodes/{id} Fetch single node by UUID
GET /grid/nodes/{id}/connections List all connections for node
GET /grid/nodes/{id}/applications List deployed applications
GET /grid/nodes/{id}/subnodes List child sub-nodes
Example ID: f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3 → Erzbistum Hamburg

Quick Start

Java · Fetch node
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3"))
            .GET().build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        JsonObject node = JsonParser.parseString(response.body()).getAsJsonObject();
        System.out.println("Node: " + node.get("HerbrichName").getAsString());
        System.out.println("Hall: " + node.get("HallAddress").getAsString());
    }
}
Java · Fetch connections
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import com.google.gson.JsonArray;
import com.google.gson.JsonParser;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest req = HttpRequest.newBuilder()
            .uri(URI.create("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3/connections"))
            .GET().build();
        HttpResponse<String> res = client.send(req, HttpResponse.BodyHandlers.ofString());
        JsonArray conns = JsonParser.parseString(res.body()).getAsJsonArray();
        conns.forEach(c -> {
            var o = c.getAsJsonObject();
            System.out.println(o.get("Name").getAsString() + " [" + o.get("Type").getAsString() + "]: " + o.get("Param").getAsString());
        });
    }
}
Go · Fetch node
package main
import ("encoding/json"; "fmt"; "net/http")
func main() {
    resp, err := http.Get("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3")
    if err != nil { panic(err) }
    defer resp.Body.Close()
    var node map[string]interface{}
    json.NewDecoder(resp.Body).Decode(&node)
    fmt.Printf("Node: %v\n", node["HerbrichName"])
    fmt.Printf("Hall: %v\n", node["HallAddress"])
}
Go · Fetch connections
package main
import ("encoding/json"; "fmt"; "net/http")
type Connection struct { Name, Type, Param string }
func main() {
    resp, _ := http.Get("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3/connections")
    defer resp.Body.Close()
    var conns []Connection
    json.NewDecoder(resp.Body).Decode(&conns)
    for _, c := range conns { fmt.Printf("%s [%s]: %s\n", c.Name, c.Type, c.Param) }
}
cURL · Fetch node
curl https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3
cURL · Fetch connections
curl https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3/connections
Python · Fetch node
import requests
url = "https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3"
node = requests.get(url).json()
print(node["HerbrichName"])
print(node["HallAddress"])
Python · Fetch connections
import requests
for conn in requests.get("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3/connections").json():
    print(f"{conn['Name']} - {conn['Type']}: {conn['Param']}")
Node.js · Fetch node
const node = await (await fetch("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3")).json();
console.log(node.HerbrichName);
console.log(node.HallAddress);
Node.js · Fetch connections
const connections = await (await fetch("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3/connections")).json();
connections.forEach(c => console.log(`${c.Name} - ${c.Type}: ${c.Param}`));
TypeScript · Fetch node
interface GridNode { HerbrichName: string; HallAddress: string; }
const node = await (await fetch(`https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3`)).json() as GridNode;
console.log(node.HerbrichName, node.HallAddress);
TypeScript · Fetch connections
interface GridNodeConnection { Name: string; Type: string; Param: string; }
const conns = await (await fetch(`https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3/connections`)).json() as GridNodeConnection[];
conns.forEach(c => console.log(`${c.Name} [${c.Type}]: ${c.Param}`));
C# · Fetch node
using System.Net.Http.Json;
var client = new HttpClient();
var node = await client.GetFromJsonAsync<GridNode>("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3");
Console.WriteLine(node?.HerbrichName);
Console.WriteLine(node?.HallAddress);
C# · Fetch connections
using System.Net.Http.Json;
var client = new HttpClient();
var conns = await client.GetFromJsonAsync<List<GridNodeConnection>>("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3/connections");
foreach (var c in conns!) Console.WriteLine($"{c.Name} - {c.Type}: {c.Param}");
VB.NET · Fetch node
Imports System.Net.Http
Imports Newtonsoft.Json
Dim client As New HttpClient()
Dim node = JsonConvert.DeserializeObject(Of GridNode)(
    Await client.GetStringAsync("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3"))
Console.WriteLine(node.HerbrichName)
Console.WriteLine(node.HallAddress)
VB.NET · Fetch connections
Imports System.Net.Http
Imports Newtonsoft.Json
Dim client As New HttpClient()
Dim conns = JsonConvert.DeserializeObject(Of List(Of GridNodeConnection))(
    Await client.GetStringAsync("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3/connections"))
For Each conn In conns
    Console.WriteLine($"{conn.Name} - {conn.Type}: {conn.Param}")
Next
Kotlin · Fetch node
import java.net.http.*
import org.json.JSONObject
fun main() {
    val res = HttpClient.newHttpClient().send(
        HttpRequest.newBuilder().uri(URI.create("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3")).GET().build(),
        HttpResponse.BodyHandlers.ofString())
    val node = JSONObject(res.body())
    println(node.getString("HerbrichName"))
}
Kotlin · Fetch connections
import java.net.http.*
import org.json.JSONArray
fun main() {
    val res = HttpClient.newHttpClient().send(
        HttpRequest.newBuilder().uri(URI.create("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3/connections")).build(),
        HttpResponse.BodyHandlers.ofString())
    val conns = JSONArray(res.body())
    for (i in 0 until conns.length()) {
        val c = conns.getJSONObject(i)
        println("${c.getString("Name")} [${c.getString("Type")}]: ${c.getString("Param")}")
    }
}
Swift · Fetch node
import Foundation
struct GridNode: Decodable {
    let herbrichName: String; let hallAddress: String
    enum CodingKeys: String, CodingKey { case herbrichName = "HerbrichName"; case hallAddress = "HallAddress" }
}
let url = URL(string: "https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3")!
let (data, _) = try await URLSession.shared.data(from: url)
let node = try JSONDecoder().decode(GridNode.self, from: data)
print(node.herbrichName, node.hallAddress)
Swift · Fetch connections
import Foundation
struct Connection: Decodable {
    let name, type, param: String
    enum CodingKeys: String, CodingKey { case name = "Name"; case type = "Type"; case param = "Param" }
}
let url = URL(string: "https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3/connections")!
let (data, _) = try await URLSession.shared.data(from: url)
try JSONDecoder().decode([Connection].self, from: data).forEach {
    print("\($0.name) [\($0.type)]: \($0.param)")
}
Rust · Fetch node
use reqwest;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let node: serde_json::Value = reqwest::get("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3").await?.json().await?;
    println!("{}", node["HerbrichName"]);
    Ok(())
}
Rust · Fetch connections
use reqwest;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let conns: serde_json::Value = reqwest::get("https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3/connections").await?.json().await?;
    println!("{:#?}", conns);
    Ok(())
}
Zig · Fetch node
const std = @import("std");
// see full Zig sample in docs — uses std.http.Client + std.json
// GET https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3
Zig · Fetch connections
const std = @import("std");
// GET https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3/connections
Java 17+ · MainHttpClient + Gson

JSON-LD Linked Data

RDF · OWL

All resources are JSON-LD compatible. Use @context https://www.herbrich.org/ontology/ for semantic interoperability.

Ontology ↗
JSON-LD · GridNodeConnection
{
  "@context": "https://www.herbrich.org/ontology/",
  "@type": "GridNodeConnection",
  "@id": "https://api.herbrich.org/v1/grid/connections/conn-42",
  "Name": "Hauptstrom",
  "Type": "POWER",
  "Param": "400V/32A",
  "Description": "Primäre Stromversorgung für Erzbistum Hamburg",
  "sourceNode": {
    "@id": "https://api.herbrich.org/v1/grid/nodes/f4b3c7d1-e8a9-4b62-9f38-a1c7d6e5b4a3",
    "@type": "GridNode",
    "HerbrichName": "Erzbistum Hamburg"
  }
}