You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Entities have two types of fields - attributes and relationships. The attributes are stored as part of the JSON document in the backend database for an entity. The relationship fields are not stored as part of the JSON document.
When an entity is retrieved in GET operation (either list entities or get a single entity):
Setting attributes in an entity does not require additional database lookup and incurs no extra cost other than making the response payload larger. Hence, the fields param used for controlling the payload size typically does not include attribute field names. The exception to this rule maybe some large attributes of the type array.
Setting relationships of an entity however requires a lookup into the entity_relationship table and hence has database lookup cost. Hence, the fields param typically includes relationship field names.
Following changes are proposed as part of this issue:
For API documentation purposes, a list of field names that can be passed as queryParamfield that is a subset of fields in an entity is defined in every entity.
Any field name from an entity can be passed as a field name in queryParam. The default fields that are returned always in GET operations are ignored (and the entity will contain these fields). A field name that does not exist in an entity will result in an error indicating the field name is invalid.
The text was updated successfully, but these errors were encountered:
Entities have two types of fields -
attributes
andrelationships
. Theattributes
are stored as part of the JSON document in the backend database for an entity. Therelationship
fields are not stored as part of the JSON document.When an entity is retrieved in GET operation (either list entities or get a single entity):
attributes
in an entity does not require additional database lookup and incurs no extra cost other than making the response payload larger. Hence, thefields
param used for controlling the payload size typically does not includeattribute
field names. The exception to this rule maybe some large attributes of the type array.relationships
of an entity however requires a lookup into theentity_relationship
table and hence has database lookup cost. Hence, thefields
param typically includesrelationship
field names.Following changes are proposed as part of this issue:
queryParam
field
that is a subset of fields in an entity is defined in every entity.queryParam
. The default fields that are returned always in GET operations are ignored (and the entity will contain these fields). A field name that does not exist in an entity will result in an error indicating the field name is invalid.The text was updated successfully, but these errors were encountered: