Git Product home page Git Product logo

api-rest's Introduction

The Solar System OpenData

An open Rest API for querying all Solar System data.

https://api.le-systeme-solaire.net

Features

Main bodies

All planets and their moons, all dwarfs planets and the main asteroids.

Physical characteristics

Dimensions, mass, flattening, gravity, inclination and temperature.

Orbital parameters

Semimajor axis, perihelion, aphelion, eccentricity, orbital period and orbital speed.

History

Discovery circumstances, discoverer(s), year discovered and provisional designation.

Family

For every body, all its satellites and the ability to navigate between satellites and the star.

Known objects count

Known count of each object type : planets, moons, asteroids, comets.

Documentation

How to use the API?

All bodies in one request

An URL returns all bodies in the database with all data: https://api.le-systeme-solaire.net/rest/bodies/

Boby by body

An URL returns all data of one body: https://api.le-systeme-solaire.net/rest/bodies/{id}

All known count

An URL returns all known count for each object type : https://api.le-systeme-solaire.net/rest/knowncount/

Known count, object type by object type

An URL returns known count for the object type : https://api.le-systeme-solaire.net/rest/knowncount/{id}

API parameters for /bodies

# Parameter Action
1 data The data you want to retrieve (comma separated).
2 exclude One or more data you want to exclude (comma separated).
3 order The sort order data you want to use and the sort direction (comma separated).
4 page Page number (number>=1) and page size (size>=1 with 20 as default) (comma separated).
5 rowData Transform the objects in records.
6 filter[] Filters to be applied. Each filter consists of a data, an operator and a value (comma separated).
7 satisfy Should all filters match (default).

API parameters /knowncount

# Parameter Action
1 rowData Transform the objects in records.

License

Distributed under MIT license.

api-rest's People

Contributors

khrys63 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

api-rest's Issues

Jupiters moon 'S/2011 J 1' returns invalid JSON

# works
>>> req = cURL.get('https://api.le-systeme-solaire.net/rest/bodies/eirene')

>>> json.loads(req.text)
{'id': 'eirene', 'name': 'Eiréné', 'englishName': 'Eirene', 'isPlanet': False, 'moons': None, 'semimajorAxis': 23493000, 'perihelion': 0, 'aphelion': 0, 'eccentricity': 0.22, 'inclination': 163.1, 'mass': {'massValue': 9.0, 'massExponent': 13}, 'vol': {'volValue': 0.0, 'volExponent': 0}, 'density': 1.0, 'gravity': 0, 'escape': 0, 'meanRadius': 2.0, 'equaRadius': 0, 'polarRadius': 0, 'flattening': 0, 'dimension': '', 'sideralOrbit': 759.7, 'sideralRotation': 0, 'aroundPlanet': {'planet': 'jupiter', 'rel': 'https://api.le-systeme-solaire.net/rest/bodies/jupiter'}, 'discoveredBy': 'Scott S. Sheppard, David C. Jewitt', 'discoveryDate': '2003', 'alternativeName': 'S/2003 J 5', 'axialTilt': 0}

>>> req.text
'{"id":"eirene","name":"Eiréné","englishName":"Eirene","isPlanet":false,"moons":null,"semimajorAxis":23493000,"perihelion":0,"aphelion":0,"eccentricity":0.22000,"inclination":163.10000,"mass":{"massValue":9.00000, "massExponent":13},"vol":{"volValue":0.00000, "volExponent":0},"density":1.00000,"gravity":0,"escape":0,"meanRadius":2.00000,"equaRadius":0,"polarRadius":0,"flattening":0,"dimension":"","sideralOrbit":759.70000,"sideralRotation":0,"aroundPlanet":{"planet":"jupiter", "rel":"https://api.le-systeme-solaire.net/rest/bodies/jupiter"},"discoveredBy":"Scott S. Sheppard, David C. Jewitt","discoveryDate":"2003","alternativeName":"S/2003 J 5","axialTilt":0}'

# fails
>>> req = cURL.get('https://api.le-systeme-solaire.net/rest/bodies/s2011j1')

>>> req.text
'{"id":"s2011j1","name":"S/2011 J 1","englishName":"S/2011 J 1","isPlanet":false,"moons":null,"semimajorAxis":20 155 290,"perihelion":0,"aphelion":0,"eccentricity":0.29600,"inclination":162.80000,"mass":{"massValue":2.40000, "massExponent":16},"vol":{"volValue":0.00000, "volExponent":0},"density":1.00000,"gravity":0,"escape":0,"meanRadius":0.50000,"equaRadius":0,"polarRadius":0,"flattening":0,"dimension":"","sideralOrbit":580.70000,"sideralRotation":0,"aroundPlanet":{"planet":"jupiter", "rel":"https://api.le-systeme-solaire.net/rest/bodies/jupiter"},"discoveredBy":"Scott S. Sheppard","discoveryDate":"29/01/2012","alternativeName":"S/2011 J 1","axialTilt":0}'

>>> json.loads(req.text)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Applications/Blender.app/Contents/Resources/2.81/python/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/Applications/Blender.app/Contents/Resources/2.81/python/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Applications/Blender.app/Contents/Resources/2.81/python/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 113 (char 112)

The semimajorAxis values are not properly quoted "semimajorAxis":20 155 290

i checked around bodies.php, but it looks right, could the data source possibly have an errant entry?

Some field-related issues I spotted

NEOWISE is missing an englishName. Should be C/2020 F3 (NEOWISE)"
https://api.le-systeme-solaire.net/rest/bodies/c2020f3-neowise

Junon's englishName should be 3 Juno.
https://api.le-systeme-solaire.net/rest/bodies/junon

Venus, Uranus and Pluto have negative numbers as their sideralRotation, but I'm unsure if this is intentional.
https://api.le-systeme-solaire.net/rest/bodies/venus
https://api.le-systeme-solaire.net/rest/bodies/uranus
https://api.le-systeme-solaire.net/rest/bodies/pluton

Add images to every planet/moon

Really awesome API! Love the data. There is only one thing i'm missing. It would be nice to have images of every object. In an ideal world there would be a transparent png and jpeg.

Syntax error in Saturn's moon

Hi,
In S2004S41 Saturn's moon, property axialTilt has no value (not even null or blank string), so JSON is "axialTilt":,. This causes a syntax error.

Cheers,

Alex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.