Search for contexts.
You can use either the query parameters or the request body parameters. If both are provided, there is an error.
To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/api/contexts#filtering-contexts-and-context-instances). To learn more about contexts, read [Contexts and context kinds](https://launchdarkly.com/docs/home/observability/contexts#contexts-and-context-kinds).
Query parameters
limitlongOptional
Specifies the maximum number of items in the collection to return (max: 50, default: 20)
continuationTokenstringOptionalformat: "string"
Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the next link we provide instead.
sortstringOptionalformat: "string"Deprecated
Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a 400 response, so omit it.
filterstringOptionalformat: "string"
A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances).
includeTotalCountbooleanOptional
Specifies whether to include or omit the total count of matching contexts. Defaults to true.
Request
This endpoint expects an object.
filterstringOptional
A collection of context filters
sortstringOptional
Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying ts for this value, or descending order by specifying -ts.
limitintegerOptional
Specifies the maximum number of items in the collection to return (max: 50, default: 20)
continuationTokenstringOptional
Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the next link instead, because this value is an obfuscated string.
Response
Contexts collection response
_environmentIdstring
The environment ID where the context was evaluated
itemslist of objects
A collection of contexts. Can include multiple versions of contexts that have the same kind and key, but different applicationIds.
_linksmap from strings to objectsOptional
The location and content type of related resources
totalCountintegerOptional
The number of contexts
continuationTokenstringOptional
An obfuscated string that references the last context instance on the previous page of results. You can use this for pagination, however, we recommend using the next link instead.