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: Expose an API for external applications to push statuses #229

Open
nioupola opened this issue Dec 30, 2021 · 6 comments
Open

feat: Expose an API for external applications to push statuses #229

nioupola opened this issue Dec 30, 2021 · 6 comments
Labels
area/api Related to the REST API feature New feature or request

Comments

@nioupola
Copy link

Describe the feature request

A API write option to perform adding (first), modify and delete endpoints from curl or requests library.

Why do you personally want this feature to be implemented?

I'm working to integrate gatus in my already setup integration tool you perform automatic configuration (like DNS or folder setup). It should be nice if we can add a new endpoint through the API to avoid modify manually the configuration file.

How long have you been using this project?

almost 6 months

Additional information

No response

@TwiN TwiN added the feature New feature or request label Dec 31, 2021
@TwiN
Copy link
Owner

TwiN commented Jan 4, 2022

This is a duplicate of #95, but considering this PR uses the new issue template, I'm going to close #95 in favor of this.

@TwiN TwiN changed the title API endpoint write option feat: Expose an API for external applications to push statuses Jan 12, 2022
@gp-Airee
Copy link

gp-Airee commented Feb 1, 2022

It really seems like these two issues are asking for something different. One wants to be able to modify the list of endpoints, one wants to do outbound health checks.

@hypervtechnics
Copy link

I also need this heartbeat behaviour. Maybe we can orient at the behaviour in uptime kuma?

@TwiN TwiN added the area/api Related to the REST API label Feb 1, 2023
@ser
Copy link

ser commented Feb 17, 2023

It would be fantastic to have outbound health check, replacing functionality of nagios or (super-heavy-on-resources-because-of-bad-programming-and-technology-choices) uptime-kuma.

@TwiN
Copy link
Owner

TwiN commented Feb 21, 2023

What I'd want to see for this would be:

  1. The ability to configure a token for the admin API:
admin:
  token: "some-token"
  1. An API (e.g. /api/v1/admin/endpoints/statuses) that can be used to create (POST) a new endpoint status using one of the aforementioned token through the Authorization: Bearer <token> header
  2. The ability to mark an endpoint as "self-managed" to prevent the auto-clean system
    // DeleteAllEndpointStatusesNotInKeys removes all EndpointStatus that are not within the keys provided
    //
    // Used to delete endpoints that have been persisted but are no longer part of the configured endpoints
    DeleteAllEndpointStatusesNotInKeys(keys []string) int
    from wiping endpoint statuses that are directly monitored by Gatus. Something like:
endpoints:
  - name: "example"
    self-managed:
      enabled: true

(we need self-managed to be a struct/object here to future-proof this. I know we could just make it self-managed: true, but in the future, we might want to add certain behaviors unique to self-managed endpoints)

I'm open to other suggestions, but this is how I'd probably go about implementing this at the moment.

@truxnell
Copy link

I'm pretty keen on this one too. The ability to have a few applications call an uptime-kuma heartbeat check is the only thing stopping me from replacing UK with gatus!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Related to the REST API feature New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants