mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 15:05:49 +03:00
[GH-ISSUE #844] Get by slug #593
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#593
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 @scheibling on GitHub (Jun 16, 2023).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/844
With it now being possible to create a check with a specific slug instead of auto-generating it, it would be really helpful to have a get endpoint in the v3 API that supports accessing a specific slug.
Just saw that the auto-provisioning is now enabled which is nice as well, we're currently creating checks via the API if it doesn't exist and are using the Tag-field as a unique "external" identifier (which means list -> get first result), the by-slug endpoint would be a much better solution
@cuu508 commented on GitHub (Jun 16, 2023):
Slugs are not guaranteed to be unique, so a "get by slug" call could have 0, 1 or N matches.
The "List Existing Checks" API call currently supports filtering by tag:
We could add an option to filter by slug as well:
Would that help?
Yep! But, note, this change has not yet been deployed to the hosted service.
@scheibling commented on GitHub (Jun 16, 2023):
The slug is unique per project though, right?
I opened a pull request with an example, feel free to have a look at it and push it in if you want, I'm gonna try it out locally on our instance since it saves us a couple of requests for some of our checks.
@cuu508 commented on GitHub (Jun 27, 2023):
No, there is no uniqueness constraint for slugs even within a single project. Multiple checks can have the same slug, and a check can have an empty slug.
I just pushed a commit which adds filtering by slug to the "List Checks" call: