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://api.astro-otter.space/v1/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://api.astro-otter.space/v1/auth/login. This generates another JWT with another Refresh Token.

Get object by Id :

              curl  -X GET -H 'Authorization: Bearer YOUR-TOKEN' https://api.astro-otter.space/v1/dso/item/M31

Get objets with many parameters

              curl  -X GET -H 'Authorization: Bearer YOUR-TOKEN' https://api.astro-otter.space/v1/dso/list?catalog=messier&constellation=Ori&offset=5&limit=5