Spaces:
Running
Running
Download api.html from AURAASUS/deepsite-project: direct link, hf CLI and curl.
- Browser
- Download file 13.7 kB
-
https://huggingface.co/spaces/AURAASUS/deepsite-project/resolve/main/api.html
- Command line
-
hf download hf://spaces/AURAASUS/deepsite-project/api.html
-
curl -L -o api.html https://huggingface.co/spaces/AURAASUS/deepsite-project/resolve/main/api.html
13.7 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>API Gateway | OrbitAI</title> | |
| <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet"> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"> | |
| <link rel="stylesheet" href="style.css"> | |
| </head> | |
| <body class="bg-gray-900 text-white"> | |
| <div class="flex h-screen"> | |
| <!-- Sidebar --> | |
| <div class="w-64 bg-gray-800 p-4"> | |
| <div class="mb-8"> | |
| <h1 class="text-2xl font-bold text-blue-400">OrbitAI</h1> | |
| </div> | |
| <nav class="space-y-2"> | |
| <a href="dashboard.html" class="flex items-center space-x-2 text-gray-300 hover:text-white p-3 rounded-lg hover:bg-gray-700"> | |
| <i class="fas fa-tachometer-alt"></i> | |
| <span>Dashboard</span> | |
| </a> | |
| <a href="feeds.html" class="flex items-center space-x-2 text-gray-300 hover:text-white p-3 rounded-lg hover:bg-gray-700"> | |
| <i class="fas fa-satellite-dish"></i> | |
| <span>Satellite Feeds</span> | |
| </a> | |
| <a href="alerts.html" class="flex items-center space-x-2 text-gray-300 hover:text-white p-3 rounded-lg hover:bg-gray-700"> | |
| <i class="fas fa-bell"></i> | |
| <span>Event Alerts</span> | |
| </a> | |
| <a href="analytics.html" class="flex items-center space-x-2 text-gray-300 hover:text-white p-3 rounded-lg hover:bg-gray-700"> | |
| <i class="fas fa-chart-line"></i> | |
| <span>Analytics</span> | |
| </a> | |
| <a href="marketplace.html" class="flex items-center space-x-2 text-gray-300 hover:text-white p-3 rounded-lg hover:bg-gray-700"> | |
| <i class="fas fa-store"></i> | |
| <span>Marketplace</span> | |
| </a> | |
| <a href="compliance.html" class="flex items-center space-x-2 text-gray-300 hover:text-white p-3 rounded-lg hover:bg-gray-700"> | |
| <i class="fas fa-gavel"></i> | |
| <span>Compliance</span> | |
| </a> | |
| <a href="api.html" class="flex items-center space-x-2 text-blue-400 bg-gray-700 p-3 rounded-lg"> | |
| <i class="fas fa-code"></i> | |
| <span>API Gateway</span> | |
| </a> | |
| <a href="settings.html" class="flex items-center space-x-2 text-gray-300 hover:text-white p-3 rounded-lg hover:bg-gray-700"> | |
| <i class="fas fa-cog"></i> | |
| <span>Settings</span> | |
| </a> | |
| <a href="deepsite.html" class="flex items-center space-x-2 text-gray-300 hover:text-white p-3 rounded-lg hover:bg-gray-700"> | |
| <i class="fas fa-code"></i> | |
| <span>DeepSite</span> | |
| </a> | |
| </nav> | |
| </div> | |
| <!-- Main Content --> | |
| <div class="flex-1 p-8 overflow-y-auto"> | |
| <div class="flex justify-between items-center mb-8"> | |
| <h2 class="text-3xl font-bold">API Gateway</h2> | |
| <div class="flex space-x-4"> | |
| <button class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded-lg"> | |
| <i class="fas fa-download mr-2"></i>Download SDK | |
| </button> | |
| <button class="bg-gray-700 hover:bg-gray-600 px-4 py-2 rounded-lg"> | |
| <i class="fas fa-key mr-2"></i>Generate API Key | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Stats Cards --> | |
| <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8"> | |
| <div class="bg-gray-800 p-6 rounded-lg"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-gray-400">Active Endpoints</p> | |
| <h3 class="text-2xl font-bold">12</h3> | |
| </div> | |
| <i class="fas fa-plug text-blue-400 text-2xl"></i> | |
| </div> | |
| <p class="text-green-400 text-sm mt-2"><i class="fas fa-arrow-up mr-1"></i>2 new this month</p> | |
| </div> | |
| <div class="bg-gray-800 p-6 rounded-lg"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-gray-400">API Calls Today</p> | |
| <h3 class="text-2xl font-bold">142,873</h3> | |
| </div> | |
| <i class="fas fa-exchange-alt text-green-400 text-2xl"></i> | |
| </div> | |
| <p class="text-green-400 text-sm mt-2"><i class="fas fa-arrow-up mr-1"></i>18% from yesterday</p> | |
| </div> | |
| <div class="bg-gray-800 p-6 rounded-lg"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-gray-400">Avg. Response Time</p> | |
| <h3 class="text-2xl font-bold">42ms</h3> | |
| </div> | |
| <i class="fas fa-tachometer-alt text-yellow-400 text-2xl"></i> | |
| </div> | |
| <p class="text-green-400 text-sm mt-2"><i class="fas fa-arrow-down mr-1"></i>3ms improvement</p> | |
| </div> | |
| <div class="bg-gray-800 p-6 rounded-lg"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-gray-400">Uptime</p> | |
| <h3 class="text-2xl font-bold">99.98%</h3> | |
| </div> | |
| <i class="fas fa-check-circle text-green-400 text-2xl"></i> | |
| </div> | |
| <p class="text-green-400 text-sm mt-2"><i class="fas fa-arrow-up mr-1"></i>0.02% improvement</p> | |
| </div> | |
| </div> | |
| <!-- API Documentation --> | |
| <div class="bg-gray-800 rounded-lg p-6 mb-8"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="text-xl font-bold">API Endpoints</h3> | |
| <div class="relative"> | |
| <input type="text" placeholder="Search endpoints..." class="bg-gray-700 border border-gray-600 rounded-lg pl-10 pr-4 py-2 w-64"> | |
| <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i> | |
| </div> | |
| </div> | |
| <div class="space-y-6"> | |
| <!-- Endpoint 1 --> | |
| <div class="border border-gray-700 rounded-lg p-4"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <h4 class="font-bold text-lg">GET /api/v1/satellites</h4> | |
| <p class="text-gray-400">Retrieve real-time satellite position data</p> | |
| </div> | |
| <span class="bg-blue-500 text-blue-900 text-xs px-2 py-1 rounded">GET</span> | |
| </div> | |
| <div class="mt-4"> | |
| <p class="text-sm mb-2"><span class="font-bold">Parameters:</span></p> | |
| <ul class="text-sm text-gray-300 space-y-1"> | |
| <li>- <span class="font-mono">limit</span> (integer, optional): Number of results (default: 100)</li> | |
| <li>- <span class="font-mono">constellation</span> (string, optional): Filter by constellation (e.g., Starlink, GPS)</li> | |
| </ul> | |
| </div> | |
| <div class="mt-4"> | |
| <p class="text-sm mb-2"><span class="font-bold">Response:</span></p> | |
| <pre class="bg-gray-900 p-3 rounded text-sm overflow-x-auto">{ | |
| "satellites": [ | |
| { | |
| "id": "STARLINK-4521", | |
| "position": { | |
| "lat": 40.7128, | |
| "lng": -74.0060, | |
| "alt": 550000 | |
| }, | |
| "velocity": 7.8, | |
| "timestamp": "2023-06-15T14:30:00Z" | |
| } | |
| ] | |
| }</pre> | |
| </div> | |
| </div> | |
| <!-- Endpoint 2 --> | |
| <div class="border border-gray-700 rounded-lg p-4"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <h4 class="font-bold text-lg">GET /api/v1/debris</h4> | |
| <p class="text-gray-400">Retrieve space debris tracking data</p> | |
| </div> | |
| <span class="bg-blue-500 text-blue-900 text-xs px-2 py-1 rounded">GET</span> | |
| </div> | |
| <div class="mt-4"> | |
| <p class="text-sm mb-2"><span class="font-bold">Parameters:</span></p> | |
| <ul class="text-sm text-gray-300 space-y-1"> | |
| <li>- <span class="font-mono">limit</span> (integer, optional): Number of results (default: 100)</li> | |
| <li>- <span class="font-mono">risk_level</span> (string, optional): Filter by risk (low, medium, high)</li> | |
| </ul> | |
| </div> | |
| <div class="mt-4"> | |
| <p class="text-sm mb-2"><span class="font-bold">Response:</span></p> | |
| <pre class="bg-gray-900 p-3 rounded text-sm overflow-x-auto">{ | |
| "debris": [ | |
| { | |
| "id": "DEBRIS-8873", | |
| "position": { | |
| "lat": 34.0522, | |
| "lng": -118.2437, | |
| "alt": 850000 | |
| }, | |
| "risk_level": "high", | |
| "timestamp": "2023-06-15T14:25:00Z" | |
| } | |
| ] | |
| }</pre> | |
| </div> | |
| </div> | |
| <!-- Endpoint 3 --> | |
| <div class="border border-gray-700 rounded-lg p-4"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <h4 class="font-bold text-lg">GET /api/v1/alerts</h4> | |
| <p class="text-gray-400">Retrieve predictive collision and anomaly alerts</p> | |
| </div> | |
| <span class="bg-blue-500 text-blue-900 text-xs px-2 py-1 rounded">GET</span> | |
| </div> | |
| <div class="mt-4"> | |
| <p class="text-sm mb-2"><span class="font-bold">Parameters:</span></p> | |
| <ul class="text-sm text-gray-300 space-y-1"> | |
| <li>- <span class="font-mono">limit</span> (integer, optional): Number of results (default: 50)</li> | |
| <li>- <span class="font-mono">type</span> (string, optional): Alert type (collision, anomaly, debris)</li> | |
| </ul> | |
| </div> | |
| <div class="mt-4"> | |
| <p class="text-sm mb-2"><span class="font-bold">Response:</span></p> | |
| <pre class="bg-gray-900 p-3 rounded text-sm overflow-x-auto">{ | |
| "alerts": [ | |
| { | |
| "id": "ALERT-20230615-001", | |
| "type": "collision", | |
| "satellite_a": "STARLINK-4521", | |
| "satellite_b": "DEBRIS-8873", | |
| "probability": 0.92, | |
| "timestamp": "2023-06-15T15:45:00Z", | |
| "risk_level": "critical" | |
| } | |
| ] | |
| }</pre> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- SDK Integration --> | |
| <div class="bg-gray-800 rounded-lg p-6"> | |
| <h3 class="text-xl font-bold mb-4">SDK Integration</h3> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> | |
| <div> | |
| <h4 class="font-bold mb-2">Python SDK</h4> | |
| <pre class="bg-gray-900 p-4 rounded text-sm overflow-x-auto">from orbitai import OrbitAIClient | |
| client = OrbitAIClient(api_key="YOUR_API_KEY") | |
| # Get satellite positions | |
| satellites = client.get_satellites(limit=50) | |
| # Get debris data | |
| debris = client.get_debris(risk_level="high") | |
| # Get alerts | |
| alerts = client.get_alerts(type="collision")</pre> | |
| <button class="mt-3 bg-gray-700 hover:bg-gray-600 text-white px-4 py-2 rounded text-sm"> | |
| <i class="fas fa-copy mr-2"></i>Copy to Clipboard | |
| </button> | |
| </div> | |
| <div> | |
| <h4 class="font-bold mb-2">Node.js SDK</h4> | |
| <pre class="bg-gray-900 p-4 rounded text-sm overflow-x-auto">const OrbitAI = require('orbitai-sdk'); | |
| const client = new OrbitAI.Client({ | |
| apiKey: 'YOUR_API_KEY' | |
| }); | |
| // Get satellite positions | |
| const satellites = await client.getSatellites({ limit: 50 }); | |
| // Get debris data | |
| const debris = await client.getDebris({ riskLevel: 'high' }); | |
| // Get alerts | |
| const alerts = await client.getAlerts({ type: 'collision' });</pre> | |
| <button class="mt-3 bg-gray-700 hover:bg-gray-600 text-white px-4 py-2 rounded text-sm"> | |
| <i class="fas fa-copy mr-2"></i>Copy to Clipboard | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </body> | |
| </html> | |