Curiosity
Split-screen slide showing Curiosity Settings UI and URL pattern for custom endpoints.

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 body
  • CurrentUser — the authenticated caller
  • Graph / Q() — graph traversal and search
  • Logger — structured logging
  • CancellationToken — 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.

Custom endpoints