All URIs are relative to https://api.mux.com
Method | HTTP request | Description |
---|---|---|
list_filter_values | GET /data/v1/filters/{FILTER_ID} | Lists values for a specific filter |
list_filters | GET /data/v1/filters | List Filters |
ListFilterValuesResponse list_filter_values(filter_id, limit=limit, page=page, filters=filters, timeframe=timeframe)
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.
- Basic Authentication (accessToken):
from __future__ import print_function
import time
import mux_python
from mux_python.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mux.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mux_python.Configuration(
host = "https://api.mux.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: accessToken
configuration = mux_python.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Enter a context with an instance of the API client
with mux_python.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = mux_python.FiltersApi(api_client)
filter_id = 'abcd1234' # str | ID of the Filter
limit = 25 # int | Number of items to include in the response (optional) (default to 25)
page = 1 # int | Offset by this many pages, of the size of `limit` (optional) (default to 1)
filters = ['filters_example'] # list[str] | 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 = ['timeframe_example'] # list[str] | 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)
try:
# Lists values for a specific filter
api_response = api_instance.list_filter_values(filter_id, limit=limit, page=page, filters=filters, timeframe=timeframe)
pprint(api_response)
except ApiException as e:
print("Exception when calling FiltersApi->list_filter_values: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
filter_id | str | ID of the Filter | |
limit | int | Number of items to include in the response | [optional] [default to 25] |
page | int | Offset by this many pages, of the size of `limit` | [optional] [default to 1] |
filters | list[str] | 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 | list[str] | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListFiltersResponse list_filters()
List Filters
The API has been replaced by the list-dimensions API call. Lists all the filters broken out into basic and advanced.
- Basic Authentication (accessToken):
from __future__ import print_function
import time
import mux_python
from mux_python.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mux.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mux_python.Configuration(
host = "https://api.mux.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: accessToken
configuration = mux_python.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Enter a context with an instance of the API client
with mux_python.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = mux_python.FiltersApi(api_client)
try:
# List Filters
api_response = api_instance.list_filters()
pprint(api_response)
except ApiException as e:
print("Exception when calling FiltersApi->list_filters: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]