By default, the server sends back a default set of resource fields specific to
the method used. For example, the
files.get method might only return the
To return the exact fields you need, and improve performance, use the
query parameter in your method call.
Formatting rules for the
The format of the fields request parameter value is loosely based on XPath
syntax. Following are formatting rules for the
fields parameter. All of these
rules use examples related to the
Use a comma-separated list to select multiple fields, such as
a/bto select a field
bthat is nested within field
a, such as
Use a sub-selector to request a set of specific sub-fields of arrays or objects by placing expressions in parentheses "()". For example,
'permissions(id)'returns only the permission ID for each element in the permissions array.
Use an asterisk as a wild card in field selections to return all fields in an object. For example,
'permissions/permisionDetais/*'selects all available permission details fields per permission. Note that the use of this wildcard can lead to negative performance impact on the request.
After a server processes a valid request that includes the
parameter, it sends back an
HTTP 200 OK status code, along with the requested
data. If the fields query parameter has an error or is otherwise invalid, the
server returns an
HTTP 400 Bad Request status code, along with an error
message telling you what was wrong with your fields selection. For example,
yields an error of "Invalid field selection canAddChildre".