Status Endpoint
Provides real-time status and progress information for the server's startup process. This is useful for health checks, monitoring initialization, or diagnosing startup failures.
GET /status
Retrieves the current status of the server.
Request
No parameters, headers, or body are required for this request.
Example Request:
curl http://localhost:8080/status
Responses
The endpoint returns an HTTP 200 OK
for both successful startup states and failures. The operational status is
indicated by the stage
field within the response body.
Success Response
A stage
other than FAILED
indicates the server is starting up or is fully operational. When the server is fully
initialized and ready to accept requests, the stage
will be READY
and progress
will be 100
.
Example Success Response (stage: "READY"
):
{
"data": {
"stage": "READY",
"progress": 100,
"messages": [
"Loading resources...",
"Reading model...",
"Model loaded!",
"Creating model endpoints...",
"Model ready"
]
},
"server": {
"version": "1.10.1"
}
}
Response Body Fields:
Field | Type | Description |
---|---|---|
data.stage | String | The current initialization stage of the server. See the Stage Descriptions table below for details. |
data.progress | Integer | A number from 0 to 100 representing the estimated completion percentage of the startup process. |
data.messages | Array<String> | A list of human-readable messages detailing the chronological progress of the startup tasks. |
Error Response
A stage
of FAILED
indicates that the server encountered a critical error and could not start correctly. The response
will include an errors
array containing one or more error objects with details about the failure.
Example Error Response (stage: "FAILED"
):
{
"data": {
"stage": "FAILED",
"progress": 100,
"messages": [
"Loading resources...",
"Reading model...",
"Failed to load model"
],
"errors": [
{
"errorType": "INVALID_MODEL",
"cause": "Unexpected error during loadModel",
"detail": "Unexpected error during loadModel\n\n\tat ModuleCompositeModelLoader..."
}
]
},
"server": {
"version": "1.10.1"
}
}
Error Object Fields:
The errors
array may appear inside the data
object when stage
is FAILED
.
Field | Type | Description |
---|---|---|
errorType | String | A short, machine-readable code for the type of error. |
cause | String | A human-readable summary of the error. |
detail | String | A detailed technical description of the error, such as a stack trace. |
Stage Descriptions
The stage
field indicates the current phase of the server's startup lifecycle.
Stage | Description |
---|---|
GETTING_RESOURCES | Resolving and downloading project dependencies. |
STARTING | Starting up core services. |
LOADING_MODEL | Reading and loading the primary model into memory. |
BUILDING_API | Creating API endpoints for the model and other services. |
READY | The server is fully initialized and operational. |
FAILED | The server ran into a critical error and could not start. |