Skip to content

Latest commit

 

History

History
462 lines (364 loc) · 21.7 KB

MonitoringApi.md

File metadata and controls

462 lines (364 loc) · 21.7 KB

MonitoringApi

All URIs are relative to https://api.mux.com

Method HTTP request Description
getMonitoringBreakdown GET /data/v1/monitoring/metrics/{MONITORING_METRIC_ID}/breakdown Get Monitoring Breakdown
getMonitoringBreakdownTimeseries GET /data/v1/monitoring/metrics/{MONITORING_METRIC_ID}/breakdown-timeseries Get Monitoring Breakdown Timeseries
getMonitoringHistogramTimeseries GET /data/v1/monitoring/metrics/{MONITORING_HISTOGRAM_METRIC_ID}/histogram-timeseries Get Monitoring Histogram Timeseries
getMonitoringTimeseries GET /data/v1/monitoring/metrics/{MONITORING_METRIC_ID}/timeseries Get Monitoring Timeseries
listMonitoringDimensions GET /data/v1/monitoring/dimensions List Monitoring Dimensions
listMonitoringMetrics GET /data/v1/monitoring/metrics List Monitoring Metrics

getMonitoringBreakdown

GetMonitoringBreakdownResponse getMonitoringBreakdown(MONITORING_METRIC_ID).dimension(dimension).timestamp(timestamp).filters(filters).orderBy(orderBy).orderDirection(orderDirection).execute();

Get Monitoring Breakdown

Gets breakdown information for a specific dimension and metric along with the number of concurrent viewers and negative impact score.

Example

