Query Projection

Query Parameters

Parameter Description
$project Entity properties to sort the response by and the direction to sort them.

 

$project Parameter

The $project query parameter is responsible for transforming the result model of an API endpoint into another specified model type. It allows users to customise the structure of the returned data by selecting specific properties, renaming them, or even aggregating them into nested structures, providing flexibility in tailoring the API response to meet specific requirements.

Select specific properties

You may use the $project parameter to output only the properties you require. This allows for quicker queries as only the data you need is returned to you, reducing the amount of data needed to transfer across the network.

To select only specific properties list them as a comma-separated list:

$project=firstName,lastName

Combine properties

Properties can also be combined.

$project=lastName & ", " & firstName AS display