@extends('layouts.app') @section('title', 'Data Export & API - Blackberry Farm Analytics') @section('content')
โ† Analytics Dashboard ๐Ÿ“„ Professional Reports ๐ŸŽฎ Interactive Dashboard ๐Ÿ“– API Documentation

๐Ÿ“ค Data Export Center

@csrf

๐Ÿ“‹ Include Data Fields

๐Ÿ”ง Advanced Options

Large exports may take several minutes to process

๐Ÿ“ก API Endpoints Dashboard

โœ… Active
API Status
All endpoints operational
15
Available Endpoints
RESTful API
{{ $apiStats['daily_requests'] ?? 0 }}
Requests Today
{{ $apiStats['requests_trend'] ?? '+0%' }} vs yesterday
{{ $apiStats['active_keys'] ?? 1 }}
Active API Keys
Authentication tokens

๐Ÿงช Quick API Test

๐Ÿ“– API Documentation

๐Ÿ” Authentication

All API requests require authentication via API key header:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Your API Key:
{{ $apiKey ?? 'bb_farm_' . str_random(32) }}

๐Ÿ“Š Analytics Endpoints

GET /api/v1/analytics/summary

Returns comprehensive analytics summary including ROI, growth metrics, and key performance indicators.

GET /api/v1/analytics/roi/{plant_count}

Calculate ROI analysis for specified plant count with detailed financial breakdown.

POST /api/v1/analytics/scenario-comparison

Compare multiple scenarios with custom parameters for strategic planning.

๐ŸŒฑ Plant Data Endpoints

GET /api/v1/plants?limit=100&offset=0

Retrieve plant data with pagination support and filtering options.

GET /api/v1/plants/{id}/measurements

Get historical measurements for specific plant including growth data and health metrics.

๐Ÿซ Harvest Data Endpoints

GET /api/v1/harvest/summary?year=2024

Annual harvest summary with total weight, value, and seasonal breakdown.

POST /api/v1/harvest/forecast

Generate harvest forecasts based on current plant data and historical patterns.

๐Ÿ’ฐ Financial Data Endpoints

GET /api/v1/financial/cash-flow?years=3

Detailed cash flow analysis with monthly breakdown and seasonal patterns.

POST /api/v1/financial/monte-carlo

Run Monte Carlo simulation for risk assessment with configurable parameters.

๐Ÿ“‹ Standard Response Format

{
  "success": true,
  "message": "Data retrieved successfully",
  "data": { ... },
  "meta": {
    "timestamp": "2024-01-15T10:30:00Z",
    "version": "v1",
    "total": 100,
    "pagination": { ... }
  }
}

๐Ÿ“ Recent Exports & API Activity

๐Ÿ“ค Export History

Export Name Type Format Generated Size Actions
Analytics Summary Q4 Analytics Summary Excel {{ date('M j, Y H:i', strtotime('-1 hour')) }} 2.3 MB โฌ‡๏ธ Download
Plant Data Complete Plant Data CSV {{ date('M j, Y H:i', strtotime('-3 hours')) }} 856 KB โฌ‡๏ธ Download
Financial Projections Financial Data JSON {{ date('M j, Y H:i', strtotime('-1 day')) }} 124 KB โฌ‡๏ธ Download

๐Ÿ“ก Recent API Activity

{{ date('H:i:s') }} - GET /api/v1/analytics/summary - 200 OK (247ms)
{{ date('H:i:s', strtotime('-2 minutes')) }} - GET /api/v1/plants?limit=50 - 200 OK (156ms)
{{ date('H:i:s', strtotime('-5 minutes')) }} - POST /api/v1/analytics/roi - 200 OK (892ms)
{{ date('H:i:s', strtotime('-8 minutes')) }} - GET /api/v1/harvest/summary - 404 Not Found (23ms)
{{ date('H:i:s', strtotime('-12 minutes')) }} - GET /api/v1/financial/cash-flow - 200 OK (1.2s)
@endsection @push('scripts') @endpush