The publish events of the last 7 days, oldest first
GET
/events
const url = 'http://localhost:3000/api/v1/events?limit=500';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:3000/api/v1/events?limit=500'For a site that missed a webhook. Each event carries the cache tags to invalidate. See docs/events.md.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”after
string format: uuid
The id of the last event that the site handled. Without it, the list starts 7 days ago.
limit
integer
Responses
Section titled “Responses”The events after the cursor.
Media typeapplication/json
object
events
required
Array<object>
object
id
required
The same id as the webhook-id header.
string format: uuid
type
required
string
at
required
string format: date-time
collection
required
string | null
documentId
required
string | null
slug
required
string | null
path
required
string | null
previous
required
object
slug
string
path
string
versionId
required
string | null
tags
required
Array<string>
hasMore
required
boolean
Example
{ "events": [ { "type": "document.published" } ]}Headers
Section titled “Headers”Cache-Control
A query parameter is not valid.
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "bad_request"}The cursor is unknown or older than 7 days. Invalidate the tag genga, then read again without after.
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "bad_request"}Too many requests from this address.
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "bad_request"}Headers
Section titled “Headers”Retry-After
integer