Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/KingPsychopath/oooc-fete-finder/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The revalidation endpoint allows you to manually trigger a refresh of cached event data. This is useful after deploying data updates or when you need to force a cache invalidation.

Authentication

This endpoint requires authentication using the DEPLOY_REVALIDATE_SECRET environment variable.
The endpoint returns a 503 Service Unavailable status if DEPLOY_REVALIDATE_SECRET is not configured.

Endpoint

Trigger revalidation

curl -X POST https://your-domain.com/api/revalidate/deploy \
  -H "Authorization: Bearer YOUR_DEPLOY_REVALIDATE_SECRET"
Path: /api/revalidate/deploy Methods: GET, POST Headers:
Authorization
string
required
Bearer token containing the DEPLOY_REVALIDATE_SECRET value.Format: Bearer YOUR_DEPLOY_REVALIDATE_SECRET
x-revalidate-secret
string
Alternative to Authorization header. Provide the secret directly without “Bearer” prefix.
The endpoint accepts the secret via either the Authorization header (with “Bearer” prefix) or the x-revalidate-secret header.

Response

Success response

{
  "success": true,
  "message": "Events data refreshed successfully",
  "count": 42,
  "source": "live"
}
success
boolean
required
Indicates whether the revalidation was successful.
message
string
required
Human-readable description of the result.
count
number
required
Number of events loaded after revalidation.
source
string
required
Data source used for refresh (e.g., “live”, “backup”).

Error responses

{
  "success": false,
  "error": "Unauthorized"
}
success
boolean
required
Always false for error responses.
error
string
required
Error message describing what went wrong.
message
string
Additional context about the error (for 500 errors).

Status codes

CodeDescription
200Revalidation successful
401Missing or invalid authentication secret
500Internal server error during data refresh
503DEPLOY_REVALIDATE_SECRET not configured

Implementation details

The endpoint:
  1. Validates the provided secret against DEPLOY_REVALIDATE_SECRET
  2. Calls forceRefreshEventsData() to reload event data
  3. Returns the refresh result with event count and data source
  4. Sets no-cache headers to prevent response caching
See implementation: app/api/revalidate/deploy/route.ts:21