Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: GET /api/teams/ returning 405 Method Not Allowed #3195

Open
wahabmangat opened this issue Jan 30, 2025 · 4 comments
Open

Issue: GET /api/teams/ returning 405 Method Not Allowed #3195

wahabmangat opened this issue Jan 30, 2025 · 4 comments

Comments

@wahabmangat
Copy link

Describe the Bug

I am trying to call the following API endpoint: https://api.umami.is/v1/teams/

According to the documentation, the endpoint supports a GET request and provides several optional query parameters (query, page, pageSize, orderBy). However, when I make a request using the GET method, I consistently receive a 405 Method Not Allowed response.

I have tried:

Passing various combinations of optional query parameters (e.g., query, page, pageSize, orderBy).
Calling the endpoint without any parameters.
Ensuring the request is formatted correctly with headers.
Additionally, I came across a prior discussion indicating that some endpoints return 405 instead of 400 Bad Request when certain criteria are not met. Could this be related to what I am experiencing?

Steps to Reproduce:

Make a GET request to https://api.umami.is/v1/teams/.
Observe the response (405 Method Not Allowed).
Expected Behavior: The API should return the list of teams or an appropriate error response such as 400 Bad Request.

Actual Behavior: The API returns a 405 Method Not Allowed response.

Additional Information: Here is a screenshot of the documentation for the /api/teams/ endpoint:

Database

PostgreSQL

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

@wlock6
Copy link

wlock6 commented Feb 1, 2025

@wlock6
Copy link

wlock6 commented Feb 1, 2025

  • [ ]

1 similar comment
@wlock6
Copy link

wlock6 commented Feb 1, 2025

  • [ ]

@d717an
Copy link

d717an commented Feb 7, 2025

Facing a similar issue here. I have a workaround, but it may not apply to you, based on how you have set up your websites. Using my console dev tools, I can see that my server is fetching it based on my user: /api/users/{user_id}/teams. With this approach (using my user_id from my authentication call), I was able to get a list of team ids tied to my authenticated user, then I could use the /api/teams/:teamId/websites endpoint to actually get website metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants