-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
API functionality #118
Comments
API call for putting monitors on pause/unpause for an xx period would be awesome! |
This comment was marked as spam.
This comment was marked as spam.
GitHub Etiquette
|
Some things, like that which is visible on the status page, are already readily accessible, just undocumented. The creation and deletion of monitors/notifications are some of the things that are not. Thus this realistically sounds like a 2 part task.
|
Another endpoint I'd need is to read the the active incident information |
No, it should not be used in my opinion. It is not the same thing, because these are internal APIs which I expected that it should be called from Uptime Kuma only. I could change API without any notices. |
While I understand that the current calls are expected to be Uptime Kuma only, I really think it should be a single API instead of a public API and an internal API. The biggest reason is that maintaining multiple APIs for the same thing is a real pain. (I have personal experience on this from work. We had internal and external APIs for some products, and about one in 5 feature changes resulted in bugs, as changes were made to one API, but done incorrectly, or not at, all to the other). Having a unified API has some other benefits as well:
I do understand the want to be able to iterate quickly, and change endpoints. This is still possible if the endpoints are versioned: alpha, beta, stable, deprecated etc. and would just require having a system around these changes. Something that should be considered anyways. The biggest downside I can see is that the auth logic gets more complicated to account for the different ways the API is getting accessed. Given most of the work would be needed with separate APIs anyway, its not the worst thing. |
Yes, I see your point. I won't implement two sets of APIs, but as of 1.8.0, I labeled them as "internal APIs" that everyone should not use. In the future, I may re-label them as "public APIs" and documented it in the wiki once it get stable. |
Kuma has changed a lot in the last few months, and will likely keep getting major changes for a while yet. Exposing the APIs now would likely be a pain point for anyone attempting to use them anyway. I think reaching reasonable feature stability is a fair point to expose the apis. (perhaps as a 2.0 feature? Not sure your intended versioning scheme). |
I couldn't find any explicit mentioning of it, so I'd like to add that it would be awesome to use the API with external monitoring tools like Zabbix, Monitoring Plugins (Nagios, Icinga, Check_Mk), ... That way Uptime-Kuma could be used as the external status page to these internal tools. Another side effect would be that Uptime-Kuma automatically gains thousands of more monitoring options without implementing them manually into this project. |
This is a fantastic project, and I'm really interested in integrating Kuma into Home Assistant and other home-network things. I'd like an API for:
@louislam would you be up for choosing a few core APIs that would be public and supported as such? |
This comment was marked as resolved.
This comment was marked as resolved.
is there anything new about this, the discussion function seems to no longer exist? I would like to control the maintenance function via API, as I could update all my services via Ansible. This could be very easily integrated |
Please refer to #3854 our the draft/plan to implement this. Tip In the meantime, you can temporarily rely on an external/third party tool. (Make sure to audit their software, this is not something we have capacity for): |
This comment was marked as duplicate.
This comment was marked as duplicate.
Any update on this? |
Discussed in https://github.com/louislam/uptime-kuma/discussions/96
Originally posted by TheGuyDanish July 12, 2021
I'd love to see the ability to retrieve, update, remove or add monitors via API calls. Maybe using an API key that's tied to the user. In a way that when spinning up a new docker container or doing an automated workflow like Terraform, the new device could be added to the software automatically.
The text was updated successfully, but these errors were encountered: