Stats & Analytics
Endpoints for image stats, analytics, and privacy controls.
These endpoints provide analytics, stats, and privacy controls for images. All endpoints require authentication.
GET /api/stats/{id}
Get stats for a specific image.
- Method: GET
- Path:
/api/stats/{id}
- Source: handlers.go
Example
Response
Errors
- 401: Not authenticated
- 404: Image not found
- 500: Internal server error
POST /api/privacy/{id}
Toggle privacy for an image. Requires CSRF token.
- Method: POST
- Path:
/api/privacy/{id}
- Source: handlers.go
Headers
X-CSRF-Token
: CSRF token from login/refresh
Example
Response
Errors
- 401: Not authenticated
- 403: Invalid CSRF token
- 404: Image not found
- 500: Internal server error
GET /api/stats/disk-usage
Get disk usage stats.
- Method: GET
- Path:
/api/stats/disk-usage
- Source: handlers.go
Example
Response
Errors
- 401: Not authenticated
- 500: Internal server error
GET /api/stats/views
Get global views data for the graph visualization.
- Method: GET
- Path:
/api/stats/views
- Source: handlers.go
Example
Response
Errors
- 401: Not authenticated
- 500: Internal server error
GET /api/stats/country-views
Get views by country.
- Method: GET
- Path:
/api/stats/country-views
- Source: handlers.go
Example
Response
Errors
- 401: Not authenticated
- 500: Internal server error
GET /api/stats/recent-views
Get recent image views.
- Method: GET
- Path:
/api/stats/recent-views
- Source: handlers.go
Example
Response
Errors
- 401: Not authenticated
- 500: Internal server error
GET /api/stats/dashboard
Get dashboard stats summary.
- Method: GET
- Path:
/api/stats/dashboard
- Source: handlers.go
Example
Response
Errors
- 401: Not authenticated
- 500: Internal server error