include
To limit the response body to specific properties, use
the include query string parameter.
The value for the include query string parameter is a list of properties separated by bars (|). You must URL encode the bars as %7C. Include a forward slash before every property name.
The following request includes only the aboutMe
property and the address property in a response
body:
1/chatter/users/me?include=/aboutMe%7C/addressThe following table lists rules for using the include query parameter.
| Description | Original Output | Include Value | Filtered Output |
|---|---|---|---|
| Include a forward slash (/) before property names or the request returns an error. |
|
include=bar | 400 error with error code INVALID_FILTER_VALUE |
| Filter properties by name. |
|
include=/bar |
|
| Top-level properties are ignored. Note there is no error when you try this. |
|
include=/foo |
|
| Use a bar (|) delimiter to filter multiple properties. URL encode the delimiter as %7C. |
|
include=/foo%7C/bar |
|
| Filtering a response body filters everything below it. |
|
include=/someObject |
|
| To filter a property nested in a response body, include the parent response body name as a filter segment. |
|
include=/someObject/sub |
|
| Identify an item in a list by its property name. This example uses XML. |
|
include=/someList/item/id |
|
| Identify an item in a list by its property name. This example uses JSON. |
|
include=/someList/item/id |
|