Skip to navigation

Tail Worker Logs

Beta

Opens a server-sent events (SSE) stream that delivers real-time worker logs for a project. The stream includes log messages, request data, and exception information. A keep-alive is sent every 15 seconds. The stream times out after 5 minutes (300 seconds).

Each event is a JSON object delivered as an SSE data field. Parse the data value as JSON before reading the fields described in the response schema.

If the project cannot be found after the stream opens, the stream delivers a single event whose data is {"error": "The requested project was not found."} and then closes.

Note: This endpoint is served from the streaming API server, not the main API gateway.

Authentication

X-Auth-Tokenstring

OAuth scopes

UI NamePermissionParameter
Infrastructure Deploymentsread-onlystore_infrastructure_deployments_read_only
Infrastructure Deploymentscreate previewstore_infrastructure_deployments_create_preview
Infrastructure Deploymentsmanagestore_infrastructure_deployments_manage
Infrastructure Projectsread-onlystore_infrastructure_projects_read_only
Infrastructure Projectsmanagestore_infrastructure_projects_manage
Infrastructure Logsread-onlystore_infrastructure_logs_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

Path parameters

project_uuidstringRequiredformat: "uuid"
The UUID of the project to tail logs for.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Response

A stream of server-sent events with real-time worker log entries. The data attribute is stringified JSON.

uuidstringformat: "uuid"
The unique identifier for this log event.
project_uuidstringformat: "uuid"
The UUID of the project this log belongs to.
logslist of objects
Log messages associated with this event.
exceptionslist of objects
Exceptions that occurred during request processing.
requestobjectOptional
HTTP request information associated with this log entry. Omitted when the log event is not tied to an HTTP request.
timestampdatetimeOptional
The timestamp of the overall log event. Omitted when not available.

Errors

400
Bad Request Error