umami icon indicating copy to clipboard operation
umami copied to clipboard

API Endpoints not available in Cloud (self hosted they fine)

Open ceviixx opened this issue 7 months ago • 5 comments

Describe the Bug

There is a collection of endpoints, wich working on self hosted version but not in cloud.

Not working:

/reports/attribution
{"error":"Not Found: reports/attribution"}
/reports/insights 
{"error":"Not Found: reports/insights"}
/reports/revenue?websiteId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&startDate=Thu May 01 2025 00:00:00 GMT+0200 (Central European Summer Time)&endDate=Sat May 31 2025 23:59:59 GMT+0200 (Central European Summer Time)
{"error":"Not Found: reports/revenue"}

Working with different configurations:

/reports/retention **( cloud needs timezone, selfhosted not )**
/reports/revenue **( cloud needs timezone, selfhosted not )**

Working:

  • /reports/journey
  • /reports/funnel
  • /reports/goals
  • /reports/utm

Also for the session some routes not working:

/v1/websites/:websiteId/sessions/weekly?startAt=1746050400000?endAt=1748728799000?unit=day?timezone=Europe/Berlin
{"error":"Not Found: websites/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/sessions/weekly"}

In the self hosted version all of the endpoints working as expected!

Database

Umami Cloud

Relevant log output


Which Umami version are you using? (if relevant)

No response

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

ceviixx avatar May 25 '25 08:05 ceviixx

Seems the complete Cloud API is not really safe.

/websites Request:

curl -X POST https://api.umami.is/v1/websites \
  -H "x-umami-api-key: {API_KEY}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"name": "Test", "domain": "example.com"}'

This should be the default request / response.

Response:

{
  "id":"xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name":"Test",
  "domain":"example.com",
  "shareId":null,
  "resetAt":null,
  "userId":"xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "teamId":null,
  "createdBy":"xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "createdAt":"2025-05-25T18:15:42.375Z",
  "updatedAt":"2025-05-25T18:15:42.375Z",
  "deletedAt":null
}

But sometimes there is this issue with the same request with status code 401

curl -X POST https://api.umami.is/v1/websites \
  -H "x-umami-api-key:  {API_KEY}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"name": "Test", "domain": "example.com"}'
**Website limit reached.**

It looks like "random" response. I have reached the limit (Hobby with 3 pages), sometimes I can create additional websites. Can you may also look into this or is there an restriction?

ceviixx avatar May 25 '25 18:05 ceviixx

May you can check all the api endpoints for cloud. Thanks @mikecao

ceviixx avatar May 25 '25 18:05 ceviixx

Can you try now?

mikecao avatar May 31 '25 06:05 mikecao

@mikecao reports and /weekly now working

But can you check the following route for loading available currencies? This continues not working on cloud.

/reports/revenue?websiteId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&startDate=Thu May 01 2025 00:00:00 GMT+0200 (Central European Summer Time)&endDate=Sat May 31 2025 23:59:59 GMT+0200 (Central European Summer Time) {"error":"Not Found: reports/revenue"}

ceviixx avatar May 31 '25 10:05 ceviixx

May it's possible to change the date format? Every request ist with 'the number of seconds since' but only this route is really with an date

ceviixx avatar Jun 03 '25 08:06 ceviixx