A thin Data Access Layer (DAL) that proxies requests to the Contentstack Content Delivery API. It forwards query parameters to Contentstack and returns responses to callers with minimal reshaping.
- Base URL: https://hc-county-data-stack.netlify.app/
- Authentication: None required
Security note: Top-level index access to the
content_typesandassetsendpoints is blocked (HTTP 403) to prevent bulk data mining.
| Method | Path |
|---|---|
GET |
/api/v1/content_types/:content_type_uid/entries |
GET |
/api/v1/assets/:asset_uid |
Example — fetch entries for the communications_staff content type:
GET /api/v1/content_types/communications_staff/entries
Append asc or desc with the field name:
?asc=email
Pass a query parameter containing a JSON-encoded Contentstack query object:
const encoded = encodeURIComponent(
JSON.stringify({ filter: { $in: ["MRS"] } })
);
// ?query=${encoded}Standard Contentstack pagination parameters are forwarded as-is, e.g. limit and skip.
Responses follow the Contentstack shape with minimal reshaping — e.g. { entries: [...] }. See the Contentstack Content Delivery API docs for full details.
The API proxy enables server-side caching to improve performance. Responses are cached for 1 hour (maxAge: 3600). Two per-request query flags control cache behavior:
bypassCache: when present and truthy, the handler bypasses the cache and fetches fresh data.invalidateCache: when present and truthy, the handler returns data and invalidates any stored cache for that route.
GET /api/v1/<path>— normal cached response.GET /api/v1/<path>?bypassCache=1— bypass cache and return fresh data.GET /api/v1/<path>?invalidateCache=1— return data and invalidate cached entry.
npm install # or pnpm install / yarn install / bun installRuns at http://localhost:3000:
npm run dev # or pnpm dev / yarn dev / bun run devnpm run build # or pnpm build / yarn build / bun run buildnpm run preview # or pnpm preview / yarn preview / bun run previewSee the Nuxt deployment docs for more.