Spaces:
Paused
Paused
Download src/app/api/api-docs/route.ts from GraziePrego/deepresearch: direct link, hf CLI and curl.
- Browser
- Download file 652 Bytes
-
https://huggingface.co/spaces/GraziePrego/deepresearch/resolve/main/src/app/api/api-docs/route.ts
- Command line
-
hf download hf://spaces/GraziePrego/deepresearch/src/app/api/api-docs/route.ts
-
curl -L -o route.ts https://huggingface.co/spaces/GraziePrego/deepresearch/resolve/main/src/app/api/api-docs/route.ts
652 Bytes
| import { NextResponse } from 'next/server'; | |
| export async function GET() { | |
| return NextResponse.json({ | |
| endpoints: [ | |
| { | |
| method: "GET", | |
| path: "/health", | |
| purpose: "Returns HTTP 200 when the app is ready. Required for Hugging Face to transition the Space from starting to running.", | |
| request: {}, | |
| response: { | |
| status: "ok" | |
| } | |
| }, | |
| { | |
| method: "GET", | |
| path: "/api-docs", | |
| purpose: "Documents all available API endpoints.", | |
| request: {}, | |
| response: { | |
| endpoints: "Array of endpoint objects" | |
| } | |
| } | |
| ] | |
| }, { status: 200 }); | |
| } | |