-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
GET/LIST subset of object fields #1459
Comments
Consider using this format: Another reference: |
I like the Google+ ?fields parameter. |
I like xpath style better than JavaScript dot notation, and think in general it serves better for query/selection of a subset of a document. The event FieldPath and validation field selectors would then just be the singular case. |
http://goessner.net/articles/JsonPath/ On Sat, Sep 27, 2014 at 7:20 AM, Clayton Coleman [email protected]
|
I immediately retract my statement and return to my original position. Dots ftw :) ----- Original Message -----
|
The Google+ ?fields format lets you select multiple fields, and at multiple points in the hierarchy, in a compact fashion. This seems pretty useful. Can "dots" format do this? |
URL parameters can be specified multiple times if we need to select multiple fields. |
Would we need to use the multi-field selection format inside of resources (i.e. ComponentReference or Validation errors)? I don't think so, which would mean we'd want the selector on in url params to be a superset of that selector inside the fields. ----- Original Message -----
|
After consulting with internal experts on this area, I think we should do the following:
|
----- Original Message -----
I think we need to support this for validations. If I submit a pod with 5 containers and one of them has a missing attribute clients have no way to determine that. So maybe we say that it's not allowed in any context except for validations. I am extremely sensitive to building good UI experiences around default validations provided by the platform though so I have a strong bias. Is there another way to do validation on specific fields that means clients don't have to guess what failed?
+1
+1 |
I see this as about specifying fields in an URL. If an HTTP request to create or update a resource fails, there is no URL to refer to on the apiserver. I think using a format with indexes in a non-URL error message or other context seems fine. |
Ok, then latest proposal LGTM ----- Original Message -----
|
What is the rationale for using dot approach and not just the Google+ API method exactly? |
JavaScript. Anyone who has to do field validation or jquery or jq will be able to leverage that format. The others are somewhat ivory tower |
Is that still true with the simplifying assumptions up-thread? E.g. no On Thu, Feb 19, 2015 at 6:17 PM, Clayton Coleman [email protected]
|
Sorry, I was responding to Sam, in that the format described by Eric works for me (no indexes) because it looks like what we would use for validation (which needs indexes), which we would probably end up using a lot in JavaScript (which benefits from the dot format). ----- Original Message -----
|
A version of this has been implemented in #40848 - clients can request only object metadata. Future enhancements will allow alternate schemas to be returned. The only consumer today is GC. Closing. |
[4.11] OCPBUGS-6683: add message about possibly working with restricted SCC
If anyone finds this and is wondering where some documentation is and/or what it's called: look up information on "Tables" https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables tl;dr: add a header like |
Split off of #1178 and #1200.
It would be useful to be able to specify fields to be returned by GET or LIST, such as just ObjectMetadata, DesiredState, or CurrentState.
This could make a number of operations easier and cheaper, such as LISTing pods controlled by a replication controller, as in #1325.
The text was updated successfully, but these errors were encountered: