Add get_by_id to EdFiEndpoint#57
Open
ea-mtenhoor wants to merge 1 commit intomainfrom
Open
Conversation
jayckaiser
reviewed
Apr 29, 2026
| logger.info(f"[Get by id {self.component}] Endpoint: {url}") | ||
|
|
||
| params = EdFiParams(params or self.params).copy() | ||
| logger.info(f"[Get by id {self.component}] Parameters: {params}") |
Collaborator
There was a problem hiding this comment.
Are there any params that are relevant to include when querying by ID directly? If not, I would want to omit these from being used to avoid the possibility of someone passing mutually-exclusive arguments and parameters (e.g., different IDs, etc.).
| params = EdFiParams(params or self.params).copy() | ||
| logger.info(f"[Get by id {self.component}] Parameters: {params}") | ||
|
|
||
| return self.client.session.get_response(url, params=params, **kwargs).json() |
Collaborator
There was a problem hiding this comment.
To confirm, if the ID passed is undefined, will this return an empty dictionary?
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.
This PR adds a
get_by_idmethod toEdFiEndpoint, allowing the retrieval of a single resource record by its Ed-Fi ID. A similar result is already possible by passing a dictionary withidto theparamsofget_rows. There is no practical performance improvement with either method, but there are some differences./data/v3/ed-fi/schools?id=44cbdc9355c74afe90262493a2aba769and/data/v3/ed-fi/schools?id=44cbdc9355c74afe90262493a2aba769&pageToken=LTIxNDc0ODM2MzgsMjE0NzQ4MzY0Nw&pageSize=100/data/v3/ed-fi/schools/44cbdc9355c74afe90262493a2aba769