All URIs are relative to https://api.mux.com
Method | HTTP request | Description |
---|---|---|
listFilterValues | GET /data/v1/filters/{FILTER_ID} | Lists values for a specific filter |
listFilters | GET /data/v1/filters | List Filters |
ListFilterValuesResponse listFilterValues(FILTER_ID).limit(limit).page(page).filters(filters).timeframe(timeframe).execute();
Lists values for a specific filter
The API has been replaced by the list-dimension-values API call. Lists the values for a filter along with a total count of related views.
// Import classes:
import com.mux.ApiClient;
import com.mux.ApiException;
import com.mux.Configuration;
import com.mux.auth.*;
import com.mux.models.*;
import com.mux.sdk.FiltersApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mux.com");
// Configure HTTP basic authorization: accessToken
HttpBasicAuth accessToken = (HttpBasicAuth) defaultClient.getAuthentication("accessToken");
accessToken.setUsername("YOUR USERNAME");
accessToken.setPassword("YOUR PASSWORD");
FiltersApi apiInstance = new FiltersApi(defaultClient);
String FILTER_ID = "abcd1234"; // String | ID of the Filter
Integer limit = 25; // Integer | Number of items to include in the response
Integer page = 1; // Integer | Offset by this many pages, of the size of `limit`
java.util.List<String> filters = Arrays.asList(); // java.util.List<String> | Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US`
java.util.List<String> timeframe = Arrays.asList(); // java.util.List<String> | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days`
try {
ListFilterValuesResponse result = apiInstance.listFilterValues(FILTER_ID)
.limit(limit)
.page(page)
.filters(filters)
.timeframe(timeframe)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FiltersApi#listFilterValues");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
FILTER_ID | String | ID of the Filter | |
limit | Integer | Number of items to include in the response | [optional] [default to 25] |
page | Integer | Offset by this many pages, of the size of `limit` | [optional] [default to 1] |
filters | java.util.List<String> | Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` | [optional] |
timeframe | java.util.List<String> | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
ListFiltersResponse listFilters().execute();
List Filters
The API has been replaced by the list-dimensions API call. Lists all the filters broken out into basic and advanced.
// Import classes:
import com.mux.ApiClient;
import com.mux.ApiException;
import com.mux.Configuration;
import com.mux.auth.*;
import com.mux.models.*;
import com.mux.sdk.FiltersApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mux.com");
// Configure HTTP basic authorization: accessToken
HttpBasicAuth accessToken = (HttpBasicAuth) defaultClient.getAuthentication("accessToken");
accessToken.setUsername("YOUR USERNAME");
accessToken.setPassword("YOUR PASSWORD");
FiltersApi apiInstance = new FiltersApi(defaultClient);
try {
ListFiltersResponse result = apiInstance.listFilters()
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FiltersApi#listFilters");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |