-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.yaml
392 lines (392 loc) · 11.6 KB
/
api.yaml
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
openapi: 3.0.3
info:
title: NeoWS
version: "1"
description: "NeoWs (Near Earth Object Web Service) is a RESTful web service for near earth Asteroid information. With NeoWs a user can: search for Asteroids based on their closest approach date to Earth, lookup a specific Asteroid with its NASA JPL small body id, as well as browse the overall data-set."
contact:
name: Alexandre Lamberty
url: "http://alexandrelamberty.com"
email: mail@alexandrelamberty.com
license:
name: MIT License
url: "https://opensource.org/licenses/MIT"
servers:
- url: "https://api.nasa.gov/neo/rest/v1"
paths:
/feed:
get:
summary: Feed
tags:
- feed
responses:
"200":
$ref: "#/components/responses/Feed"
operationId: get-feed
parameters:
- $ref: "#/components/parameters/start_date"
- $ref: "#/components/parameters/end_date"
- $ref: "#/components/parameters/api_key"
- $ref: "#/components/parameters/detailed"
description: Retrieve a list of Asteroids based on their closest approach date to Earth
/neo/browse:
get:
summary: Browse
tags:
- browse
responses:
"200":
$ref: "#/components/responses/Browse"
operationId: get-browse
description: Browse the overall Asteroid data-set
parameters:
- $ref: "#/components/parameters/page"
- $ref: "#/components/parameters/size"
- $ref: "#/components/parameters/api_key"
- $ref: "#/components/parameters/detailed"
parameters: []
"/neo/{asteroid_id}":
get:
summary: Lookup
tags:
- lookup
operationId: get-neo
description: Lookup a specific Asteroid based on its NASA JPL small body (SPK-ID) ID
responses:
"200":
$ref: "#/components/responses/Lookup"
parameters:
- $ref: "#/components/parameters/api_key"
parameters:
- $ref: "#/components/parameters/asteroid_id"
components:
schemas:
CloseApproach:
title: Close Approach
type: object
properties:
close_approach_date:
type: string
example: "2015-Sep-07 07:32"
epoch_date_close_approach:
type: object
properties:
kilometers_per_second:
type: string
example: "1.1630843052"
kilometers_per_hour:
type: string
example: "2601.7032823612"
miles_per_hour:
type: string
example: "2601.7032823612"
miss_distance:
type: object
properties:
astronomical:
type: string
example: "0.4981690972"
lunar:
type: string
example: "193.7877788108"
kilometers:
type: string
example: "74525035.840942964"
miles:
type: string
example: "46307709.9545183432"
orbiting_body:
type: string
example: Earth
description: Close Approach
Neo:
title: Neo
type: object
description: Near Earth Object
properties:
links:
type: object
properties:
self:
type: string
example: "http://api.nasa.gov/neo/rest/v1/neo/2440012?api_key=DEMO_KEY"
id:
type: string
example: "2440012"
neo_reference_id:
type: string
example: "2440012"
name:
type: string
example: 440012 (2002 LE27)
name_limited:
type: string
example: Albert
designation:
type: string
example: 2010 PK9
nasa_jpl_url:
type: string
example: "http://ssd.jpl.nasa.gov/sbdb.cgi?sstr=2440012"
format: uri
absolute_magnitude_h:
type: number
example: 19.3
estimated_diameter:
type: object
properties:
kilometers:
type: object
properties:
estimated_diameter_min:
type: number
example: 0.1160259082
estimated_diameter_max:
type: number
example: 0.2594418179
meters:
type: object
properties:
estimated_diameter_min:
type: number
example: 116.0259082094
estimated_diameter_max:
type: number
example: 259.4418179074
miles:
type: object
properties:
estimated_diameter_min:
type: number
example: 0.0720951346
estimated_diameter_max:
type: number
example: 0.1612096218
feet:
type: object
properties:
estimated_diameter_min:
type: number
example: 380.6624406898
estimated_diameter_max:
type: number
example: 851.1870938635
is_potentially_hazardous_asteroid:
type: boolean
close_approach_data:
type: array
items:
$ref: "#/components/schemas/CloseApproach"
orbital_data:
type: object
properties:
orbit_id:
type: string
example: "25"
orbit_determination_date:
type: string
example: "2021-04-15 04:05:04"
format: date-time
first_observation_date:
type: string
example: "2010-08-02"
format: date
last_observation_date:
type: string
example: "2019-08-04"
format: date
data_arc_in_days:
type: number
example: 3289
observations_used:
type: number
example: 102
orbit_uncertainty:
type: string
example: "0"
minimum_orbit_intersection:
type: string
example: ".0163799"
jupiter_tisserand_invariant:
type: string
example: "8.149"
epoch_osculation:
type: string
example: "2459600.5"
eccentricity:
type: string
example: "6758816295966181"
semi_major_axis:
type: string
example: ".6821117765074953"
inclination:
type: string
example: "12.59278240977363"
ascending_node_longitude:
type: string
example: "306.5359724024219"
orbital_period:
type: string
example: "205.7698534440069"
perihelion_distance:
type: string
example: ".2210849574345652"
perihelion_argument:
type: string
example: "195.6313961587518"
aphelion_distance:
type: string
example: "1.143138595580425"
perihelion_time:
type: string
example: "2459654.948176334939"
mean_anomaly:
type: string
example: "264.7414227472738"
mean_motion:
type: string
example: "1.74952741606516"
equinox:
type: string
example: J2000
orbit_class:
type: object
properties:
orbit_class:
type: string
example: ATE
orbit_class_description:
type: string
example: a (semi-major axis) < 1.0 AU; q (perihelion) > 0.983 AU
orbit_class_range:
type: string
example: a (semi-major axis) < 1.0 AU; q (perihelion) > 0.983 AU
is_sentry_object:
type: boolean
parameters:
api_key:
name: api_key
in: query
required: true
schema:
type: string
default: DEMO_KEY
format: string
description: "API key for expanded usage https://api.nasa.gov/#signUp"
start_date:
name: start_date
in: query
required: false
schema:
type: string
format: date
example: "2015-09-07"
description: Starting date for asteroid search
end_date:
name: end_date
in: query
required: false
schema:
type: string
example: "2015-09-08"
format: date
description: "Ending date for asteroid search, 7 days after start_date"
page:
name: page
in: query
required: false
schema:
type: number
example: 1
description: Page number desired
size:
name: size
in: query
required: false
schema:
type: number
example: 20
default: 20
description: Number of retrieved object par page
detailed:
name: detailed
in: query
required: false
schema:
type: boolean
default: false
example: true
description: Detailed orbital information
asteroid_id:
name: asteroid_id
in: path
required: true
schema:
type: number
example: 3542519
description: NASA JPL small body (SPK-ID) ID
responses:
Lookup:
description: Successfull lookup response
content:
application/json:
schema:
$ref: "#/components/schemas/Neo"
examples: {}
Feed:
description: Successfull feed response
content:
application/json:
schema:
type: object
properties:
links:
type: object
properties:
prev:
type: string
example: "http://api.nasa.gov/neo/rest/v1/feed?start_date=2015-09-06&end_date=2015-09-07&detailed=false&api_key=DEMO_KEY"
self:
type: string
example: "http://api.nasa.gov/neo/rest/v1/feed?start_date=2015-09-07&end_date=2015-09-08&detailed=false&api_key=DEMO_KEY"
next:
type: string
example: "http://api.nasa.gov/neo/rest/v1/feed?start_date=2015-09-08&end_date=2015-09-09&detailed=false&api_key=DEMO_KEY"
element_count:
type: string
example: "25"
near_earth_objects:
type: object
properties:
"2022-11-16":
type: array
items:
$ref: "#/components/schemas/Neo"
Browse:
description: Successfull browse response
content:
application/json:
schema:
type: object
properties:
links:
type: object
page:
type: object
properties:
size:
type: number
total_elements:
type: number
number:
type: number
near_earth_objects:
type: array
items:
$ref: "#/components/schemas/Neo"
tags:
- name: browse
description: Browse the overall Asteroid data-set
- name: feed
description: Retrieve a list of Asteroids based on their closest approach date to Earth
- name: lookup
description: Lookup a specific Asteroid based on its NASA JPL small body (SPK-ID) ID