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

Alerting: Contact Points Swagger API doesn't match call #76386

Closed
safaci2000 opened this issue Oct 11, 2023 · 1 comment
Closed

Alerting: Contact Points Swagger API doesn't match call #76386

safaci2000 opened this issue Oct 11, 2023 · 1 comment

Comments

@safaci2000
Copy link

What happened?

When I load the swagger API and try to call the contact points API, the generated URL doesn't match the actual endpoint.

The endpoint generated by the swagger UI (to remove any variables) is shown below.

curl -X 'GET' \
  'http://localhost:3000/api/api/v1/provisioning/contact-points' \
  -H 'accept: application/json'

For reference:

INFO[0000] Version: 10.0.0
INFO[0000] Database: ok
INFO[0000] Commit: 81d85ce

What did you expect to happen?

the current URL is: http://localhost:3000/api/api/v1/provisioning/contact-points
The correct URL is: http://localhost:3000/api/v1/provisioning/contact-points

Did this work before?

Probably not?

How do we reproduce it?

  1. run a grafana instance
  2. point to the all swagger spec using any swagger-ui tool or extension. Loading: http://localhost:3000/public/api-merged.json
  3. Add your basic auth
  4. Attempt to invoke the endpoint and notice how the URL doesn't match.

Side note, a local curl call without the additional /api/ works fine.

Is the bug inside a dashboard panel?

No.

Environment (with versions)?

Grafana: 10.0.0
OS: Docker container/linux
Browser: Chrome

Grafana platform?

Docker

Datasource(s)?

No response

@nikimanoledaki
Copy link
Contributor

Thank you @safaci2000 for raising this! 🙌 🎉
Closing this to keep #76578 since that has a bit more info!

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

2 participants