Docs
BlogHomeStart building

Logs & Preview Server

See what your app prints, in development and in production.


A project writes logs in two places: the development preview (dev) and the published site (live). Each log line belongs to one request, so you can follow a failing request from its status to the error it threw. Get Project Logs reads both with filters; the other two endpoints keep simpler shapes.

#Get Project Logs

GET/api/v1/vcaas/projects/:projectId/logsapi-keyFree

Log lines of the preview or the published site, newest first, with filters.

Path parameters

ParameterTypeDescription
projectIdstringThe project id

Query parameters

FieldTypeRequiredDescription
envstringNo"dev" (preview) or "live" (published site)
fromstringNoStart, ISO 8601
tostringNoEnd, ISO 8601
levelstringNo"error", "warn", "info", "log" or "debug"
qstringNoText to find in the message (up to 200 characters)
statusstringNoHTTP status of the request: 500, or a class like 5xx
pathstringNoRequest path
requestIdstringNoOne request's lines
limitnumberNo1–500

Response fields

FieldTypeDescription
data.itemsobject[]Log lines
data.items[].tsstringISO 8601 time
data.items[].levelstringerror, warn, info, log or debug
data.items[].messagestringThe text (secrets redacted)
data.items[].requestIdstring | nullThe request it belongs to
data.items[].methodstring | nullHTTP method
data.items[].pathstring | nullRequest path
data.items[].statusnumber | nullResponse status
data.items[].cpuMsnumber | nullCPU time of the request
data.items[].wallMsnumber | nullDuration of the request
data.items[].outcomestringHow the request ended (ok, exception, canceled, …)
data.items[].exceptionobject | undefined{ name, message, stack? } of an uncaught error
data.windowobject{ from, to, source }: the range searched
data.nextCursorstring | nullCursor for older lines
data.sampledbooleantrue when a very busy window was sampled
data.hintstring | undefinedA suggestion when nothing matched

Example request

curl -H "api-key: tlm_sk_your_key" \
  "https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/logs?env=live&level=error&limit=50"
Success · 200 OK
json
{
  "errors": null,
  "data": {
    "items": [
      {
        "ts": "2026-10-08T12:03:11.000Z",
        "level": "error",
        "message": "TotalumError [INSUFFICIENT_CREDITS]: The account has no credits",
        "requestId": "9a1f2c",
        "method": "POST",
        "path": "/api/summary",
        "status": 502,
        "cpuMs": 4,
        "wallMs": 210,
        "outcome": "ok"
      }
    ],
    "window": { "from": "2026-10-08T06:03:00.000Z", "to": "2026-10-08T12:03:30.000Z", "source": "buffer" },
    "nextCursor": null,
    "sampled": false
  }
}

Error codes

CodeHTTPMeaning
VALIDATION_ERROR400A filter has an invalid value

#Get Production Logs

GET/api/v1/vcaas/projects/:projectId/backend/prod/logsapi-keyFree

The published site's requests, one record per request with the console output and exceptions of that request nested in it. Without from/to it covers the last 6 hours (the last 3 days when to or regexSearch is given). At most 500 log lines are read.

Path parameters

ParameterTypeDescription
projectIdstringThe project id

Query parameters

FieldTypeRequiredDescription
fromstringNoStart, ISO 8601
tostringNoEnd, ISO 8601
regexSearchstringNoText to find — the fastest way to a specific request

Response fields

FieldTypeDescription
data.okbooleantrue
data.organizationIdstringThe project id
data.fromMsnumberStart of the range (epoch ms)
data.toMsnumberEnd of the range (epoch ms)
data.regexSearchstring | nullThe search
data.countnumberRecords returned
data.recordsobject[]One per request
data.records[].EventTimestampMsnumberWhen it was served
data.records[].OutcomestringHow it ended
data.records[].WallTimeMsnumber | undefinedDuration
data.records[].CPUTimeMsnumber | undefinedCPU time
data.records[].Event.Requestobject{ URL, Method }
data.records[].Event.Responseobject | undefined{ Status }
data.records[].Logsobject[]{ Level, Message: [text], TimestampMs }
data.records[].Exceptionsobject[]{ Name, Message, TimestampMs }
data.totalCharsnumberSize of the records
data.truncatedbooleantrue when the 500-line read limit was hit — narrow the range
data.windowobject{ from, to, source } actually searched

Example request

curl -H "api-key: tlm_sk_your_key" \
  "https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/backend/prod/logs?regexSearch=checkout"
Success · 200 OK
json
{
  "errors": null,
  "data": {
    "ok": true,
    "organizationId": "barber-bookings",
    "fromMs": 1791547200000,
    "toMs": 1791806400000,
    "regexSearch": "checkout",
    "count": 1,
    "records": [
      {
        "EventTimestampMs": 1791806380000,
        "Outcome": "ok",
        "WallTimeMs": 128,
        "CPUTimeMs": 14,
        "Event": { "Request": { "URL": "/api/checkout", "Method": "POST" }, "Response": { "Status": 500 } },
        "Logs": [{ "Level": "error", "Message": ["checkout failed: missing price"], "TimestampMs": 1791806380000 }],
        "Exceptions": []
      }
    ],
    "totalChars": 312,
    "truncated": false
  }
}
End of Get Production LogsNext endpointGETGet Dev Server Logs

#Get Dev Server Logs

GET/api/v1/vcaas/projects/:projectId/backend/dev/logsapi-keyFree

The development preview's log of the last hour, as plain text ([time] message per line, oldest first).

Path parameters

ParameterTypeDescription
projectIdstringThe project id

Response fields

FieldTypeDescription
data.logsstringThe lines, or a note when there are none yet

Example request

curl -H "api-key: tlm_sk_your_key" \
  https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/backend/dev/logs
Success · 200 OK
json
{ "errors": null, "data": { "logs": "[2026-10-08T11:58:02.000Z] booking saved bk_1001\n[2026-10-08T11:58:03.000Z] e-mail sent to owner" } }

#Start or Restart Server

POST/api/v1/vcaas/projects/:projectId/agent/server/start-or-restartapi-key2 credits (free to wake a sleeping project)

Restart the project's development environment from its saved code, for example when the preview is stuck. On a project asleep after a long inactivity it wakes it instead (free): the preview answers again within seconds. You rarely need this — a prompt wakes a project by itself.

Path parameters

ParameterTypeDescription
projectIdstringThe project id

Response fields

FieldTypeDescription
data.messagestring"Server is restarting" or "Project is reactivating"
data.statusstring"restarting" or "reactivating"
data.operationIdstringThe operation, visible in Get Project State
data.creditsChargednumber2 for a restart, 0 to wake

Example request

curl -X POST -H "api-key: tlm_sk_your_key" \
  https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/agent/server/start-or-restart
Success · 200 OK
json
{ "errors": null, "data": { "message": "Server is restarting", "status": "restarting", "operationId": "op_01k6xt", "creditsCharged": 2 } }

Error codes

CodeHTTPMeaning
AGENT_RUNNING409A prompt is running
OPERATION_IN_PROGRESS409Another operation (publish, restore…) is running
End of Start or Restart Server Back to top