AstronomyAPI/Samples

Internal Server Error when calling Positions end point

Closed this issue · 2 comments

I'm receiving a status code 500 when I try to call the bodies/positions end point. Having no issues with the other end points.

I've tried several variations of the parameters with the same effect. I tried omitting one of the required parameters and I received the "parameter required" error back, so I know I'm calling the correct URL.
Here are the params I'm sending:
{
"latitude": 42.3315509,
"longitude": -83.0466403,
"elevation": 0,
"from_date": "2020-12-13",
"to_date": "2020-12-13",
"time": "12:00:00"
}

I'm calling the endpoints in Python but was able to recreate the error using Postman.

Are you doing a GET call or a POST ?
On v2 api this should be a GET call with query params. Sample curl below:

curl --location --request GET 'https://api.astronomyapi.com/api/v2/bodies/positions?latitude=42.3315509&longitude=-83.0466403&elevation=0&from_date=2020-12-13&to_date=2020-12-13&time=12:00:00' \
--header 'Authorization: Basic xxxx' 

closing due to inactivity