How to Use Singular API Filters
Use Singular API Filters to segment performance metrics by app, source, platform or country-level, or any custom dimension configured in Singular.
Api Filters: App and Source Filtered Query
To filter data on the app and/or source level, simply append the app and/or source parameters to your query and include the names of any relevant apps or sources.
For instance, append the following parameters to your query to return performance metrics for Fun-App1 and Fun-App2 on only the ad channels Facebook, Twitter and Pinterest.
To drill deeper beyond app or source, use a Filters Query to return data filtered down to the platform or country-level, or other dimensions configured in Singular.
1. Retrieve available filters and their possible values.
Sample response here.
2. Construct a Filters Query
Using available dimensions and values returned from the /filters endpoint, you can construct your Filter Query against the /reporting endpoint.
Example Filters Query:
As you can see in the example query above, the filters parameter is a JSON list of filter objects each containing a dimension, values and an operator. Dimensions must be called using the dimension’s `name`, while values can be called by using either the `display_name` or `name`. Dimensions are case sensitive, while values are case insensitive.
Operator determines the filter type which can be `in` to include results matching the given values or `not in` to exclude results matching the given values.
This dimension would display results for all countries except results in the United States.