Skip to content

feat: /api/v1/meta-all aggregated cube catalog#39

Merged
acmeguy merged 1 commit intomainfrom
feat/meta-all-endpoint
Apr 19, 2026
Merged

feat: /api/v1/meta-all aggregated cube catalog#39
acmeguy merged 1 commit intomainfrom
feat/meta-all-endpoint

Conversation

@acmeguy
Copy link
Copy Markdown

@acmeguy acmeguy commented Apr 19, 2026

Summary

  • New GET /api/v1/meta-all endpoint. One call returns cube summaries across every datasource the caller can see (partition-filtered, same auth model as /discover).
  • Each cube is stamped with datasource_id / branch_id / version_id so clients can immediately issue /load or /meta requests without a second lookup.
  • Summary shape per cube: name, title, description, public, measures[], dimensions[], segments[], meta. Full objects are not returned — only names for fields and segments.
  • Uses Promise.allSettled + per-datasource error list so one bad datasource does not fail the whole response.
  • Auth: WorkOS RS256 or FraiOS HS256 bearer token.

Implementation notes

  • Reuses the existing apiGateway.getCompilerApi(ctx).metaConfig() + filterVisibleItemsInMeta() pattern from loadExport.js, so access-list filtering (cubes / measures / dimensions the user cannot see) is applied per datasource.
  • Builds a fresh security context per datasource via defineUserScope, so cube compilation and cache isolation continue to work exactly as with /meta.
  • Partition filter reuses resolvePartitionTeamIds from discover.js.

Test plan

  • curl with no token → 403 { error: "Authorization header required" }
  • curl with valid FraiOS token → 200 with populated datasources[] including cube summaries (semantic_events: 73 measures, 138 dimensions)
  • curl with token whose partition matches no team → 200 { datasources: [] }
  • Verify in staging with a WorkOS token
  • Smoke-test from client-v2 / cxs2

🤖 Generated with Claude Code

Adds a new endpoint that walks every datasource visible to the caller
(partition-filtered, same as /discover), compiles each via the Cube.js
apiGateway, and returns a per-cube summary stamped with
datasource_id / branch_id / version_id. Eliminates the need for clients
to issue one /meta request per datasource to build a cube catalog.

Summary includes: name, title, description, public flag, measure /
dimension / segment names, and the cube-level meta block. Uses
Promise.allSettled so one failing datasource does not fail the whole
response.

Auth: WorkOS RS256 or FraiOS HS256 bearer token (same as /discover).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@acmeguy acmeguy merged commit e8a353b into main Apr 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants