Skip to main content

Interface: RESTEndpoint

Defined in: src/api/types/handlers.ts:175

REST endpoint definition.

Remarks

Defines a REST endpoint with HTTP method, path pattern, and handler.

Properties

auth?

readonly optional auth: AuthRequirement

Defined in: src/api/types/handlers.ts:199

Authentication requirement.


description

readonly description: string

Defined in: src/api/types/handlers.ts:189

Human-readable description for documentation.


handler

readonly handler: RESTHandler

Defined in: src/api/types/handlers.ts:194

Handler function.


method

readonly method: "PUT" | "GET" | "DELETE" | "POST" | "PATCH"

Defined in: src/api/types/handlers.ts:179

HTTP method.


path

readonly path: string

Defined in: src/api/types/handlers.ts:184

URL path pattern (e.g., "/api/v1/preprints/:uri").


rateLimit?

readonly optional rateLimit: RateLimitTier

Defined in: src/api/types/handlers.ts:204

Rate limit tier to apply.