Skip to content

Implement v1 API: versioned, dataset-scoped, standards-compliant backend #403

Description

@tomanizer

Overview

The QueryService API needs to be rebuilt to v1 standards before any external clients are added. This is a greenfield redesign — no backwards compatibility is required since the API is not yet live.

The full design is specified in docs/api-v1-proposal.md.

Design goals

  • All routes versioned under /api/v1/
  • Dataset identity in the URL path, not the request body
  • Named fields in all responses (no positional index maps)
  • Full aggregation parity with the Huey frontend (all 23 functions)
  • Dataset discovery endpoints
  • Standards-compliant HTTP semantics (correct status codes, HEAD support, ETag, sparse responses)
  • One error envelope, machine-readable error codes

Implementation order

Issues are listed in recommended implementation order. Each issue depends on those above it in the same group.

Foundation (implement first — everything depends on this)

Discovery

Core query API (implement together — tightly coupled)

Exports

Query capabilities (independently parallelisable after #407)

Advanced analytics

Target route map

GET  /health/liveness
GET  /health/readiness
GET  /health/startup

GET  /api/v1
GET  /api/v1/datasets
GET  /api/v1/datasets/{id}
GET  /api/v1/datasets/{id}/schema

POST /api/v1/datasets/{id}/query/tuples
POST /api/v1/datasets/{id}/query/cells
POST /api/v1/datasets/{id}/query/members
POST /api/v1/datasets/{id}/query/outliers

POST   /api/v1/datasets/{id}/exports
GET    /api/v1/exports
GET    /api/v1/exports/{export_id}
DELETE /api/v1/exports/{export_id}
GET    /api/v1/exports/{export_id}/file  (HEAD also)

GET  /api/v1/openapi.json
GET  /api/v1/docs
GET  /api/v1/redoc

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions