import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const logs = await client.logs.list();
console.log(logs);
[
{
"timestamp": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"operation_type": "<string>",
"status": "<string>",
"tokens_used": 123,
"duration_ms": 123,
"app_id": "<string>",
"metadata": {},
"error": "<string>"
}
]
Return recent logs for the authenticated user (scoped by user_id).
import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const logs = await client.logs.list();
console.log(logs);
[
{
"timestamp": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"operation_type": "<string>",
"status": "<string>",
"tokens_used": 123,
"duration_ms": 123,
"app_id": "<string>",
"metadata": {},
"error": "<string>"
}
]
1 <= x <= 500
Successful Response
The response is of type LogResponse · object[]
.
Was this page helpful?