github.com/muxinc/mux-go@v1.1.1/docs/MetricsApi.md (about) 1 # \MetricsApi 2 3 All URIs are relative to *https://api.mux.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**GetMetricTimeseriesData**](MetricsApi.md#GetMetricTimeseriesData) | **Get** /data/v1/metrics/{METRIC_ID}/timeseries | Get metric timeseries data 8 [**GetOverallValues**](MetricsApi.md#GetOverallValues) | **Get** /data/v1/metrics/{METRIC_ID}/overall | Get Overall values 9 [**ListAllMetricValues**](MetricsApi.md#ListAllMetricValues) | **Get** /data/v1/metrics/comparison | List all metric values 10 [**ListBreakdownValues**](MetricsApi.md#ListBreakdownValues) | **Get** /data/v1/metrics/{METRIC_ID}/breakdown | List breakdown values 11 [**ListInsights**](MetricsApi.md#ListInsights) | **Get** /data/v1/metrics/{METRIC_ID}/insights | List Insights 12 13 14 # **GetMetricTimeseriesData** 15 > GetMetricTimeseriesDataResponse GetMetricTimeseriesData(ctx, mETRICID, optional) 16 Get metric timeseries data 17 18 Returns timeseries data for a specific metric. 19 20 ### Required Parameters 21 22 Name | Type | Description | Notes 23 ------------- | ------------- | ------------- | ------------- 24 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 25 **mETRICID** | **string**| ID of the Metric | 26 **optional** | ***GetMetricTimeseriesDataOpts** | optional parameters | nil if no parameters 27 28 ### Optional Parameters 29 Optional parameters are passed through a pointer to a GetMetricTimeseriesDataOpts struct 30 31 Name | Type | Description | Notes 32 ------------- | ------------- | ------------- | ------------- 33 34 **timeframe** | [**optional.Interface of []string**](string.md)| 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. | 35 **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | 36 **measurement** | **optional.String**| Measurement for the provided metric. If omitted, the default for the metric will be used. | 37 **orderDirection** | **optional.String**| Sort order. | 38 **groupBy** | **optional.String**| Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the supplied timeframe. | 39 40 ### Return type 41 42 [**GetMetricTimeseriesDataResponse**](GetMetricTimeseriesDataResponse.md) 43 44 ### Authorization 45 46 [accessToken](../README.md#accessToken) 47 48 ### HTTP request headers 49 50 - **Content-Type**: Not defined 51 - **Accept**: application/json 52 53 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 54 55 # **GetOverallValues** 56 > GetOverallValuesResponse GetOverallValues(ctx, mETRICID, optional) 57 Get Overall values 58 59 Returns the overall value for a specific metric, as well as the total view count, watch time, and the Mux Global metric value for the metric. 60 61 ### Required Parameters 62 63 Name | Type | Description | Notes 64 ------------- | ------------- | ------------- | ------------- 65 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 66 **mETRICID** | **string**| ID of the Metric | 67 **optional** | ***GetOverallValuesOpts** | optional parameters | nil if no parameters 68 69 ### Optional Parameters 70 Optional parameters are passed through a pointer to a GetOverallValuesOpts struct 71 72 Name | Type | Description | Notes 73 ------------- | ------------- | ------------- | ------------- 74 75 **timeframe** | [**optional.Interface of []string**](string.md)| 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. | 76 **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | 77 **measurement** | **optional.String**| Measurement for the provided metric. If omitted, the default for the metric will be used. | 78 79 ### Return type 80 81 [**GetOverallValuesResponse**](GetOverallValuesResponse.md) 82 83 ### Authorization 84 85 [accessToken](../README.md#accessToken) 86 87 ### HTTP request headers 88 89 - **Content-Type**: Not defined 90 - **Accept**: application/json 91 92 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 93 94 # **ListAllMetricValues** 95 > ListAllMetricValuesResponse ListAllMetricValues(ctx, optional) 96 List all metric values 97 98 List all of the values across every breakdown for a specific metric. 99 100 ### Required Parameters 101 102 Name | Type | Description | Notes 103 ------------- | ------------- | ------------- | ------------- 104 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 105 **optional** | ***ListAllMetricValuesOpts** | optional parameters | nil if no parameters 106 107 ### Optional Parameters 108 Optional parameters are passed through a pointer to a ListAllMetricValuesOpts struct 109 110 Name | Type | Description | Notes 111 ------------- | ------------- | ------------- | ------------- 112 **timeframe** | [**optional.Interface of []string**](string.md)| 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. | 113 **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | 114 **dimension** | **optional.String**| Dimension the specified value belongs to | 115 **value** | **optional.String**| Value to show all available metrics for | 116 117 ### Return type 118 119 [**ListAllMetricValuesResponse**](ListAllMetricValuesResponse.md) 120 121 ### Authorization 122 123 [accessToken](../README.md#accessToken) 124 125 ### HTTP request headers 126 127 - **Content-Type**: Not defined 128 - **Accept**: application/json 129 130 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 131 132 # **ListBreakdownValues** 133 > ListBreakdownValuesResponse ListBreakdownValues(ctx, mETRICID, optional) 134 List breakdown values 135 136 List the breakdown values for a specific metric. 137 138 ### Required Parameters 139 140 Name | Type | Description | Notes 141 ------------- | ------------- | ------------- | ------------- 142 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 143 **mETRICID** | **string**| ID of the Metric | 144 **optional** | ***ListBreakdownValuesOpts** | optional parameters | nil if no parameters 145 146 ### Optional Parameters 147 Optional parameters are passed through a pointer to a ListBreakdownValuesOpts struct 148 149 Name | Type | Description | Notes 150 ------------- | ------------- | ------------- | ------------- 151 152 **groupBy** | **optional.String**| Breakdown value to group the results by | 153 **measurement** | **optional.String**| Measurement for the provided metric. If omitted, the default for the metric will be used. | 154 **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | 155 **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] 156 **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] 157 **orderBy** | **optional.String**| Value to order the results by | 158 **orderDirection** | **optional.String**| Sort order. | 159 **timeframe** | [**optional.Interface of []string**](string.md)| 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. | 160 161 ### Return type 162 163 [**ListBreakdownValuesResponse**](ListBreakdownValuesResponse.md) 164 165 ### Authorization 166 167 [accessToken](../README.md#accessToken) 168 169 ### HTTP request headers 170 171 - **Content-Type**: Not defined 172 - **Accept**: application/json 173 174 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 175 176 # **ListInsights** 177 > ListInsightsResponse ListInsights(ctx, mETRICID, optional) 178 List Insights 179 180 Returns a list of insights for a metric. These are the worst performing values across all breakdowns sorted by how much they negatively impact a specific metric. 181 182 ### Required Parameters 183 184 Name | Type | Description | Notes 185 ------------- | ------------- | ------------- | ------------- 186 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 187 **mETRICID** | **string**| ID of the Metric | 188 **optional** | ***ListInsightsOpts** | optional parameters | nil if no parameters 189 190 ### Optional Parameters 191 Optional parameters are passed through a pointer to a ListInsightsOpts struct 192 193 Name | Type | Description | Notes 194 ------------- | ------------- | ------------- | ------------- 195 196 **measurement** | **optional.String**| Measurement for the provided metric. If omitted, the default for the metric will be used. | 197 **orderDirection** | **optional.String**| Sort order. | 198 **timeframe** | [**optional.Interface of []string**](string.md)| 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. | 199 200 ### Return type 201 202 [**ListInsightsResponse**](ListInsightsResponse.md) 203 204 ### Authorization 205 206 [accessToken](../README.md#accessToken) 207 208 ### HTTP request headers 209 210 - **Content-Type**: Not defined 211 - **Accept**: application/json 212 213 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 214