feat(datasource): GET /datasources/:name detail for Studio edit form#2086
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 5 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
This was referenced Jun 21, 2026
Closed
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 insys_secret, never in config)origin,active,schemaMode,definedInhasSecret— so the UI can show "leave blank to keep the current credential" without ever receiving thecredentialsRefor any cleartext404 on unknown name. Registered after the static
/driversroute so that segment isn't captured as a:name.Security
The opaque
credentialsRefand any cleartext are explicitly excluded; a unit test asserts the serialized response contains neithersys_secretnorcredentialsRef.Tests
service-datasource63/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