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.

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
FilterValue
messierMessier
ngcNew General Catalog
icIndex Catalog
shSharpless
agcAbell catalog of galaxies clusters
ablAbell Catalog of Planetary Nebulae
ldnLynds of Dark Nebulae
lbnLynds of Bright Nebulae
3cThird Cambridge Catalogue of Radio Sources
arpArp
amArp-Madore
antAntalova
bB
barBarkhatova
bslBasel
berBerkeley
biuBiurakan
bocBochum
crCollinder
cldCaldwell
cedCederblad
czCzernick
ddoDavid Dunlap Observatory
docDo
dodzDolidze-Dzimselejvil
esoESO
fleFleming
gumGum
hbHubble
hfHoffleit
hafHaffner
harHaro
henHenize
hvdHarvard
hicHickson
hcgHickson compact group
hodHodge
hogHogg
holHolmberg
hucHumason
kK
kinKing
latLatysev
lodLoden
lonLongmore
lynLynga
marcatalog.mar
mayMayer
melMelotte
mkwMinkowski
mzlMenzel
mrkMarkarian
oclOCL
palPal - Palomar
pmbPeimbert
perPerek catalog
pisPismis
rcwRCW
rslRoslung
ruRuprecht
sastSanduleak-Stephenson
shaShapley
shkShakhbazian
slSandqvist-Lindroos
stdrStrottner-Drechsler
stoStock open clusters
terTerzan
tonTonantzintla
trTrumpler
ugcUppsala General Catalog
vdbVan den Bergh
vvVorontsov-Vel’yaminov
vyVyssotsky
unassignedUnassigned

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
FilterValue

Get objects filtered by type :

              curl  -X GET -H 'Authorization: Bearer YOUR-TOKEN' https://astro-otter.space/api/dso/by_type/pn
            
List filters
FilterValue
ggGalaxy cluster
gGeneric galaxy
sSpiral galaxy
s0Lenticular galaxy
sdDwarf galaxy
eElliptical galaxy
iIrregular galaxy
ocOpen cluster
gcGlobular cluster
enEmission nebula
bnGeneric bright nebula
bpnBipolar nebula
sfrStarforming Nebula (with open cluster)
rnReflection nebula
pnPlanetary nebula
snrSupernova remnant
dnDark nebula grey
posAsterism
scStar clusters
vnVariable nebula
gaRing galaxy
qQuasar

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