Skip to main content

ServerLog

Stored in the serverlogs collection. createdAt and updatedAt are maintained automatically.

Returned by GET /logs.

Example​

One real ServerLog as returned by GET /logs, taken from the data array. Recorded from a live response, so the defaults, denormalised snapshots and populated fields are the actual ones:

{
"_id": "6a96766dd7866f8745120638",
"level": "info",
"message": "GET /api/key/protected/logs?n=1",
"timestamp": "2026-09-01T06:53:33.920Z",
"meta": {
"query": {
"n": "1"
},
"location": "Location Not Found",
"userAgent": "node",
"source": {
"os": "Other 0.0.0",
"device": "Other 0.0.0",
"browser": "Other 0.0.0"
}
},
"isAdminLog": false,
"ip": "127.0.0.1",
"method": "GET",
"url": "/api/key/protected/logs?n=1",
"createdAt": "2026-09-01T06:53:33.922Z",
"updatedAt": "2026-09-01T06:53:33.922Z",
"__v": 0
}

:::note Trimmed for reading A populated reference is shown by the fields that identify it rather than in full — it arrives as the entire referenced document. Long arrays are cut to the first two entries and marked, long strings are truncated, and any field that could carry a credential is dropped rather than masked. :::

Fields​

FieldTypeNotes
levelstringrequired
messagestringrequired
timestampdatedefault now
metaany
adminUserObjectId -> Admin
userObjectId -> User
memberObjectId -> Member
companyObjectId -> Company
isAdminLogbooleandefault false
apiKeyObjectId -> Api
ipstring
methodstring
urlstring
statusCodenumber
stackstring
requestBodyany
createdByObjectId -> Member
updatedByObjectId -> Member
createdByAdminObjectId -> Admin
updatedByAdminObjectId -> Admin
statusstringone of success, failure
reasonstring
_idObjectId
createdAtdateset once
updatedAtdate