File size: 13,740 Bytes
de608f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
077e211
 
 
 
de608f0
 
077e211
de608f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d6fe2b7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<!DOCTYPE html>
<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>