// 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.MonitoringApi;

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");

    MonitoringApi apiInstance = new MonitoringApi(defaultClient);
    String MONITORING_METRIC_ID = "current-concurrent-viewers"; // String | ID of the Monitoring Metric
    String dimension = "dimension_example"; // String | Dimension the specified value belongs to
    Integer timestamp = 56; // Integer | Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp.
    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 Monitoring Dimensions endpoint.  Example:    * `filters[]=operating_system:windows&filters[]=!country:US` 
    String orderBy = "orderBy_example"; // String | Value to order the results by
    String orderDirection = "orderDirection_example"; // String | Sort order.
    try {
      GetMonitoringBreakdownResponse result = apiInstance.getMonitoringBreakdown(MONITORING_METRIC_ID)
            .dimension(dimension)
            .timestamp(timestamp)
            .filters(filters)
            .orderBy(orderBy)
            .orderDirection(orderDirection)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling MonitoringApi#getMonitoringBreakdown");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
MONITORING_METRIC_ID String ID of the Monitoring Metric [enum: current-concurrent-viewers, current-rebuffering-percentage, exits-before-video-start, playback-failure-percentage, current-average-bitrate, video-startup-failure-percentage]
dimension String Dimension the specified value belongs to [optional] [enum: asn, cdn, country, operating_system, player_name, region, stream_type, sub_property_id, video_series, video_title, view_has_ad]
timestamp Integer Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp. [optional]
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 Monitoring Dimensions endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` [optional]
orderBy String Value to order the results by [optional] [enum: negative_impact, value, views, field]
orderDirection String Sort order. [optional] [enum: asc, desc]

Return type

GetMonitoringBreakdownResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

getMonitoringBreakdownTimeseries

GetMonitoringBreakdownTimeseriesResponse getMonitoringBreakdownTimeseries(MONITORING_METRIC_ID).dimension(dimension).timeframe(timeframe).filters(filters).limit(limit).orderBy(orderBy).orderDirection(orderDirection).execute();

Get Monitoring Breakdown Timeseries

Gets timeseries of breakdown information for a specific dimension and metric. Each datapoint in the response represents 5 seconds worth of data.

Example

// 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.MonitoringApi;

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");

    MonitoringApi apiInstance = new MonitoringApi(defaultClient);
    String MONITORING_METRIC_ID = "current-concurrent-viewers"; // String | ID of the Monitoring Metric
    String dimension = "dimension_example"; // String | Dimension the specified value belongs to
    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[]=).  The default for this is the last 60 seconds of available data. Timeframes larger than 10 minutes are not allowed, and must be within the last 24 hours. 
    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 Monitoring Dimensions endpoint.  Example:    * `filters[]=operating_system:windows&filters[]=!country:US` 
    Integer limit = 10; // Integer | Number of items to include in each timestamp's `value` list.  The default is 10, and the maximum is 100. 
    String orderBy = "orderBy_example"; // String | Value to order the results by
    String orderDirection = "orderDirection_example"; // String | Sort order.
    try {
      GetMonitoringBreakdownTimeseriesResponse result = apiInstance.getMonitoringBreakdownTimeseries(MONITORING_METRIC_ID)
            .dimension(dimension)
            .timeframe(timeframe)
            .filters(filters)
            .limit(limit)
            .orderBy(orderBy)
            .orderDirection(orderDirection)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling MonitoringApi#getMonitoringBreakdownTimeseries");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
MONITORING_METRIC_ID String ID of the Monitoring Metric [enum: current-concurrent-viewers, current-rebuffering-percentage, exits-before-video-start, playback-failure-percentage, current-average-bitrate, video-startup-failure-percentage]
dimension String Dimension the specified value belongs to [optional] [enum: asn, cdn, country, operating_system, player_name, region, stream_type, sub_property_id, video_series, video_title, view_has_ad]
timeframe java.util.List<String> Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). The default for this is the last 60 seconds of available data. Timeframes larger than 10 minutes are not allowed, and must be within the last 24 hours. [optional]
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 Monitoring Dimensions endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` [optional]
limit Integer Number of items to include in each timestamp's `value` list. The default is 10, and the maximum is 100. [optional] [default to 10]
orderBy String Value to order the results by [optional] [enum: negative_impact, value, views, field]
orderDirection String Sort order. [optional] [enum: asc, desc]

Return type

GetMonitoringBreakdownTimeseriesResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

getMonitoringHistogramTimeseries

GetMonitoringHistogramTimeseriesResponse getMonitoringHistogramTimeseries(MONITORING_HISTOGRAM_METRIC_ID).filters(filters).execute();

Get Monitoring Histogram Timeseries

Gets histogram timeseries information for a specific metric.

Example

// 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.MonitoringApi;

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");

    MonitoringApi apiInstance = new MonitoringApi(defaultClient);
    String MONITORING_HISTOGRAM_METRIC_ID = "video-startup-time"; // String | ID of the Monitoring Histogram Metric
    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 Monitoring Dimensions endpoint.  Example:    * `filters[]=operating_system:windows&filters[]=!country:US` 
    try {
      GetMonitoringHistogramTimeseriesResponse result = apiInstance.getMonitoringHistogramTimeseries(MONITORING_HISTOGRAM_METRIC_ID)
            .filters(filters)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling MonitoringApi#getMonitoringHistogramTimeseries");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
MONITORING_HISTOGRAM_METRIC_ID String ID of the Monitoring Histogram Metric [enum: video-startup-time]
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 Monitoring Dimensions endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` [optional]

Return type

GetMonitoringHistogramTimeseriesResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

getMonitoringTimeseries

GetMonitoringTimeseriesResponse getMonitoringTimeseries(MONITORING_METRIC_ID).filters(filters).timestamp(timestamp).execute();

Get Monitoring Timeseries

Gets Time series information for a specific metric along with the number of concurrent viewers.

Example

// 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.MonitoringApi;

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");

    MonitoringApi apiInstance = new MonitoringApi(defaultClient);
    String MONITORING_METRIC_ID = "current-concurrent-viewers"; // String | ID of the Monitoring Metric
    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 Monitoring Dimensions endpoint.  Example:    * `filters[]=operating_system:windows&filters[]=!country:US` 
    Integer timestamp = 56; // Integer | Timestamp to use as the start of the timeseries data. This value must be provided as a unix timestamp. Defaults to 30 minutes ago.
    try {
      GetMonitoringTimeseriesResponse result = apiInstance.getMonitoringTimeseries(MONITORING_METRIC_ID)
            .filters(filters)
            .timestamp(timestamp)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling MonitoringApi#getMonitoringTimeseries");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
MONITORING_METRIC_ID String ID of the Monitoring Metric [enum: current-concurrent-viewers, current-rebuffering-percentage, exits-before-video-start, playback-failure-percentage, current-average-bitrate, video-startup-failure-percentage]
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 Monitoring Dimensions endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` [optional]
timestamp Integer Timestamp to use as the start of the timeseries data. This value must be provided as a unix timestamp. Defaults to 30 minutes ago. [optional]

Return type

GetMonitoringTimeseriesResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

listMonitoringDimensions

ListMonitoringDimensionsResponse listMonitoringDimensions().execute();

List Monitoring Dimensions

Lists available monitoring dimensions.

Example

// 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.MonitoringApi;

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");

    MonitoringApi apiInstance = new MonitoringApi(defaultClient);
    try {
      ListMonitoringDimensionsResponse result = apiInstance.listMonitoringDimensions()
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling MonitoringApi#listMonitoringDimensions");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

ListMonitoringDimensionsResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

listMonitoringMetrics

ListMonitoringMetricsResponse listMonitoringMetrics().execute();

List Monitoring Metrics

Lists available monitoring metrics.

Example

// 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.MonitoringApi;

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");

    MonitoringApi apiInstance = new MonitoringApi(defaultClient);
    try {
      ListMonitoringMetricsResponse result = apiInstance.listMonitoringMetrics()
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling MonitoringApi#listMonitoringMetrics");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

ListMonitoringMetricsResponse

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -