fields Clause: Selecting Fields to Return
Description
Specifies the fields to be returned in the response to a GET operation on a collection.
Applies To
GET method called on collections.
Does not apply to GET operations on individual entities. For example, the fields clause in this query has no effect:
../tests/135?fields=contains-test-folder.name
Remarks
If the fields clause is not used, all fields are returned.
Limiting the returned fields to those required by your application may significantly improve performance.
Multiple fields are separated with a comma.
Use logical names to identify the fields. See Field Names.
Do not use more than one alias to reference the same entity. For example, in the query ../tests?fields=contains-test-folder.name,test-folder.id
, alias contains-test-folder
and alias test-folder
both refer to test folders. The result of this query will not be what you intended. For more information about aliases, see Relations.
Examples
All fields from one entity type:
tests?fields=id,name
Using aliases to select from multiple entity types:
tests?fields=id,test-folder.id,test-folder.name
For more about queries that reference multiple entity types, see Relations.