
Custom endpoints
C# code that runs inside the workspace and is exposed over HTTP. Write it in Settings → Custom Endpoints, and it hot-deploys immediately.
Every endpoint has access to:
Body.FromJson<T>()— parse the request bodyCurrentUser— the authenticated callerGraph/Q()— graph traversal and searchLogger— structured loggingCancellationToken— client disconnection
A minimal endpoint:
class EchoRequest { public string Message { get; set; } }
var req = Body.FromJson<EchoRequest>();
if (string.IsNullOrWhiteSpace(req?.Message))
return BadRequest("message is required");
return new { echo = req.Message, caller = CurrentUser?.UID };
URL pattern:
POST /api/endpoints/run/{name} ← session JWT or API token
POST /api/endpoints/token/run/{name} ← endpoint token
Hot-deploy: the previous version stays live until the new one compiles successfully. No downtime.