-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/rest endpoint fires #183
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
088eb48
to
0bf8c6c
Compare
Deployment failed with the following error:
|
Versioning & GeoJSON return Api versioning introduced (path /v1, /v2). Fires are returned as GeoJSON. handling query parameter span fixed output format file moved, removes /rest segment accounted for remoteIds & CORS.
f4b2e05
to
fc67b97
Compare
4065c0b
to
0e35837
Compare
Caching setting by environment variables Caching env variable
9860857
to
98b7954
Compare
apps/server/src/env.mjs
Outdated
@@ -38,7 +38,8 @@ const server = z.object({ | |||
CRON_KEY: z.string().optional(), | |||
NEXT_PUBLIC_LOGTAIL_SOURCE_TOKEN: z.string().optional(), | |||
WHATSAPP_ENDPOINT_URL: z.string(), | |||
WHATSAPP_ENDPOINT_AUTH_TOKEN: z.string() | |||
WHATSAPP_ENDPOINT_AUTH_TOKEN: z.string(), | |||
PUBLIC_API_CACHING: z.string().optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not z.boolean()?
Should plan for abstraction of api if we add more in future, but looks good.
|
Will do the env schema change. But do you think the abstraction can go in separate PR, so this can be tested in integration. |
Rest api endpoint for fires by remoteId or siteId is created. This lists fires for the sites for last 7 Days (default span).
endpoint at
/api/v1/fires
.Browser & CDN Caching for a 2 Hours, with SWR (
stale-while-revalidation
) for 2 Hours.Fires data is returned in GeoJSON.
Authorisation is not needed since it is Public API.
Following is a screenshot for Data & Output
@sagararyal