-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(API): Include changed_by.id in Get Charts and Get Datasets API responses #26540
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #26540 +/- ##
==========================================
- Coverage 69.16% 69.16% -0.01%
==========================================
Files 1948 1948
Lines 76062 76062
Branches 8493 8493
==========================================
- Hits 52610 52609 -1
- Misses 21272 21273 +1
Partials 2180 2180
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
hey @eschutho @betodealmeida @john-bodley while working on this PR, I noticed that the response for getting all charts ( Is this by design? I would expect the same amount of fields, or the other way around (fetching a specific chart returns more information about it than fetching all charts). What are your thoughts on making sure that:
I would imagine this wouldn't require a SIP (given we're not removing fields from the API or adding complexity) but would love to get your opinion. |
@Vitor-Avila regarding your comment:
I sense this is simply one (of many) inconsistencies which currently exist in our APIs—likely because they were probably written to handle specific use cases (both from a request and response perspective), i.e., historically the APIs (which evolved from Flask views) were built in a vertical rather than horizontal manner. There are pros/cons with both approaches where one could argue that the current approach is optimized for the UX, i.e., payload reduction where possible. There likely needs to be a concerted effort to ensure that our APIs are consistent. |
Thanks for the additional context, @john-bodley! |
🏷️ preset:2024.3 |
…responses (apache#26540) (cherry picked from commit 197c6e6)
…responses (apache#26540) (cherry picked from commit 197c6e6)
SUMMARY
The API responses for fetching all charts (
/api/v1/chart/
) and all datasets (/api/v1/dataset/
) don't include thechanged_by.id
attribute. This is useful when implementing automations to maintain content (that involve reaching out to the user that last modified it).This PR includes this field in the two API responses. It is already available when fetching all dashboards (
/api/v1/dashboard/
).TESTING INSTRUCTIONS
GET
request to/api/v1/chart/
and confirm thechanged_by.id
is visible there.GET
request to/api/v1/dataset/
and confirm thechanged_by.id
is visible there.ADDITIONAL INFORMATION