Skip to content

feat(datasource): GET /datasources/:name detail for Studio edit form#2086

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/datasource-get-detail
Jun 21, 2026
Merged

feat(datasource): GET /datasources/:name detail for Studio edit form#2086
xuyushun441-sys merged 1 commit into
mainfrom
feat/datasource-get-detail

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

What

Adds GET /api/v1/datasources/:name (+ DatasourceAdminService.getDatasource(name)) returning a credential-stripped datasource detail for the Studio connection/edit form.

The list endpoint returns only a summary (no config), so the edit form had nothing to prefill. This returns:

  • config — non-sensitive (credentials live in sys_secret, never in config)
  • origin, active, schemaMode, definedIn
  • hasSecret — so the UI can show "leave blank to keep the current credential" without ever receiving the credentialsRef or any cleartext

404 on unknown name. Registered after the static /drivers route so that segment isn't captured as a :name.

Security

The opaque credentialsRef and any cleartext are explicitly excluded; a unit test asserts the serialized response contains neither sys_secret nor credentialsRef.

Tests

service-datasource 63/63 green (route test + 2 service-level tests added).

Part of

The Studio datasource create/edit form (objectui side, follow-up PR). Builds on #2083 (driver catalog) and #2085 (introspection + by-name test).

🤖 Generated with Claude Code

…it form

The datasource list endpoint returns only a summary (no `config`), so the
Studio connection form had nothing to prefill when editing an existing
datasource. Add `DatasourceAdminService.getDatasource(name)` + a
`GET /api/v1/datasources/:name` route returning the credential-stripped detail:
`config` (non-sensitive — credentials live in sys_secret, never in config),
`origin`, and a `hasSecret` flag so the UI can render "leave blank to keep"
without ever receiving the `credentialsRef` or any cleartext. 404 on unknown
name; registered after the static `/drivers` route so that segment isn't
captured as a name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 21, 2026 3:58am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): packages/services.

5 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/guides/packages.mdx (via packages/services)
  • content/docs/guides/runtime-services/audit-service.mdx (via packages/services)
  • content/docs/guides/runtime-services/index.mdx (via packages/services)
  • content/docs/guides/runtime-services/settings-service.mdx (via packages/services)
  • content/docs/protocol/objectos/i18n-standard.mdx (via packages/services)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@xuyushun441-sys
xuyushun441-sys merged commit 254abf6 into main Jun 21, 2026
16 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the feat/datasource-get-detail branch June 21, 2026 04:02
xuyushun441-sys added a commit that referenced this pull request Jun 21, 2026
…tion (#2112)

The README mentioned "REST routes under /api/v1/datasources" but didn't
enumerate them, and predated the Studio integration. Add:
- a REST routes section (lifecycle + drivers catalog + by-name test + GET :name
  detail + introspection/sync routes), with the credential-split note;
- a Studio integration section: datasource is managed through the metadata-admin
  engine (Setup → Integrations → Datasources), runtime records persist to
  sys_metadata and rehydrate on restart.

Reflects #2083 (drivers), #2085 (remote-tables/object-draft/by-name test),
#2086 (GET :name), #2091 (Setup nav), #2096 (persistence).

Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants