mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 15:05:49 +03:00
[GH-ISSUE #552] Get project badges #402
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#402
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rodskin on GitHub (Aug 12, 2021).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/552
Hi everyone, is there a way to get a list of project badges?
I can add my badge with:
like https://myhealthcheck.local/badge/{UUID}/{RAND}/mybadge.svg
But can't find a way to get a list of all badges available.
Thanks for reading :)
@cuu508 commented on GitHub (Aug 12, 2021):
Hi @rodskin, are you looking for a way to get the list of badges via API?
@rodskin commented on GitHub (Aug 12, 2021):
Hi @cuu508 , indeed I am looking for a way to get my badge list via API
@cuu508 commented on GitHub (Aug 12, 2021):
Currently there isn't an API call for that. It's possible to add but first I'd like to know more about the use case. Are you building a custom dashboard?
@rodskin commented on GitHub (Aug 12, 2021):
I am making a builder that automatically creates my healthcheck project with specific tags on my server.
I then want to be able to get my badge {MY_APP_NAME} to be visible in my gitlab repository. Problem is I can't retreive the {RANDOM} string in the URL :(
@rodskin commented on GitHub (Aug 12, 2021):
(woops missclick)
@cuu508 commented on GitHub (Aug 12, 2021):
OK, the builder would
Something like that?
Would you be doing this often? i.e., are we talking 1-5 projects, or potentially dozens and more? (depending on the number, it may or may not make sense to automate)
@rodskin commented on GitHub (Aug 12, 2021):
Absolutely, this is the purpose.
I will have ao auto build around 100 projects and more are coming...
If it would have been 1-5 projects I know I could use the link given in my healthcheck BO but it would really be helpful to be able to get the badge url programmatically :)
@cuu508 commented on GitHub (Aug 18, 2021):
@rodskin I just pushed an experimental first implementation.
API endpoint:
/api/v1/badges/Example response body:
API documentation is barebones at the moment and needs more work, but I wanted to get this out to see if it solves your use case.
The SVG, JSON and Shields.io URLs each has a regular and a "3" variation. The regular badges report only "up" or "down" states ("late" is reported as "up"). The svg3, json3 and shields3 report three states: "up", "late", "down".