/api/v1/instances/[instanceId]/services/status (management)
Source-derived management endpoint contract, authentication, request validation, responses, and errors.
This is the management service route. Its origin and authentication are described in Platform API overview and Authentication. A path shared by another service is a different endpoint.
| Property | Contract |
|---|---|
| Methods | GET |
| Path | /api/v1/instances/[instanceId]/services/status |
| Path parameters | instanceId |
| Query parameters read in route | None read directly; schema validation below may define additional fields |
| Headers read in route | No additional direct header reads; authentication helpers may read credentials |
Authentication and access
Management auth context: validated x-api-key or configured session authentication; trusted gateway integration may select its auth pipeline. Organization/tenant checks are separate.
Method behavior
The handler excerpt preserves field validation, response envelopes, cookie changes, and exception branches. Values returned by service helpers retain their named response type above; for passthrough routes, the upstream response is authoritative.
GET
export async function GET(
request: NextRequest,
{ params }: { params: Promise<{ instanceId: string }> }
) {
try {
// Authenticate request
const authContext = await resolveAuthContext(request, {
allowApiKey: true,
allowSession: true,
});
const { instanceId } = await params;
// Get service status
const status = await hotLoadingService.getServiceStatus(instanceId);
return NextResponse.json(status);
} catch (error) {
if (error instanceof ApiError) {
return NextResponse.json(
{ error: error.message },
{ status: error.statusCode }
);
}
console.error('[API] Error getting service status:', error);
return NextResponse.json(
{ error: 'Internal server error' },
{ status: 500 }
);
}
}Source: minds-ui/apps/api-service/app/api/v1/instances/[instanceId]/services/status/route.ts:12.
Response and error branches
Literal HTTP statuses in the route: 500. Shared management error classes are defined in Errors and responses.
NextResponse.json(status)Source: minds-ui/apps/api-service/app/api/v1/instances/[instanceId]/services/status/route.ts:28.
NextResponse.json(
{ error: error.message },
{ status: error.statusCode }
)Source: minds-ui/apps/api-service/app/api/v1/instances/[instanceId]/services/status/route.ts:31.
NextResponse.json(
{ error: 'Internal server error' },
{ status: 500 }
)Source: minds-ui/apps/api-service/app/api/v1/instances/[instanceId]/services/status/route.ts:38.
Service dependencies
minds-ui/apps/api-service/lib/services/auth-context.tsminds-ui/apps/api-service/lib/services/hot-loading-service.tsminds-ui/apps/api-service/types/errors.ts
Evidence
Generated from the local source snapshot on 2026-09-12. This page documents implemented code and does not certify a deployed service, permissions configuration, or successful provider operation.
Source file: minds-ui/apps/api-service/app/api/v1/instances/[instanceId]/services/status/route.ts. SHA-256: 368322900709854d66459ffabaa212dbd8ec1830642b3a0be511e9a89fa45cec.