API Documentation
"Astro Otter" expose a read-only Rest-full API and offer to you its data. You can use for your own website or application.
You only need a bearer token by register with the form below. The supported response types are only JSON.
You only need a bearer token by register with the form below. The supported response types are only JSON.
Ask for token
List of endpoints
Retrieve token :
curl -X POST -H "Content-Type: application/json" https://astro-otter.space/api/auth/login -d '{"username": "YOUR-USERNAME", "password": "YOUR-PASSWORD"}'
This request return your token and a refresh token. Token is available 1 month. After that, when your JWT valid token expires, if you want to get a new one you can proceed in two ways :
- Send you user credentials again to https://astro-otter.space/api/auth/login. This generates another JWT with another Refresh Token.
- Ask to renew valid JWT with our refresh token. Make a POST call to https://astro-otter.space/api/token/refresh url with refresh token as payload. In this way, you can always get a valid JWT without asking for user credentials. But you must notice if refresh token is still valid. Your refresh token do not change but valid datetime will increase.
curl -X POST -d refresh_token='REFRESH_TOKEN' 'https://astro-otter.space/api/token/refresh'
Get object by Id :
curl -X GET -H 'Authorization: Bearer YOUR-TOKEN' https://astro-otter.space/api/dso/id/M31
Get objects filtered by catalog :
curl -X GET -H 'Authorization: Bearer YOUR-TOKEN' https://astro-otter.space/api/dso/by_catalog/messier
List filters
Filter | Value |
messier | Messier |
ngc | New General Catalog |
ic | Index Catalog |
sh | Sharpless |
agc | Abell catalog of galaxies clusters |
abl | Abell Catalog of Planetary Nebulae |
ldn | Lynds of Dark Nebulae |
lbn | Lynds of Bright Nebulae |
3c | Third Cambridge Catalogue of Radio Sources |
arp | Arp |
am | Arp-Madore |
ant | Antalova |
b | B |
bar | Barkhatova |
bsl | Basel |
ber | Berkeley |
biu | Biurakan |
boc | Bochum |
cr | Collinder |
cld | Caldwell |
ced | Cederblad |
cz | Czernick |
ddo | David Dunlap Observatory |
doc | Do |
dodz | Dolidze-Dzimselejvil |
eso | ESO |
fle | Fleming |
gum | Gum |
hb | Hubble |
hf | Hoffleit |
haf | Haffner |
har | Haro |
hen | Henize |
hvd | Harvard |
hic | Hickson |
hcg | Hickson compact group |
hod | Hodge |
hog | Hogg |
hol | Holmberg |
huc | Humason |
k | K |
kin | King |
lat | Latysev |
lod | Loden |
lon | Longmore |
lyn | Lynga |
mar | catalog.mar |
may | Mayer |
mel | Melotte |
mkw | Minkowski |
mzl | Menzel |
mrk | Markarian |
ocl | OCL |
pal | Pal - Palomar |
pmb | Peimbert |
per | Perek catalog |
pis | Pismis |
rcw | RCW |
rsl | Roslung |
ru | Ruprecht |
sast | Sanduleak-Stephenson |
sha | Shapley |
shk | Shakhbazian |
sl | Sandqvist-Lindroos |
stdr | Strottner-Drechsler |
sto | Stock open clusters |
ter | Terzan |
ton | Tonantzintla |
tr | Trumpler |
ugc | Uppsala General Catalog |
vdb | Van den Bergh |
vv | Vorontsov-Vel’yaminov |
vy | Vyssotsky |
unassigned | Unassigned |
Get objects filtered by constellation Id :
curl -X GET -H 'Authorization: Bearer YOUR-TOKEN' https://astro-otter.space/api/dso/by_constellation/Ori
List filters
Filter | Value |
Get objects filtered by type :
curl -X GET -H 'Authorization: Bearer YOUR-TOKEN' https://astro-otter.space/api/dso/by_type/pn
List filters
Filter | Value |
gg | Galaxy cluster |
g | Generic galaxy |
s | Spiral galaxy |
s0 | Lenticular galaxy |
sd | Dwarf galaxy |
e | Elliptical galaxy |
i | Irregular galaxy |
oc | Open cluster |
gc | Globular cluster |
en | Emission nebula |
bn | Generic bright nebula |
bpn | Bipolar nebula |
sfr | Starforming Nebula (with open cluster) |
rn | Reflection nebula |
pn | Planetary nebula |
snr | Supernova remnant |
dn | Dark nebula grey |
pos | Asterism |
sc | Star clusters |
vn | Variable nebula |
ga | Ring galaxy |
q | Quasar |
Get objets with many parameters
curl -X GET -H 'Authorization: Bearer YOUR-TOKEN' https://astro-otter.space/api/dso/get_objects_by?catalog=messier&constellation=Ori&offset=5&limit=5