Docs
BlogHomeStart building

Server

Control the development server and inspect both log streams.


These endpoints manage your project's development server. Starting the server is asynchronous. All endpoints require the api-key header.

#Start or Restart Server

POST/api/v1/vcaas/projects/:projectId/agent/server/start-or-restartUses credits

Start or restart the development server for your project. This endpoint is asynchronous — it returns immediately with status "starting" and the server startup continues in the background for 2 to 4 minutes.

Poll GET /projects/:projectId every 10–15 seconds until agentServerStatus is "Active".

Path parameters

ParameterTypeDescription
projectIdstringThe project ID

Response fields

FieldTypeDescription
data.messagestringStatus message
data.statusstringAlways "starting"

Example request

bash
curl -X POST -H "api-key: tlm_sk_your_key" \
  https://api-accounts.totalum.app/api/v1/vcaas/projects/my-app/agent/server/start-or-restart
Success · 200 OK
json
{
  "errors": null,
  "data": {
    "message": "Server start/restart initiated",
    "status": "starting"
  }
}
Error · 409
json
{
  "errors": {
    "errorCode": "AGENT_RUNNING",
    "errorMessage": "Cannot restart server while agent is running"
  },
  "data": null
}

Error codes

CodeHTTPMeaning
MISSING_PROJECT_ID400projectId is required
PROJECT_NOT_FOUND404Project does not exist or you don't own it
AGENT_RUNNING409Cannot restart server while agent is running
DEPLOYMENT_RUNNING409Cannot restart server while deployment is in progress
RECOVERY_RUNNING409Cannot restart server while version recovery is in progress
INSUFFICIENT_CREDITS402Not enough credits for server start
End of Start or Restart ServerNext endpointGETGet Dev Server Logs

#Get Dev Server Logs

GET/api/v1/vcaas/projects/:projectId/backend/dev/logsFree

Retrieve backend development server stdout/stderr output — literally the dev server's log file on the project's sandbox VM.

Dev and production are two different machines

This endpoint returns the development server's output only. A published project runs on Cloudflare, not on the sandbox, so its request logs exist nowhere in this response — use Get Production Logs when you are debugging the live site.

Path parameters

ParameterTypeDescription
projectIdstringThe project ID

Response fields

FieldTypeDescription
data.logsstringDevelopment server stdout/stderr output

Example request

bash
curl -H "api-key: tlm_sk_your_key" \
  https://api-accounts.totalum.app/api/v1/vcaas/projects/my-app/backend/dev/logs
Success · 200 OK
json
{
  "errors": null,
  "data": { "logs": "Server running on port 3000\n..." }
}
Error · 404
json
{
  "errors": {
    "errorCode": "PROJECT_NOT_FOUND",
    "errorMessage": "Project does not exist or you don't own it"
  },
  "data": null
}

Error codes

CodeHTTPMeaning
MISSING_PROJECT_ID400projectId is required
PROJECT_NOT_FOUND404Project does not exist or you don't own it
End of Get Dev Server LogsNext endpointGETGet Production Logs

#Get Production Logs

GET/api/v1/vcaas/projects/:projectId/backend/prod/logsFree

Query the request logs of the published project — the one running on Cloudflare at your production URL. Each record is one request, with the console output and exceptions that happened while serving it.

Only for a deployed project

These logs come from the production runtime, so they exist only after a successful deployment. A project that has never been deployed simply has no records. For the preview you are iterating on, use Get Dev Server Logs instead.

Retention is 3 days

Records older than 3 days are gone. from and to must fall inside that window (to may reach into tomorrow so that all of today is covered).

Path parameters

ParameterTypeDescription
projectIdstringThe project ID

Query parameters

FieldTypeRequiredDescription
getOnlyLastLogsbooleanNotrue returns only the most recent records. Default false
fromstringNoStart of the range, ISO 8601 (e.g. 2026-08-01T00:00:00Z). Must be within the last 3 days
tostringNoEnd of the range, ISO 8601. Must be within the last 3 days
regexSearchstringNoRegex or plain string to filter by. Returns the matching entries plus nearby lines — the fastest way to find a specific log
Search first, then narrow

Filtering with regexSearch is far more effective than paging a broad window: a wide query can quietly hit the plan's log-request limit or bury the entry you are after. If the first search misses, retry with a more specific pattern and a tighter from/to rather than a wider one.

Response fields

FieldTypeDescription
dataobject | arrayPassthrough from the log pipeline. Read the records from data.records when present, otherwise data is itself the array of records
data.recordsarrayThe matching request records
data.records[].EventTimestampMsnumberWhen the request was served, epoch milliseconds
data.records[].OutcomestringHow the request ended, e.g. ok, exception, canceled
data.records[].WallTimeMsnumberWall-clock duration of the request
data.records[].CPUTimeMsnumberCPU time consumed by the request
data.records[].Event.Request.URLstringThe requested URL
data.records[].Event.Request.MethodstringHTTP method
data.records[].Event.Response.StatusnumberHTTP status returned
data.records[].LogsarrayConsole output produced while serving this request
data.records[].Logs[].Levelstringlog, info, warn, error or debug
data.records[].Logs[].MessagearrayThe logged values
data.records[].Logs[].TimestampMsnumberWhen the line was written, epoch milliseconds
data.records[].ExceptionsarrayUncaught exceptions thrown while serving this request
data.records[].Exceptions[].NamestringException class, e.g. TypeError
data.records[].Exceptions[].MessagestringException message
data.records[].Exceptions[].TimestampMsnumberWhen it was thrown, epoch milliseconds
Treat every field as optional

The payload is forwarded verbatim from the production log pipeline, so its exact shape is not one this API guarantees. Read defensively: accept the records under data.records or as a bare array, and render a record that is missing fields rather than throwing.

Example request

bash
curl -H "api-key: tlm_sk_your_key" \
  "https://api-accounts.totalum.app/api/v1/vcaas/projects/my-app/backend/prod/logs?regexSearch=checkout&from=2026-08-03T00:00:00Z&to=2026-08-04T23:59:59Z"

Just the most recent activity:

bash
curl -H "api-key: tlm_sk_your_key" \
  "https://api-accounts.totalum.app/api/v1/vcaas/projects/my-app/backend/prod/logs?getOnlyLastLogs=true"
Success · 200 OK
json
{
  "errors": null,
  "data": {
    "records": [
      {
        "EventTimestampMs": 1785840843120,
        "Outcome": "ok",
        "WallTimeMs": 128,
        "CPUTimeMs": 14,
        "Event": {
          "Request": { "URL": "https://my-app.totalum-project.com/api/orders", "Method": "GET" },
          "Response": { "Status": 500 }
        },
        "Logs": [
          { "Level": "error", "Message": ["Cannot read properties of undefined"], "TimestampMs": 1785840843118 }
        ],
        "Exceptions": [
          { "Name": "TypeError", "Message": "Cannot read properties of undefined", "TimestampMs": 1785840843119 }
        ]
      }
    ]
  }
}
Error · 429
json
{
  "errors": {
    "errorCode": "PLAN_LIMIT_REACHED",
    "errorMessage": "Production logs request limit reached for your plan. Please upgrade or wait for the limit to reset."
  },
  "data": null
}

Error codes

CodeHTTPMeaning
MISSING_PROJECT_ID400projectId is required
PROJECT_NOT_FOUND404Project does not exist or you don't own it
PLAN_LIMIT_REACHED429Your plan's production-log request limit was reached. Wait for the reset or upgrade
PROD_LOGS_WORKER_ERROR400The production log pipeline could not serve the query
End of Get Production Logs Back to top