Add simplified API v2 with single structure endpoint (#36)#68
Open
Titi211179 wants to merge 1 commit intoNeuralEnsemble:masterfrom
Open
Add simplified API v2 with single structure endpoint (#36)#68Titi211179 wants to merge 1 commit intoNeuralEnsemble:masterfrom
Titi211179 wants to merge 1 commit intoNeuralEnsemble:masterfrom
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.
Addresses #36
This PR implements a simplified API v2 that reduces the number of
sequential calls needed to discover and access data in a file.
Current v1 flow (3+ calls)
Each call re-opens the file. Users must discover structure step by step.
New v2 flow (2 calls)
signal metadata, spike train metadata) in a single response
actual data
Changes
FileStructure,BlockStructure,SegmentStructure,SignalInfo,SpikeTrainInfo— rich metadatawithout payload data (sampling rate, duration, channel count,
sample count)
api/resources/v2.pywith 3 endpoints:/structure/,/data/analogsignal/,/data/spiketrains//api/v2/prefixrefresh_cacheparameter from Add an option to the API to ignore/refresh the file cache #40Example
GET /api/v2/structure/?url=https://example.com/data.nwb
Returns all blocks → segments → signal metadata in one response,
so the client knows exactly what to request next.