The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
NODE endpoint
SQL >
%
SELECT
id,
timestamp,
method,
path,
route_pattern,
status_code,
duration,
user_agent,
request_body,
query_params,
response_body,
token_id,
user_id,
request_type
FROM dub_api_logs
WHERE
workspace_id = {{ String(workspaceId) }}
{% if defined(start) and defined(end) %}
AND timestamp >= {{ DateTime(start, '2024-06-01 00:00:00') }}
AND timestamp < {{ DateTime(end, '2024-06-07 00:00:00') }}
{% end %}
{% if defined(routePattern) %} AND route_pattern = {{ String(routePattern) }} {% end %}
{% if defined(method) %} AND method = {{ String(method) }} {% end %}
{% if defined(statusCode) %} AND status_code = {{ UInt16(statusCode) }} {% end %}
{% if defined(tokenId) %} AND token_id = {{ String(tokenId) }} {% end %}
{% if defined(requestId) %} AND id = {{ String(requestId) }} {% end %}
{% if defined(requestType) %} AND request_type = {{ String(requestType) }} {% end %}
ORDER BY timestamp DESC
LIMIT {{ Int32(limit, 100) }}
OFFSET {{ Int32(offset, 0) }}
TYPE ENDPOINT