Skip to content

Latest commit

 

History

History
166 lines (127 loc) · 7.8 KB

DimensionsApi.md

File metadata and controls

166 lines (127 loc) · 7.8 KB

Mux.Csharp.Sdk.Api.DimensionsApi

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

Method HTTP request Description
ListDimensionValues GET /data/v1/dimensions/{DIMENSION_ID} Lists the values for a specific dimension
ListDimensions GET /data/v1/dimensions List Dimensions

ListDimensionValues

ListDimensionValuesResponse ListDimensionValues (string DIMENSION_ID, int? limit = null, int? page = null, List filters = null, List metricFilters = null, List timeframe = null)

Lists the values for a specific dimension

Lists the values for a dimension along with a total count of related views. Note: This API replaces the list-filter-values API call.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;

namespace Example
{
    public class ListDimensionValuesExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mux.com";
            // Configure HTTP basic authorization: accessToken
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new DimensionsApi(config);
            var DIMENSION_ID = abcd1234;  // string | ID of the Dimension
            var limit = 25;  // int? | Number of items to include in the response (optional)  (default to 25)
            var page = 1;  // int? | Offset by this many pages, of the size of `limit` (optional)  (default to 1)
            var filters = new List<string>(); // 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) 
            var metricFilters = new List<string>(); // List<string> | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter.  Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`.  Example:    * `metric_filters[]=aggregate_startup_time>=1000`  (optional) 
            var timeframe = new List<string>(); // 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) 

            try
            {
                // Lists the values for a specific dimension
                ListDimensionValuesResponse result = apiInstance.ListDimensionValues(DIMENSION_ID, limit, page, filters, metricFilters, timeframe);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DimensionsApi.ListDimensionValues: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
DIMENSION_ID string ID of the Dimension
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<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]
metricFilters List<string> Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` [optional]
timeframe 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]

Return type

ListDimensionValuesResponse

Authorization

accessToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListDimensions

ListDimensionsResponse ListDimensions ()

List Dimensions

List all available dimensions. Note: This API replaces the list-filters API call.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;

namespace Example
{
    public class ListDimensionsExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mux.com";
            // Configure HTTP basic authorization: accessToken
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new DimensionsApi(config);

            try
            {
                // List Dimensions
                ListDimensionsResponse result = apiInstance.ListDimensions();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DimensionsApi.ListDimensions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

ListDimensionsResponse

Authorization

accessToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]