### Example response body for Get Project Source: https://docs.faststats.dev/api/projects/Projects.getProject/ Example JSON response body showing the structure of a project object, including fields like id, name, allowedHostnames, and configuration objects. ```json { "id": "string", "name": "string", "allowedHostnames": [ "string" ], "errorTrackingEnabled": true, "webVitalsEnabled": true, "sessionReplaysEnabled": true, "replayRetentionDays": 0, "cookielessMode": true, "token": "string", "slug": "string", "private": true, "templateId": "string", "preferredChartColors": [ "string" ], "codeContextConfig": { "enabled": true, "codebergApiUrl": "string", "repository": "string", "ref": "string", "mappings": [ { "id": "string", "provider": "github", "javaPrefix": "string", "repository": "string", "ref": "string", "pathPattern": "string", "automatic": true, "contextKey": "string", "fixedRef": "string", "versionRefs": { "property1": "string", "property2": "string" } } ] }, "icon": { "type": "icon", "value": "string", "color": "string" }, "createdAt": "string", "firstEventAt": "string", "ownerId": "string", "owner": { "id": "string", "name": "string", "slug": "string", "image": "string", "type": "user", "createdAt": "string" }} ``` -------------------------------- ### cURL request for GET /v0/public-projects Source: https://docs.faststats.dev/api/projects/Projects.listPublicProjects/ Example cURL command to list public projects. Replace the example URL with your actual endpoint. ```bash curl -X GET "https://example.com/v0/public-projects" ``` -------------------------------- ### Response Body Example for Get User Activity By Key Source: https://docs.faststats.dev/api/users/Users.getUserActivityByKey/ Example JSON response body showing an array of user activity day objects with date and eventCount fields. ```json [ { "date": "string", "eventCount": 0 }] ``` -------------------------------- ### Sample response for GET error issues Source: https://docs.faststats.dev/api/errortracking/ErrorTracking.getErrorIssuesForProjects/ Example JSON response from the endpoint, showing an array of error issue summaries with fields like id, projectId, hash, errorName, and more. ```json [ { "id": "string", "projectId": "string", "hash": "string", "errorId": "string", "errorName": "string", "errorMessage": "string", "language": "string", "latestStack": [ "string" ], "buildId": "string", "errorCauseId": "string", "occurrenceCount": 0, "matchingStackCount": 0, "affectedSessionCount": 0, "latestOccurrenceId": "string", "firstOccurred": "string", "lastOccurred": "string", "pluginVersion": "string", "firstPluginVersion": "string", "firstBuildId": "string", "affectedVersionCount": 0, "affectedVersions": [ "string" ], "mappedLatestStack": [ "string" ], "sourceMapUsedName": "string", "searchScore": 0, "matchedFields": [ "string" ], "sdkName": "string", "sdkVersion": "string", "eventTrend": [ 0 ], "viewed": true, "status": "active", "regressed": true, "currentVersionToken": "string", "currentVersionSource": "build_id", "firstSeenVersionToken": "string", "firstSeenVersionSource": "build_id", "resolution": { "mode": "once", "resolvedAt": "string", "resolvedByUserId": "string", "resolvedByName": "string", "resolvedVersionToken": "string", "resolvedVersionSource": "build_id", "note": "string" }, "priority": "critical", "assigneeId": "string", "assigneeName": "string", "labels": [ { "id": "string", "name": "string", "color": "string", "projectId": "string", "position": 0, "createdBy": "string", "updatedBy": "string", "createdAt": "string", "updatedAt": "string", "issueCount": 0 } ], "commentCount": 0 } ] ``` -------------------------------- ### Example response body for GET /v0/metrics/embed/{chartId} Source: https://docs.faststats.dev/api/metrics/Metrics.getPublicChartData/ Example JSON response showing the structure of the returned chart data, including chart configuration, project name, preferred colors, data, markers, marker collection grouping, and flow metadata. ```json { "chart": { "id": "string", "name": "string", "description": "string", "chartType": "widget", "queryConfig": { "groupLimit": 0, "visualOptions": { "colors": [ "string" ], "thresholds": [ { "value": 0, "label": "string", "color": "string" } ], "valueFormat": { "unit": "number", "customUnit": "string", "decimals": 0 }, "valueAxis": { "min": 0, "max": 0 }, "pie": { "style": "pie", "showLegend": true, "showTotal": true, "showLabels": true, "totalDisplayMode": "sum", "drilldown": { "enabled": true, "splitPattern": "string" } }, "bar": { "logarithmic": true, "stacked": true, "orientation": "vertical" }, "line": { "logarithmic": true, "lineType": "monotone", "showDots": true }, "widget": { "showTrend": true, "displayMode": "default", "valueFormat": "number" }, "list": { "selectedTabIndex": 0, "splitPattern": "string", "multiMetric": true }, "heatmap": { "showLegend": true }, "radar": { "logarithmic": true, "showDots": true, "fillOpacity": 0, "showLegend": true, "gridType": "polygon" }, "scatter": { "logarithmic": true, "pointSize": "small", "showLegend": true }, "table": { "showBars": true, "showTotals": true } }, "markerCollections": [ { "collectionId": "string", "enabled": true, "display": { "icon": "string", "emoji": "string", "color": "string" } } ] }, "query": { "type": "flow", "nodes": [ { "id": "string", "type": "string", "data": {}, "position": { "x": 0, "y": 0 } } ], "edges": [ { "id": "string", "source": "string", "target": "string" } ] } }, "projectName": "string", "projectPreferredChartColors": [ "string" ], "data": null, "markers": [ { "id": "string", "collectionId": "string", "collectionName": "string", "timestamp": "string", "title": "string", "description": "string", "icon": "string", "emoji": "string", "color": "string" } ], "markerCollectionGrouping": { "property1": "auto", "property2": "auto" }, "flowMeta": { "outputs": [ { "id": "string", "index": 0, "name": "string", "explicitName": "string", "iconSetId": "string", "color": "string", "colors": [ "string" ], "sort": { "by": "value", "direction": "asc" }, "splitPattern": "string", "splitDataSource": "string", "groupField": "string", "groupFields": [ "string" ], "primaryMetric": { "field": "string", "aggregation": "string" }, "dailyRollup": "sum" } ], "hasTimeGroup": true, "hasBreakdownTimeSeries": true, "datasourceFields": [ "string" ], "splitLabelSeparator": "string", "timeGroupInterval": "minute" }} ``` -------------------------------- ### Example response body for Get Feature Flag Series Source: https://docs.faststats.dev/api/featureflags/FeatureFlags.getFeatureFlagSeries/ Shows the JSON structure of a successful response, including bucketMs and points array. ```json { "bucketMs": 0, "points": [ { "bucket": "string", "variant": "string", "evaluations": 0 } ]} ``` -------------------------------- ### Sample response body for get user by key Source: https://docs.faststats.dev/api/users/Users.getUserByKey/ Example JSON response containing user details such as userKey, userId, eventCount, and traits. The response is a UserListItemEncoded object. ```json { "userKey": "string", "userId": "string", "personId": "string", "userIds": [ "string" ], "firstSeen": "string", "lastSeen": "string", "eventCount": 0, "activeDays": 0, "avgSessionDurationMs": 0, "firstBrowser": "string", "browser": "string", "firstOs": "string", "os": "string", "firstCountry": "string", "country": "string", "firstDevice": "string", "device": "string", "externalId": "string", "email": "string", "name": "string", "phone": "string", "avatarUrl": "string", "traits": {}, "serverCount": 0} ``` -------------------------------- ### cURL request to list projects Source: https://docs.faststats.dev/api/projects/Projects.listProjects/ Use this cURL command to send a GET request to the /v0/projects endpoint. The example uses a placeholder URL and does not include the required x-api-key header or Bearer token. ```bash curl -X GET "https://example.com/v0/projects" ``` -------------------------------- ### BungeeCord plugin setup with BungeeContext Source: https://docs.faststats.dev/java/platform/bungeecord/ Use this code in a BungeeCord plugin to initialize FastStats. Requires Java 17+ and the artifact dev.faststats.metrics:bungeecord. The context is created with a token and optional error tracker and metrics, then started in onEnable and shut down in onDisable. ```java import dev.faststats.ErrorTracker; import dev.faststats.Metrics; import dev.faststats.bungee.BungeeContext; import net.md_5.bungee.api.plugin.Plugin; public class ExamplePlugin extends Plugin { public static final ErrorTracker ERROR_TRACKER = ErrorTracker.contextAware(); private final BungeeContext context = new BungeeContext.Factory(this, "YOUR_TOKEN") .errorTrackerService(ERROR_TRACKER) .metrics(Metrics.Factory::create) .create(); @Override public void onEnable() { context.ready(); } @Override public void onDisable() { context.shutdown(); } } ``` -------------------------------- ### Response Body Example for Get Error Overview Timeseries Source: https://docs.faststats.dev/api/errortracking/ErrorTracking.getErrorOverviewTimeseries/ Example JSON response body showing the structure of the timeseries data. It includes fields for date, error count, unique error count, and bucket start time. ```json [ { "date": "string", "errors": 0, "uniqueErrors": 0, "bucketStart": "string" } ] ``` -------------------------------- ### Install @faststats/web Source: https://docs.faststats.dev/web-analytics/ Run this command to install the web package for plain JavaScript or any other framework. ```bash npm install @faststats/web ``` -------------------------------- ### Example response for Get Users Breakdown Source: https://docs.faststats.dev/api/users/Users.getUsersBreakdown/ Example JSON response from the Get Users Breakdown endpoint. Shows the structure with total, identified, anonymous, and trend fields, plus nested cohort stats. ```json { "total": 0, "identified": 0, "anonymous": 0, "totalEvents": 0, "avgEvents": 0, "activeToday": 0, "totalTrend": 0, "totalEventsTrend": 0, "avgEventsTrend": 0, "activeTodayTrend": 0, "identifiedStats": { "totalEvents": 0, "avgEvents": 0, "activeToday": 0, "totalTrend": 0, "totalEventsTrend": 0, "avgEventsTrend": 0, "activeTodayTrend": 0 }, "anonymousStats": { "totalEvents": 0, "avgEvents": 0, "activeToday": 0, "totalTrend": 0, "totalEventsTrend": 0, "avgEventsTrend": 0, "activeTodayTrend": 0 }} ``` -------------------------------- ### Install @faststats/web with bun Source: https://docs.faststats.dev/web-analytics/javascript/ Install the core browser SDK package using bun. ```bash bun add @faststats/web ``` -------------------------------- ### Complete Configuration Example with Error Tracking and Custom Metrics Source: https://docs.faststats.dev/java/configuration/ Full Bukkit context configuration including error tracking, custom metrics (number, string, bool, stringArray), and a flush callback. Calls context.ready() on enable and context.shutdown() on disable. ```java import dev.faststats.ErrorTracker; import dev.faststats.bukkit.BukkitContext; import dev.faststats.data.Metric; import org.bukkit.plugin.java.JavaPlugin; import java.util.concurrent.atomic.AtomicInteger; public final class MyBukkitPlugin extends JavaPlugin { public static final ErrorTracker ERROR_TRACKER = ErrorTracker.contextAware(); private final AtomicInteger arenaMatches = new AtomicInteger(); private final BukkitContext context = new BukkitContext.Factory(this, "YOUR_TOKEN") .errorTrackerService(ERROR_TRACKER) .metrics(factory -> factory .addMetric(Metric.number("arena_matches", arenaMatches::get)) .addMetric(Metric.string("active_ruleset", () -> "ranked_duels")) .addMetric(Metric.bool("ranked_mode", () -> true)) .addMetric(Metric.stringArray("used_hooks", () -> new String[]{"Vault", "PlaceholderAPI"})) .onFlush(() -> arenaMatches.set(0)) .create()) .create(); @Override public void onEnable() { context.ready(); } @Override public void onDisable() { context.shutdown(); } } ``` -------------------------------- ### JavaScript: Initialize with init and extensions Source: https://docs.faststats.dev/web-analytics/configuration/ Pass core options to the init function. Create each extension and add it to the extensions array. The siteKey is public and safe to include in browser code. ```javascript import { init } from "@faststats/web"; import { errorTracking } from "@faststats/web/error"; import { sessionReplay } from "@faststats/web/replay"; import { webVitals } from "@faststats/web/web-vitals"; init({ siteKey: "your_site_key", extensions: [ errorTracking(), webVitals(), sessionReplay({ recordConsole: true }), ], }); ``` -------------------------------- ### Example response body for Get Funnel Source: https://docs.faststats.dev/api/funnels/Funnels.getFunnel/ Example JSON response showing the FunnelDetail structure with funnel, baselineCount, and steps fields. ```json { "funnel": { "id": "string", "projectId": "string", "name": "string", "description": "string", "steps": [ { "type": "event", "id": "string", "name": "string", "match": "all", "filters": [ { "field": "string", "operator": "equals", "value": "string" } ] } ], "unsupportedSteps": true, "conversionWindowSeconds": 0, "strictOrder": true, "timeRangeSeconds": 0, "createdAt": "string", "updatedAt": "string" }, "baselineCount": 0, "steps": [ { "count": 0, "conversionRate": 0, "dropOffRate": 0 } ]} ``` -------------------------------- ### Install @faststats/react with bun Source: https://docs.faststats.dev/web-analytics/react/ Install the package using bun. ```bash bun add @faststats/react ``` -------------------------------- ### Response body example for EventExplorerDetail Source: https://docs.faststats.dev/api/eventexplorer/EventExplorer.getEventExplorerDetail/ Example JSON response body for the Get Event Explorer Detail endpoint, showing the structure of the EventExplorerDetail object. ```json { "id": "string", "timestamp": "string", "fieldValues": { "property1": "string", "property2": "string" }, "rawData": "string", "userKey": "string", "replaySessionId": "string"} ``` -------------------------------- ### Example response body for get anomalies Source: https://docs.faststats.dev/api/anomalies/Anomalies.getAnomaliesForProject/ Example JSON response returned by the endpoint, showing the structure of the response body including health and incidents arrays. ```json { "grain": "hour", "from": 0, "to": 0, "baselineFrom": 0, "seriesScanned": 0, "health": [ { "metric": "string", "label": "string", "unit": "count", "current": 0, "expected": 0, "status": "normal", "chart": { "from": 0, "bucketSeconds": 0, "values": [ 0 ], "expected": [ 0 ], "lower": [ 0 ], "upper": [ 0 ] } } ], "incidents": [ { "id": "string", "kind": "anomaly", "severity": "critical", "title": "string", "start": 0, "end": 0, "ongoing": true, "findings": [ { "id": "string", "metric": "string", "label": "string", "unit": "count", "polarity": 1, "dimension": "string", "value": "string", "direction": "increase", "kind": "anomaly", "start": 0, "end": 0, "ongoing": true, "observed": 0, "expected": 0, "change": 0, "peakScore": 0, "contribution": 0, "chart": { "from": 0, "bucketSeconds": 0, "values": [ 0 ], "expected": [ 0 ], "lower": [ 0 ], "upper": [ 0 ] } } ], "absorbed": 0, "causes": [ { "type": "deploy", "title": "string", "detail": "string", "at": 0, "reference": "string" } ] } ], "suppressed": 0} ``` -------------------------------- ### Install @faststats/react Source: https://docs.faststats.dev/web-analytics/ Run this command to install the React package for React or Next.js apps. ```bash npm install @faststats/react ``` -------------------------------- ### Basic Configuration with BukkitContext Source: https://docs.faststats.dev/java/configuration/ Minimal metrics configuration requiring only a token. Creates a BukkitContext with a metrics service and calls context.ready() in the onEnable method. ```java import dev.faststats.Metrics; import dev.faststats.bukkit.BukkitContext; private final BukkitContext context = new BukkitContext.Factory(plugin, "YOUR_TOKEN") .metrics(Metrics.Factory::create) .create(); public void onEnable() { context.ready(); } ``` -------------------------------- ### cURL request to get a funnel Source: https://docs.faststats.dev/api/funnels/Funnels.getFunnel/ Example cURL command to call the Get Funnel endpoint. Replace 'string' placeholders with actual project identifier and funnel ID. ```bash curl -X GET "https://example.com/v0/projects/string/funnels/string" ``` -------------------------------- ### Create and manage a client with createClient Source: https://docs.faststats.dev/web-analytics/configuration/ Shows how to create an independent client with createClient, start it explicitly, and later destroy it to remove listeners and stop extensions. Unlike init, createClient does not start automatically. ```TypeScript import { createClient } from "@faststats/web"; const analytics = createClient({ siteKey: "your_site_key" }); analytics.start(); // Later, remove listeners and stop extensions. analytics.destroy(); ``` -------------------------------- ### Install @faststats/web with yarn Source: https://docs.faststats.dev/web-analytics/javascript/ Install the core browser SDK package using yarn. ```bash yarn add @faststats/web ``` -------------------------------- ### cURL request for Get Users Breakdown Source: https://docs.faststats.dev/api/users/Users.getUsersBreakdown/ Example cURL command to call the Get Users Breakdown endpoint. Replace 'string' in the URL with the actual project ID or slug. ```bash curl -X GET "https://example.com/v0/projects/string/users/breakdown" ``` -------------------------------- ### Install @faststats/sourcemap-uploader-plugin with bun Source: https://docs.faststats.dev/web-analytics/sourcemaps/ Install the plugin as a dev dependency using bun. ```bash bun add --dev @faststats/sourcemap-uploader-plugin ``` -------------------------------- ### cURL request to get user errors Source: https://docs.faststats.dev/api/users/Users.getUserErrorsPage/ Example cURL command to call the GET endpoint. It uses the x-api-key header for authentication and includes placeholder values for idOrSlug and userKey. ```bash curl -X GET "https://example.com/v0/projects/string/users/key/string/errors" ``` -------------------------------- ### cURL request for Get Event Explorer Detail Source: https://docs.faststats.dev/api/eventexplorer/EventExplorer.getEventExplorerDetail/ Example cURL command to call the GET /v0/projects/{idOrSlug}/events/{eventId} endpoint with the required timestamp query parameter. ```bash curl -X GET "https://example.com/v0/projects/string/events/string?timestamp=string" ``` -------------------------------- ### cURL request to get anomalies for a project Source: https://docs.faststats.dev/api/anomalies/Anomalies.getAnomaliesForProject/ Example cURL command to call the GET /v0/projects/{idOrSlug}/anomalies endpoint. Replace 'string' with the actual project ID or slug. ```bash curl -X GET "https://example.com/v0/projects/string/anomalies" ``` -------------------------------- ### Install @faststats/web with pnpm Source: https://docs.faststats.dev/web-analytics/javascript/ Install the core browser SDK package using pnpm. ```bash pnpm add @faststats/web ``` -------------------------------- ### Old metrics setup with BukkitMetrics.factory() Source: https://docs.faststats.dev/java/migration/ Old code for 0.23.0 using BukkitMetrics.factory() to create metrics, with onFlush and token, and lifecycle methods ready() and shutdown(). ```java // 0.23.0 private final BukkitMetrics metrics = BukkitMetrics.factory() .addMetric(Metric.number("arena_matches", arenaMatches::get)) .onFlush(() -> arenaMatches.set(0)) .token("YOUR_TOKEN") .create(this); @Override public void onEnable() { metrics.ready(); } @Override public void onDisable() { metrics.shutdown(); } ``` -------------------------------- ### cURL request to get web vitals trends Source: https://docs.faststats.dev/api/webvitals/WebVitals.getWebVitalsTrends/ Example cURL command to call the GET /v0/projects/{idOrSlug}/vitals/trends endpoint. Replace 'string' with the actual project ID or slug. ```bash curl -X GET "https://example.com/v0/projects/string/vitals/trends" ``` -------------------------------- ### Install @faststats/react with yarn Source: https://docs.faststats.dev/web-analytics/react/ Install the package using yarn. ```bash yarn add @faststats/react ``` -------------------------------- ### Install @faststats/nuxt Source: https://docs.faststats.dev/web-analytics/ Run this command to install the Nuxt package for Nuxt apps. ```bash npm install @faststats/nuxt ``` -------------------------------- ### cURL request to get Web Vitals summary Source: https://docs.faststats.dev/api/webvitals/WebVitals.getWebVitalsSummary/ Example cURL command to call the GET /v0/projects/{idOrSlug}/vitals/summary endpoint. Replace 'string' with the actual project ID or slug. ```bash curl -X GET "https://example.com/v0/projects/string/vitals/summary" ``` -------------------------------- ### JSON Response for Build Deployments Source: https://docs.faststats.dev/api/webvitals/WebVitals.getBuildDeploymentsForProject/ Example JSON response containing an array of build deployment objects, each with a buildId and deployedAt timestamp. ```json [ { "buildId": "string", "deployedAt": "string" }] ``` -------------------------------- ### JSON response for Get User Timeline Page Source: https://docs.faststats.dev/api/users/Users.getUserTimelinePage/ Example JSON response body for the Get User Timeline Page endpoint. Shows the structure of UserTimelinePage with items, nextCursor, and signals arrays. ```json { "items": [ { "id": "string", "signal": "event", "occurredAt": "string", "endedAt": "string", "sessionId": "string", "title": "string", "subtitle": "string", "status": "string", "reference": "string", "attributes": { "property1": "string", "property2": "string" }, "provenance": { "dataset": "string", "matchedBy": "visitor_id", "matchedValue": "string", "origin": "string" } } ], "nextCursor": "string", "signals": [ { "signal": "event", "state": "ok" } ]} ``` -------------------------------- ### Install @faststats/nuxt with bun Source: https://docs.faststats.dev/web-analytics/nuxt/ Install the FastStats Nuxt module using bun. ```bash bun add @faststats/nuxt ``` -------------------------------- ### JSON response body for Get Paths For Project Source: https://docs.faststats.dev/api/paths/Paths.getPathsForProject/ Example JSON response body for the Get Paths For Project endpoint. It shows the structure with nodes, links, totalSessions, topPaths, and anchor fields. ```json { "nodes": [ { "id": "string", "step": 0, "label": "string", "sessions": 0, "dropOff": 0 } ], "links": [ { "source": "string", "target": "string", "sessions": 0 } ], "totalSessions": 0, "topPaths": [ { "steps": [ "string" ], "sessions": 0 } ], "anchor": "start"} ``` -------------------------------- ### cURL request for Get Paths For Project Source: https://docs.faststats.dev/api/paths/Paths.getPathsForProject/ Example cURL command to call the GET /v0/projects/{idOrSlug}/paths endpoint. The URL includes a placeholder for the project ID or slug and a required 'days' query parameter. ```bash curl -X GET "https://example.com/v0/projects/string/paths?days=string" ``` -------------------------------- ### Install @faststats/react with pnpm Source: https://docs.faststats.dev/web-analytics/react/ Install the package using pnpm. ```bash pnpm add @faststats/react ``` -------------------------------- ### Install @faststats/sourcemap-uploader-plugin with pnpm Source: https://docs.faststats.dev/web-analytics/sourcemaps/ Install the plugin as a dev dependency using pnpm. ```bash pnpm add --save-dev @faststats/sourcemap-uploader-plugin ``` -------------------------------- ### Sample response for Get Error Issue Detail Source: https://docs.faststats.dev/api/errortracking/ErrorTracking.getErrorIssueDetail/ Example JSON response body for the Get Error Issue Detail endpoint. It includes the issue details, timeline, and member group hashes. The response schema is defined as ErrorIssueDetail. ```json { "issue": { "id": "string", "projectId": "string", "hash": "string", "errorId": "string", "errorName": "string", "errorMessage": "string", "language": "string", "latestStack": [ "string" ], "buildId": "string", "errorCauseId": "string", "occurrenceCount": 0, "matchingStackCount": 0, "affectedSessionCount": 0, "latestOccurrenceId": "string", "firstOccurred": "string", "lastOccurred": "string", "pluginVersion": "string", "firstPluginVersion": "string", "firstBuildId": "string", "affectedVersionCount": 0, "affectedVersions": [ "string" ], "mappedLatestStack": [ "string" ], "sourceMapUsedName": "string", "searchScore": 0, "matchedFields": [ "string" ], "sdkName": "string", "sdkVersion": "string", "eventTrend": [ 0 ], "viewed": true, "status": "active", "regressed": true, "currentVersionToken": "string", "currentVersionSource": "build_id", "firstSeenVersionToken": "string", "firstSeenVersionSource": "build_id", "resolution": { "mode": "once", "resolvedAt": "string", "resolvedByUserId": "string", "resolvedByName": "string", "resolvedVersionToken": "string", "resolvedVersionSource": "build_id", "note": "string" }, "priority": "critical", "assigneeId": "string", "assigneeName": "string", "labels": [ { "id": "string", "name": "string", "color": "string", "projectId": "string", "position": 0, "createdBy": "string", "updatedBy": "string", "createdAt": "string", "updatedAt": "string", "issueCount": 0 } ], "commentCount": 0 }, "timeline": [ { "date": "string", "errors": 0, "uniqueErrors": 0, "bucketStart": "string" } ], "memberGroupHashes": [ "string" ]} ``` -------------------------------- ### CleanupUploadedSourceMapsResponse example Source: https://docs.faststats.dev/api/sourcemaps/SourceMaps.cleanupUploadedSourceMaps/ Example JSON response body for a successful cleanup operation. Contains ok, latestBuildId, excludedBuildIds, deletedBuildIds, and deletedFiles fields. ```json { "ok": true, "latestBuildId": "string", "excludedBuildIds": [ "string" ], "deletedBuildIds": [ "string" ], "deletedFiles": 0} ``` -------------------------------- ### Initialize with extensions (error tracking, web vitals, session replay) Source: https://docs.faststats.dev/web-analytics/javascript/ The core SDK records page views, page leaves, sessions, client-side navigation, visit duration, and outbound link clicks. Error tracking, Web Vitals, and session replay are extensions, so they only add code to your bundle when you import them. ```typescript import { init } from "@faststats/web"; import { errorTracking } from "@faststats/web/error"; import { sessionReplay } from "@faststats/web/replay"; import { webVitals } from "@faststats/web/web-vitals"; init({ siteKey: "your_site_key", extensions: [errorTracking(), webVitals(), sessionReplay()], }); ``` -------------------------------- ### cURL request for GET /v0/projects/{idOrSlug} Source: https://docs.faststats.dev/api/projects/Projects.getProject/ Example cURL command to fetch a project. Replace 'string' with the actual project ID or slug. ```bash curl -X GET "https://example.com/v0/projects/string" ``` -------------------------------- ### cURL request to get replay count Source: https://docs.faststats.dev/api/sessionreplays/SessionReplays.getReplayCount/ Example cURL command to call the GET /v0/projects/{idOrSlug}/replays/count endpoint. Replace 'string' in the URL with the actual project ID or slug. Requires an API key passed via the x-api-key header or as a Bearer token. ```bash curl -X GET "https://example.com/v0/projects/string/replays/count" ``` -------------------------------- ### Example response body for suggest code context Source: https://docs.faststats.dev/api/codecontext/CodeContext.suggestCodeContext/ Shows the JSON structure returned on success (200). The response includes provider, repository, ref, and an array of framePrefixes. ```json { "provider": "github", "repository": "string", "ref": "string", "framePrefixes": [ "string" ] } ``` -------------------------------- ### JSON response body for Get Segment Source: https://docs.faststats.dev/api/segments/Segments.getSegment/ Example response body for a successful (200) Get Segment request. Shows the structure of a SegmentRecord, including fields like id, projectId, key, name, type, definition, members, flagCompatible, usedBy, createdAt, and updatedAt. ```json { "id": "string", "projectId": "string", "key": "string", "name": "string", "description": "string", "type": "dynamic", "definition": { "type": "group", "match": "all", "negate": true, "children": [ {} ] }, "members": [ { "kind": "identifier", "value": "string", "excluded": true } ], "flagCompatible": true, "usedBy": { "segments": [ "string" ], "flags": [ "string" ] }, "createdAt": "string", "updatedAt": "string"} ``` -------------------------------- ### Install @faststats/sourcemap-uploader-plugin with yarn Source: https://docs.faststats.dev/web-analytics/sourcemaps/ Install the plugin as a dev dependency using yarn. ```bash yarn add --dev @faststats/sourcemap-uploader-plugin ``` -------------------------------- ### Response body for get replay count Source: https://docs.faststats.dev/api/sessionreplays/SessionReplays.getReplayCount/ Example response body showing a successful count of replays. The response is a single number representing the count. ```json 0 ``` -------------------------------- ### New metrics setup with BukkitContext.Factory Source: https://docs.faststats.dev/java/migration/ Updated code for 0.24.0 using BukkitContext.Factory to create a context that owns metrics and lifecycle. Use .metrics(Metrics.Factory::create) if only built-in metrics are needed. ```java // 0.24.0 private final BukkitContext context = new BukkitContext.Factory(this, "YOUR_TOKEN") .metrics(factory -> factory .addMetric(Metric.number("arena_matches", arenaMatches::get)) .onFlush(() -> arenaMatches.set(0)) .create()) .create(); @Override public void onEnable() { context.ready(); } @Override public void onDisable() { context.shutdown(); } ``` -------------------------------- ### cURL request for GET /v0/metrics/embed/{chartId} Source: https://docs.faststats.dev/api/metrics/Metrics.getPublicChartData/ Example cURL command to fetch public chart data. Replace 'string' with the actual chart ID. ```bash curl -X GET "https://example.com/v0/metrics/embed/string" ``` -------------------------------- ### cURL request for Search Download Provider Projects Source: https://docs.faststats.dev/api/downloads/Downloads.searchDownloadProviderProjects Example cURL command to search for download provider projects. Requires an API key in the x-api-key header or as a Bearer token. The provider and query parameters are required. ```bash curl -X GET "https://example.com/v0/projects/string/download-providers/search?provider=modrinth&query=string" ```