umami-software / api-client

API client for Umami Analytics
MIT License
14 stars 11 forks source link

Website stats endpoint returns 500 error #2

Closed paulpopus closed 1 year ago

paulpopus commented 1 year ago

Making a call to this endpoint getWebsiteStats returns error code 500

const { data } = await client().getWebsiteStats(websiteId, {
    startAt: 1685566800000,
    endAt: 1686916052440,
  });

The same endpoint directly via the REST API works just fine though:

curl --request GET \
  --url https://api.umami.is/v1/websites/<website id>/stats \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --header 'x-umami-api-key: <api key>' \
  --data startAt=1685566800000 \
  --data endAt=1686916052440

I messaged on discord as well, so you can DM me there if you need my exact website ID for debugging!