Docs menu

Integrations

Send data over HTTP

POST a JSON array of records to https://app.lampwick.dev/ingest with your project's ingest token as a bearer token, from any language or script.

Updated View as Markdown

On this page

HTTP ingest takes records from apps without a Lampwick package: a Node or Python service, a cron script, a deploy hook. One request carries a batch of records; the Laravel package sends to the same endpoint.

Requirements

  • The project's ingest token, from the Connect your app card on the project's Settings page. Only team owners see it.
  • HTTPS. The full token goes in the Authorization header.

Send a record

curl -X POST https://app.lampwick.dev/ingest \
  -H "Authorization: Bearer YOUR_PROJECT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[{"t":"log","level":"error","message":"Backup failed"}]'

YOUR_PROJECT_TOKEN is the project's ingest token.

Check that it works

Lampwick answers 202 with the number of records it took:

{"accepted": 1}

The log line shows up under Logs in the project.

Record fields

FieldRequiredWhat it is
tyesThe record type, for example log, exception, request, job-attempt, command, scheduled-task, query, outgoing-request, queued-job, cache-event, mail or notification.
timestampnoUnix time in seconds, as a float. Left out, it is the time Lampwick receives the record.
durationnoIn microseconds.
_groupnoThe key Lampwick groups records by: a route or a job class, and for exceptions the issue.
trace_id, execution_idnoTie records to the request or job they happened in.
usernoThe id of your app's signed-in user.

Lampwick stores records of unknown types but shows only the known types in the dashboard. GET /api/v1/types lists the grouped types and their fields.

Responses

StatusMeaning
202Accepted: {"accepted": n}.
400The body is not a valid JSON array of records.
401The token is wrong.
411The request has no Content-Length header.
413The body is larger than the limit (16 MB by default). Send smaller batches.
503Lampwick is busy. Retry after the seconds in the Retry-After header.

Troubleshooting

What you seeCause and fix
401The token is wrong, or it was rotated. Copy it again from the project's Settings page.
411Your client streams the body without a length. Send it with Content-Length (curl does this for -d).
503Wait for Retry-After and send the same batch again.
202, but nothing in the dashboardCheck t: records of an unknown type are stored but not shown.