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

Add support for querying attributes without expand=resources #868

Closed
jrafanie opened this issue Jul 24, 2020 · 2 comments
Closed

Add support for querying attributes without expand=resources #868

jrafanie opened this issue Jul 24, 2020 · 2 comments

Comments

@jrafanie
Copy link
Member

jrafanie commented Jul 24, 2020

A request such as: /api/vms?&attributes=name will silently ignore the requested name attribute, returning just hrefs and a 200 response code:

    "resources": [
        {
            "href": "http://localhost:3000/api/vms/1"
        },

We should honor any requested attributes (real or virtual) and continue to include the href when expand is not included in the requested URL.

From discussion here: #866
Also related to slow api requests: #805

This feature will allow us to make much more performant API requests without breaking compatibility and only minimal changes to clients: (drop expand=resources) (a 2 MB response that includes all attributes due to expand=resources can become 70 KB without expand=resources + only needed attributes)

@Fryguy
Copy link
Member

Fryguy commented Sep 9, 2020

There is also a reverse subtlety here where if you pass /api/vms?expand=resources&attributes=num_cpu you get back all of the fields plus num_cpu, however if you pass /api/vms?expand=resources&attributes=name,num_cpu you only get name and num_cpu, which doesn't seem to make sense (as it's a physical column). So changing this opens up fixing this oddity.

@miq-bot
Copy link
Member

miq-bot commented Mar 6, 2023

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

@miq-bot miq-bot added the stale label Mar 6, 2023
@jrafanie jrafanie closed this as completed Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants