For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • GETQuery customer logs
      • GETDebug R2 SQL diagnostics
      • GETGet aggregated log stats
      • GETTrace a conversation
      • GETTrace an execution
Dashboard
LogoLogo
Runtype APILogs

Query customer logs

GET
/v1/logs
GET
/v1/logs
$curl -G https://api.runtype.com/v1/logs \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> --data-urlencode from=2024-05-01T00:00:00Z \
> --data-urlencode to=2024-05-07T23:59:59Z \
> --data-urlencode level=error,warn \
> --data-urlencode category=authentication,api \
> -d flowId=flow_9a8b7c6d5e4f3g2h1i0j \
> -d agentId=agent_1234567890abcdef \
> -d executionId=exec_20240505_001 \
> -d surfaceId=surface_web_01 \
> -d conversationId=conv_9876543210fedcba \
> --data-urlencode "search=timeout error" \
> -d limit=100 \
> -d cursor=eyJwYWdlIjoxLCJpZCI6IjEyMzQ1NiJ9 \
> -d order=desc
1{
2 "data": {
3 "entries": [
4 {
5 "timestamp": "2024-05-05T14:23:45Z",
6 "level": "error",
7 "category": "authentication",
8 "message": "User login failed due to invalid credentials",
9 "flowId": "flow_9a8b7c6d5e4f3g2h1i0j",
10 "agentId": "agent_1234567890abcdef",
11 "executionId": "exec_20240505_001",
12 "surfaceId": "surface_web_01",
13 "conversationId": "conv_9876543210fedcba",
14 "metadata": {
15 "ipAddress": "192.168.1.100",
16 "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
17 }
18 }
19 ],
20 "pagination": {
21 "cursor": "eyJwYWdlIjoxLCJpZCI6IjEyMzQ1NyJ9",
22 "hasMore": true
23 }
24 },
25 "success": true
26}
Query persisted customer logs via R2 SQL with filtering, pagination, and search.
Was this page helpful?
Previous

Debug R2 SQL diagnostics

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Query parameters

fromstringOptional

Start timestamp (ISO 8601)

tostringOptional

End timestamp (ISO 8601)

levelstringOptional

Comma-separated log levels (debug,info,warn,error)

categorystringOptional

Comma-separated categories

flowIdstringOptional
Filter by flow ID
agentIdstringOptional
Filter by agent ID
executionIdstringOptional
Filter by execution ID
surfaceIdstringOptional
Filter by surface ID
conversationIdstringOptional
Filter by conversation ID
searchstringOptional

Full-text search in message

limitstringOptional

Max results per page (default 500, max 1000)

cursorstringOptional
Pagination cursor
orderstringOptional

Sort order: asc or desc

Response

Log entries returned
dataobject
successboolean

Errors

400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error