feat: expose ingest sources through source index - #3869
Draft
djwhitt wants to merge 3 commits into
Draft
Conversation
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.
Summary
GET /api/sourcesindex to support ingest-compatible credentialstokenandnamefor ingest credentials?format=csvWhy reuse the existing endpoint
This alternative keeps source discovery at the established
GET /api/sourcesURL instead of adding another API resource. Private management clients retain the current full JSON representation, while ingest credentials receive a restricted representation selected from the credential type. CSV is always the minimaltoken,namerepresentation.The tradeoff is that one route now has an authentication-dependent JSON schema and requires its index authorization to be separated from the remaining private source-management routes. The OpenAPI response documents both representations and focused tests cover the compatibility boundary.
This is an alternative to #3866; only one approach is intended to merge.
Testing
../bin/test test/logflare_web/controllers/api/source_discovery_controller_test.exs../bin/test test/logflare_web/api_spec_test.exs test/logflare_web/open_api_test.exsMIX_ENV=test ../bin/format --check-formattedMIX_ENV=test ../bin/x mix lint.all../bin/x mix compileThe existing full
source_controller_test.exshas one PostgreSQL URL-redaction failure that is independently reproducible on the unchanged baseline.