Skip to main content

/v1/logs/batch


Rate Limiting

The Logs API enforces rate limiting to ensure optimal performance and resource allocation:

  • Daily Limit: 50 batch queries per client id per day
  • Rate Reset: Limits reset at midnight UTC
  • Quota Increases: Contact CM Support for higher daily quotas if your use case requires additional capacity

Usage

For every 100,000 logs retrieved in the batch query, an extra S3 presigned url is generated.

These URLs are retrieved by using the token provided by /v1/logs/batch with the /v1/logs/batch/urls endpoint.

The presigned URLs may take some time to become available. The return payload of the /v1/logs/batch/urls will detail the status of the URLs.

Example usage of presigned URLs

Performing an HTTP GET request with the URL will return an array of logs as JSON objects.

import requests
import json

presigned_url = "https://cm-api-logs-prod.s3.amazonaws.com/logs-domain-token-timerange?AWSAccessKeyId=...&Signature=...&Expires=..."

# Make GET request
response = requests.get(presigned_url)

# Check if successful
if response.status_code == 200:
# Parse JSON response
logs = response.json()

# Process each log entry
for log_entry in logs:
log_data = log_entry['_source']
print(f"log_data: {log_data}")
print("---")

The presigned URLs can also searched in a browser to download a json file with logs.