struxastruxa
Reference

API Overview

The Struxa panel exposes a type-safe oRPC API. This page covers authentication, endpoints, and usage.

The Struxa panel uses oRPC — a type-safe RPC layer over HTTP POST. All procedures live under /rpc.

Authentication

The API uses API keys via Better Auth's API key plugin. Generate one from your account settings in the panel under Account → API Keys.

Pass the key in every request:

Authorization: Bearer YOUR_API_KEY

Base URL

https://panel.example.com/rpc

Calling Procedures

Each procedure is called via HTTP POST with a JSON body:

curl -X POST https://panel.example.com/rpc/servers.list \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Procedure Namespaces

NamespaceAccessDescription
servers.*User / AdminList, get, power-control, and manage game servers
nodes.*AdminRegister and manage Wings nodes and allocations
eggs.*User / AdminList and manage game server templates
nests.*AdminManage nest groups for eggs
users.*AdminManage panel users
subusers.*UserGrant server access to other users
backups.*UserCreate, restore, and delete server backups
databases.*User / AdminManage server databases and database hosts
schedules.*UserManage automated task schedules
files.*UserBrowse and manage server files
activity.*User / AdminView audit logs
settings.*UserUpdate server settings
locations.*AdminManage node locations

Access Levels

  • User — Requires a valid session or API key. Servers are scoped to the authenticated user.
  • Admin — Requires the admin role. Full access to all resources across all users.

TypeScript Client

The API is fully typed via oRPC and Zod. A type-safe client can be generated for TypeScript:

import { createORPCClient } from '@orpc/client';

const client = createORPCClient({
  baseUrl: 'https://panel.example.com/rpc',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
  },
});

const servers = await client.servers.list({});

On this page