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

Private groups/services are not listed via API #69

Open
ThelloD opened this issue Nov 6, 2021 · 4 comments · May be fixed by #70
Open

Private groups/services are not listed via API #69

ThelloD opened this issue Nov 6, 2021 · 4 comments · May be fixed by #70
Labels
Bug Something isn't working

Comments

@ThelloD
Copy link

ThelloD commented Nov 6, 2021

Just switched from statping to statping-ng since development seems to be stalled in the original repository.
Copy/Pasting the issue of @thatInfrastructureGuy from statping#892 since the behavior hasn't changed in statping-ng.


Describe the bug

When retrieving list of groups/services via authenticated API endpoint, I can only see public groups/services. Private groups/services don't show up.

curl --location --request GET '{{endpoint}}/api/groups'

Use bearer token: {{api_key}}

However, I can view the private service/group, if I know the id:

curl --location --request GET '{{endpoint}}/api/groups/1' \
--header 'Content-Type: application/json'

Use bearer token: {{api_key}}

Probably Related: statping#836

To Reproduce

Steps to reproduce the behavior:

  1. Create a private and public group. Set up a API Key.
  2. Hit list groups endpoint with correct API Key. You should see only public group.
  3. Get the private group id from database or UI. Hit view group endpoint with correct API Key. You should see private group details.

Expected behavior

If I am authenticated via API Key, I expect to see all services and groups (public and private) when I LIST them.

@adamboutcher adamboutcher added the Bug Something isn't working label Nov 6, 2021
@adamboutcher
Copy link
Collaborator

Thanks, hopefully we (or someone) will fix this.

We're only a small team of non-go developers, we forked it to basically get fixes pushed into a single place for everyone's benefit.

@embedvr embedvr linked a pull request Nov 9, 2021 that will close this issue
@Kovah
Copy link

Kovah commented Jan 27, 2023

I just experienced the same issue with services. In the frontend, when logged in as a user, I could see all private services. But the API returned no entries. Added the cookie to the API request and then all private services showed up.

Kovah added a commit to Kovah/statping-ng that referenced this issue Jan 30, 2023
@jirsbek
Copy link

jirsbek commented Feb 6, 2023

Having the same issue I've temporarely set services to public 😕.

@adamboutcher
Copy link
Collaborator

Hopefully this PR will resolve this. #210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants