Skip to main content

Endpoint

GET https://theslow.net/api/slowstats/get-events?projectId=YOUR_PROJECT_ID

Overview

This endpoint retrieves all event records for a given project, ordered by most recent first.
Use it to fetch analytics or event tracking data tied to your projects.

Authentication

This endpoint requires an API key. You can retrieve an API key from your dashboard. Include it in the X-API-KEY header:
X-API-KEY: YOUR_API_KEY_HERE
For more details, see the Authentication Guide.

Query Parameters

ParameterTypeRequiredDescription
projectIdstringYesThe ID of the project to fetch events for.

Responses

βœ… 200 OK

Returns a JSON object containing the list of events:
{
  "events": [
    {
      "id": "string",
      "project_id": "string",
      "type": "string",
      "data": { /* custom event data */ },
      "occurred_at": "2025-07-16T00:00:00Z"
    }
  ]
}

⚠️ 400 Bad Request

If projectId is missing:
{
  "error": "Project ID is required."
}

πŸ”’ 401 Unauthorized

If authentication fails (invalid or missing API key):
{
  "error": "Unauthorized: You must provide a valid API Key."
}

🚫 403 Forbidden

If the project does not belong to the authenticated user:
{
  "error": "Forbidden: You do not have access to this project."
}

πŸ’₯ 500 Internal Server Error

For unexpected server errors:
{
  "error": "An internal server error occurred."
}

Examples

CURL

curl -X GET "https://theslow.net/api/slowstats/get-events?projectId=abc123"      -H "X-API-KEY: YOUR_API_KEY_HERE"

Python (requests)

import requests

headers = {"X-API-KEY": "YOUR_API_KEY_HERE"}
params = {"projectId": "abc123"}
response = requests.get("https://theslow.net/api/slowstats/get-events", headers=headers, params=params)
print(response.json())

JavaScript (fetch)

fetch("https://theslow.net/api/slowstats/get-events?projectId=abc123", {
  headers: { "X-API-KEY": "YOUR_API_KEY_HERE" }
})
  .then(res => res.json())
  .then(data => console.log(data.events));

Notes

  • This endpoint enforces ownership checks, meaning you can only fetch events for projects tied to your API key.
  • Results are ordered by occurred_at descending (most recent first).

Need Further Assistance?

If you have any questions or encounter issues, please don’t hesitate to reach out to our support team.