Field Projection
Field projection controls the entity's data that is displayed in the response from an API request.
All APIs have a default set of field projections that control which fields are returned. If you don't need certain fields, you can decrease response time and payload size by using a projection to ask only for the relevant fields.
Fields projection is done with the use of the optional fields
query parameter and providing a a comma-separated list of field names that you want returned. For example, for the campaign service you can define fields=id,name,type,properties
.
By default the returned fields are predefined by Snappy for the most common use cases - e.g. in the get campaigns service you will receive the Id
and campaign name
. As this may be different between services, check the specific service documentation for the default fields.
You may request to receive the full object data using fields=full
or specify specific fields using the fields names separated with commas and no spaces.
Note
You can only specify fields from the parent object.
Updated 5 months ago