Skip to content

Missing /api/domains REST endpoint (sandbox 404) #131

@dligthart

Description

@dligthart

Summary

The Agent Sandbox UI calls GET /api/domains during context hydration (hydrateSandboxContext()), but this endpoint does not exist in the backend routes, resulting in a 404.

Steps to Reproduce

  1. Open the Agent Sandbox UI
  2. Observe network tab — GET /api/domains returns 404
  3. Backend logs show: Route GET:/api/domains not found

Expected

A GET /api/domains endpoint should return the list of domains for the current authenticated user/key.

Impact

The sandbox cannot auto-detect domain context, forcing users to manually configure domain IDs.

Suggested Fix

Add a GET /api/domains route in src/api/routes.ts that returns domains scoped to the authenticated principal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions