Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.
ReferenceAPI ReferenceAPI RoutesAPIV1Eventsapp/api/v1/events/route

web


web / app/api/v1/events/route

app/api/v1/events/route

This file defines the API route for fetching a list of events.

It provides a flexible endpoint that allows clients to retrieve events based on a variety of filters, including catalog, datasets, geographic bounds, and date ranges. The handler uses the canonical filter pipeline to build a Payload CMS Where clause, with access control enforced both through the filter model and Payload’s built-in access control.

Variables

GET

const GET: (req, context) => Promise<Response>

Parameters

req

NextRequest

context
params

Promise<Record<string, string>>

Returns

Promise<Response>

Functions

transformEvent()

transformEvent(event): object

Parameters

event

Event

Returns

object

id

id: number

dataset

dataset: object

dataset.id

id: number

dataset.name?

optional name?: string

dataset.catalog?

optional catalog?: string

data

data: Record<string, unknown>

location

location: { longitude: number; latitude: number; } | null

eventTimestamp

eventTimestamp: string

isValid

isValid: boolean

Last updated on