exclude
To exclude specific properties from a response body, use the exclude request parameter. The exclude parameter is available in API version 27.0 and later.
The value for the exclude query is a list of properties separated by bars (|). You must URL encode the bars as %7C. You must include a forward slash before each property name.
The following request excludes both the aboutMe and address properties from a response body:
The following rules describe how to use the exclude query parameter.
Include a forward slash (/) before property names or the request returns an error.
Original output:
Exclude value: exclude=bar
Filtered output: 400 error with error code INVALID_FILTER_VALUE.
Original output:
Exclude value: exclude=/bar
Filtered output:
Top-level properties cannot be filtered. Note that this query string doesn’t return an error.
Original output:
Exclude value: exclude=/foo
Filtered output:
Use a bar (|) delimiter to filter multiple properties. URL encode the delimiter as %7C.
Original output:
Exclude value: exclude=/foo%7C/bar
Filtered output:
Original output:
Exclude value: exclude=/someObject
Filtered output:
To filter a property nested in a response body, include the parent response body name as a filter segment.
Original output:
Exclude value: exclude=/someObject/sub
Filtered output:
Identify an item in a list by its property name. This example uses XML.
Original output:
Exclude value: exclude=/someList/item/id
Filtered output:
Identify an item in a list by its property name. This example uses JSON.
Original output:
Exclude value: exclude=/someList/item/id
Filtered output: