API Base URL: https://solar-system-hackathon-backend.herokuapp.com
Solar System API
Developed for the #DearJrDev Quackathon, Week of March 24th, 2023
API Details
All Stellar Bodies
Endpoint: GET /stellar
Returns the following details:
{ star: [ { "star_id": string, "englishName": string, "meanRadius": int, mean radius distance in km, }], planets: [{ "planet_id": string, "englishName": string, "meanRadius": float, mean radius in km, "bodyType": enum, "Planet" || "Dwarf Planet", "planetType": enum, "Terrestrial" || "Gas Giant" || "Ice Giant" || "Dwarf", "star_id": "sol" <- this will always be sol, as we only have the one star },], moons: [{ "moon_id": string, "englishName": string, "meanRadius": float, mean radius in km "planet_id": string, the planet this moon orbits }] }
Star
Endpoint: GET /stellar/star
Returns an object containing the following data about STAR:
{ "star_id": string, "englishName": string, "massValue": value in 10^n kg, "massExponent": n value for massValue, "meanRadius": int, mean radius distance in km, }
Planets
Endpoint: GET /stellar/planets
Returns an array of all planet objects containing the following details for each:
[{ "planet_id": string, the id of the planet, "englishName": string, the name of the planet, "meanRadius": float, radius in km, "bodyType": enum, "Dwarf Planet" || "Planet", "planetType": enum, "Terrestrial" || "Gas Giant" || "Ice Giant" || "Dwarf", "star_id": "sol", <- this will always be 'Sol', as we only have one star }]
Endpoint: GET /stellar/planets/dwarf
As above, but returns an array of all DWARF PLANET objects
Endpoint: GET /stellar/planets/planet
As above, but returns an array of all PLANET objects
Endpoint: GET /stellar/planet/:planet_id
Returns an object with all available details for the specified planet_id.
{ "planet_id": "eris", "englishName": "136199 Eris", "perihelion": furthest distance from the sun in km, "aphelion": neraest distance from the sun in km, "inclination": float, angle in degress of the orbit compared to earths, "massValue": value in 10^n kg, "massExponent": n value for massValue, "gravity": float, gravity measured in m/s^2 "meanRadius": float, mean radius in km, "sideralRotation": float, time to rotate fully, in hours, "sideralOrbit": float, time to orbit the sun in days, "discoveredBy": string, the name(s) of this planets discoverers "discoveryDate": string, the date of this planets discovery "bodyType": enum (returns as string), "Planet" || "Dwarf Planet", "planetType": enum, "Terrestrial" || "Gas Giant" || "Ice Giant" || "Dwarf", "star_id": "sol" <- this will always be sol, as we only have the one star }
Moons
Endpoint: GET /stellar/moons
Returns an array containing the following data about each MOON
[{ "moon_id": string, "englishName": string, "meanRadius": int, mean radius distance in km, "planet_id": string, the planet this moon orbits. },]
Endpoint: GET /stellar/moons/:planet_id
Returns an array containing data as above for each MOON orbitting the specified :planet_id
Endpoint: GET /stellar/moon/:moon_id
Returns an object containing all data for the specified :moon_id
"moon_id": string, the of the moon, "englishName": string, the name of the moon "nameDetail": string, the details about the name of the moon, "perihelion": furthest distance from the planet in km, "aphelion": nearest distance from the planet in km, "inclination": float, angle in degress of the orbit compared to planets equator, "massValue": value in 10^n kg, "massExponent": n value for massValue, "gravity": float, gravity measured in m/s^2 "meanRadius": float, mean radius in km, "sideralRotation": float, time to rotate fully, in hours, "sideralOrbit": float, time to orbit the sun in days, "planet_id": string, the planet_id of the planet this moon orbits, "planetEnglishName": string, the english name of the planet this moon orbits, "discoveredBy": string, the name(s) of this moons discoverers, "discoveryDate": string, the date the moon was discovered, "bodyType": "Moon" <- will always be 'Moon'