Get event logs
Retrieve a paginated list of event logs for a client tenant. Logs include page views, custom events, and system events. Results are ordered by timestamp descending (newest first).
curl -X GET "https://api.mythic-analytics.com/api/v1/clients/example_string/logs?event=example_string&from=2024-12-25T10:00:00Z&to=2024-12-25T10:00:00Z&limit=42&offset=42" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://api.mythic-analytics.com/api/v1/clients/example_string/logs?event=example_string&from=2024-12-25T10:00:00Z&to=2024-12-25T10:00:00Z&limit=42&offset=42"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.mythic-analytics.com/api/v1/clients/example_string/logs?event=example_string&from=2024-12-25T10:00:00Z&to=2024-12-25T10:00:00Z&limit=42&offset=42", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
)
func main() {
req, err := http.NewRequest("GET", "https://api.mythic-analytics.com/api/v1/clients/example_string/logs?event=example_string&from=2024-12-25T10:00:00Z&to=2024-12-25T10:00:00Z&limit=42&offset=42", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.mythic-analytics.com/api/v1/clients/example_string/logs?event=example_string&from=2024-12-25T10:00:00Z&to=2024-12-25T10:00:00Z&limit=42&offset=42')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"success": true,
"data": [
{
"id": "log_8kN2mPqR",
"event": "pageview",
"url": "https://acme-retail.com/products",
"referrer": "https://google.com",
"user_agent": "example_string",
"ip_country": "US",
"properties": {},
"timestamp": "2024-06-15T14:32:10.000Z"
}
],
"count": 250
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
/clients/{id}/logsAdmin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY
Bearer YOUR_ADMIN_KEYClient identifier.
Filter by event name (e.g., pageview, click, form_submit).
Start date in ISO 8601 format. Default is 24 hours ago.
End date in ISO 8601 format. Default is now.
Maximum results per page. Default 100, max 1000.
Number of results to skip. Default 0.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY
Path Parameters
Client identifier.
Query Parameters
Filter by event name (e.g., pageview, click, form_submit).
Start date in ISO 8601 format. Default is 24 hours ago.
End date in ISO 8601 format. Default is now.
Maximum results per page. Default 100, max 1000.
Number of results to skip. Default 0.
Responses
Last updated today