Skip to content
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

Simply getting a subresource should return its actions #357

Closed
abellotti opened this issue Apr 3, 2018 · 1 comment
Closed

Simply getting a subresource should return its actions #357

abellotti opened this issue Apr 3, 2018 · 1 comment
Assignees
Labels

Comments

@abellotti
Copy link
Member

abellotti commented Apr 3, 2018

GET /api/vms/5 as well as GET /api/providers/1/vms/5 should both return the vms/5 actions.

Currently the latter signature does not and is causing the manageiq-api-client to not allow vms operations on subresources.

Needed for: ManageIQ/manageiq-api-client#61

@abellotti abellotti added the bug label Apr 3, 2018
@abellotti abellotti self-assigned this Apr 3, 2018
@abellotti
Copy link
Member Author

Actually, I am not sure about this. This was never the case in earlier release.

I think the API clients could simply recenter the requests at the resource's primary URL, so we'd rely on actions listed in GET /api/vms/5. What this would allow deeply nested QueryRelation::Queryable, and if done properly allow fetching subcollections at each level.

miq.providers.where(:name => "test-provider).first.vms.where(:name => "test-vm").first.snapshots.count

In theory :)

Closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant