Return flat JSON instead of transformed data #16249
Merged
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.
In a previous PR, we updated the
update()
method of the API assets controller to use the standard asset payload return. This unfortunately broke some integrations with Kandji2Snipe and Jamf2Snipe, as those are expecting the old (incorrect) flat object shape.This is a temporary fix, as I think the API object return shape should conform with the way we return it everywhere else, but this should at least get people who use Kandji2Snipe and Jamf2Snipe back up and running.
Big thanks to @uberbrady, @ctsamuraix, @ParadoxGuitarist, and @mcarras8 for working through the issue with us.
The longer term plan will be to correct those scripts to use the "right" API object return shape, and/or allow you to opt into using the new one if for some reason you can't update your own integrations.
This should fix grokability/jamf2snipe#134