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

feat: API endpoint for service count and updates available #436

Closed
PedroBuffon opened this issue Sep 16, 2024 · 6 comments
Closed

feat: API endpoint for service count and updates available #436

PedroBuffon opened this issue Sep 16, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@PedroBuffon
Copy link

Feature request to add an API point for Updates count available and APP count. I`m currently doing a Heimdall Dashboard APP for Argus and as there is no api endpoint for Update counter and APP counter i would need to convert the /metrics to json and program from there.

@PedroBuffon PedroBuffon added the enhancement New feature or request label Sep 16, 2024
@JosephKav
Copy link
Collaborator

Hi,
I don't personally use Heimdall, but I have heard it mentioned a lot and it's nice to see an interest in adding Argus to it.
I could add something like /api/v1/counts that gives

{
  "service_count": 5,
  "updates_available": 3,
  "updates_skipped": 1
}

Would that work for you?

(Haven't got round to adding Auth yet so will just be a simple GET request until I get to that)

@PedroBuffon
Copy link
Author

PedroBuffon commented Sep 16, 2024

So what i was thinking was something like what i did with when i did the Enhanced version of gotify:
image
But changing the values for the ones you put on the json you mentioned

{
  "service_count": 5,
  "updates_available": 3,
  "updates_skipped": 1
}

and having only one endpoint to get those information make everything easier, only one request and that`s it. If that picks your interest, the link for the branch is https://github.com/PedroBuffon/Heimdall-Apps/tree/EnhancedArgus

JosephKav added a commit that referenced this issue Jan 12, 2025
- service_count
- updates_available
- updates_skipped
fixes #436
@JosephKav JosephKav changed the title API adition feat: API endpoint for service count and updates available Jan 12, 2025
JosephKav added a commit that referenced this issue Jan 13, 2025
- service_count
- updates_available
- updates_skipped

fixes #436
JosephKav added a commit that referenced this issue Jan 13, 2025
- service_count
- updates_available
- updates_skipped

fixes #436
@JosephKav
Copy link
Collaborator

I've just added this with 8364209 and will do a release shortly.
/api/v1/counts
gives

{
  "service_count": 5,
  "updates_available": 3,
  "updates_skipped": 1
}

Skipped updates still show as available. So if you had 1 update available but unskipped, it would give

  "updates_available": 1,
  "updates_skipped": 0

and if you then skip that update, it would update to

  "updates_available": 1,
  "updates_skipped": 1

@phampyk
Copy link

phampyk commented Jan 14, 2025

Tested on Homepage and works amazing
Captura de pantalla 2025-01-14 011647

@JosephKav
Copy link
Collaborator

JosephKav commented Jan 14, 2025

Looks very nice, thanks for adding this @PedroBuffon :)

@PedroBuffon
Copy link
Author

I'll update the Heimdall app code when I get home.

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

No branches or pull requests

3 participants