Skip to content

Add a status field to /api response #6

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jake-low
Copy link
Contributor

@jake-low jake-low commented Mar 3, 2025

This adds a Status field to the JSON response of the root GET /api endpoint. The status is either "ok" or "warn" (an "error" would be if the endpoint wasn't reachable at all). Right now the status is warn if the last updated timestamp on the OSMX file is > 15 minutes ago, and ok otherwise. We can add additional checks later if we want.

The intent of this field is that we can set up the OSM US status page (which uses a third-party service, updown.io) to GET /api and grep for "Status": "ok" in the response. If it doesn't find that string it can show the service as degraded in the dashboard, send us emails, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant