Added consumables endpoint to user API #10721
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.
I'm not entirely sure if this is the format that would be required for all use-cases. Some folks might need the actual join_id information. This at least lists the consumables that are currently checked out to a user, using the standard consumables transformer. I'd love if anyone with a use case that needs a list of consumables assigned to a user could give this a whirl and confirm that it meets your needs. (We literally didn't have an endpoint at all before, so I'd hope this is better than nothing, but if we're going to codify this, I'd prefer it's doing the right thing. Changing API specs can be treacherous water once people have built integrations around an expected payload.)
This adds the url endpoint of
/api/v1/users/{:id}/consumables
and the response would look something like this:Signed-off-by: snipe snipe@snipe.net