mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 15:05:49 +03:00
[GH-ISSUE #1127] Create an itegration using the API #781
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#781
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 @youpie on GitHub (Feb 19, 2025).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/1127
Hello,
I am writing an application and want to be able to inform the user if their specific instance is down. For this I assume I need to create an integration for every check. But I don't see a possibility to create an integration using the API. Is there a way to achieve it, or do I need to create a new integration in the UI every time? (I just need an email integration)
@cuu508 commented on GitHub (Feb 19, 2025):
You don't need a separate integration for every check. You can have a single email integration, and associate it with every check.
In the Create a Check API call, if you pass in a field
"channels": "*", Healthchecks will automatically assign all existing integrations to it.@youpie commented on GitHub (Feb 19, 2025):
I need every check to go to a different email adres, the one of the user associated with that check
@cuu508 commented on GitHub (Feb 26, 2025):
Ah I see. Can you describe your use case a little more? How many users are you working with?
In general though, I'm currently not planning to add API support for creating integrations:
@youpie commented on GitHub (Feb 27, 2025):
@cuu508 I have an application. That periodically logs into a website and gets some data for it. Every user is its own application instance which is periodically ran through a cronjob. I have multiple users, and i want every user to be informed when their instance is down. So I need a way to create a check for every user, and an email integration for every check with a unique Email address.
I understand the difficulties of using an API for this purpose. Maybe a limited implementation of applications which do not need any sort of interactive elements could work?
@cuu508 commented on GitHub (Feb 27, 2025):
How many users are you working with?
@youpie commented on GitHub (Feb 27, 2025):
Not a lot, slowly increasing but it's incredibly niche. currently about 10 people, but i expect that to increase
@cuu508 commented on GitHub (Mar 21, 2025):
For 10-30 users I would create the integrations by hand.
The easiest way to automate this would be to write a management command which takes a project id and an email address and creates an integration. Adding a new API endpoint would take a little bit more work but is also doable.
I'm not planning to implement this, but it could certainly be done in a fork.