---
title: "GET /app/backtests/{backtest_id}/"
method: GET
path: "/app/backtests/{backtest_id}/"
tags: ["app"]
---

# GET /app/backtests/{backtest_id}/

`GET /app/backtests/{backtest_id}/`

A simple ViewSet for viewing and editing Backtests.

## Path parameters

- `backtest_id` string, uuid, required

## Response `200`

- BacktestDetail
  - `end_date` string, date, required
  - `time_created` string, date-time
  - `status` 'running' | 'completed' | 'failed'
  - `kpis` object
  - `backtest_name` string, required
  - `start_date` string, date, required
  - `backtest_id` string, required
  - `backtest_substitutions` BacktestSubstitution[], required
    - `new_plan` PlanVersionDetail, required
      - `description` string, nullable, required
      - `flat_fee_billing_type` 'in_arrears' | 'in_advance', required
      - `flat_rate` number, double, required
      - `components` PlanComponent[], required
        - `billable_metric` Metric, required
          - `metric_id` string, required
          - `event_name` string, required — Name of the event that this metric is tracking.
          - `property_name` string, nullable, required — The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count.
          - `aggregation_type` string, required
          - `granularity` 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'quarters' | 'years' | 'total' | 'null', nullable, required — The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'.
          - `event_type` 'delta' | 'total' | 'null', nullable, required — Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types.
          - `metric_type` 'counter' | 'rate' | 'custom' | 'gauge', required — The type of metric that this is. Please refer to our documentation for an explanation of the different types.
          - `metric_name` string, required
          - `numeric_filters` NumericFilter[], required
            - `property_name` string, required
            - `operator` 'gte' | 'gt' | 'eq' | 'lt' | 'lte', required
            - `comparison_value` number, double, required
          - `categorical_filters` CategoricalFilter[], required
            - `property_name` string, required
            - `operator` 'isin' | 'isnotin', required
            - `comparison_value` string[], required
          - `is_cost_metric` boolean, required — Whether or not this metric is a cost metric (used to track costs to your business).
          - `custom_sql` string, nullable, required — A custom SQL query that can be used to define the metric. Please refer to our documentation for more information.
          - `proration` 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'quarters' | 'years' | 'total' | 'null', nullable, required — The proration of the metric. Only applies to metrics of type 'gauge'.
        - `tiers` PriceTier[], required
          - `type` 'flat' | 'per_unit' | 'free', required
          - `range_start` number, double, required
          - `range_end` number, double, nullable, required
          - `cost_per_batch` number, double, nullable, required
          - `metric_units_per_batch` number, double, nullable, required
          - `batch_rounding_type` 'round_up' | 'round_down' | 'round_nearest' | 'no_rounding', nullable, required
        - `pricing_unit` PricingUnit, required
          - `code` string, required
          - `name` string, required
          - `symbol` string, required
      - `features` Feature[], required
        - `feature_name` string, required
        - `feature_description` string, nullable, required
      - `price_adjustment` PriceAdjustment, required
        - `price_adjustment_name` string, required
        - `price_adjustment_description` string, nullable, required
        - `price_adjustment_type` 'percentage' | 'fixed' | 'price_override', required
        - `price_adjustment_amount` number, double, required
      - `usage_billing_frequency` 'monthly' | 'quarterly' | 'end_of_period' | 'null', nullable, required
      - `version` integer, required
      - `status` 'active' | 'retiring' | 'grandfathered' | 'archived' | 'inactive', required
      - `plan_name` string, required
      - `currency` PricingUnit, required
        - `code` string, required
        - `name` string, required
        - `symbol` string, required
      - `version_id` string, required
      - `plan_id` string, required
      - `alerts` UsageAlert[], required
        - `usage_alert_id` string, required
        - `metric` Metric, required
          - `metric_id` string, required
          - `event_name` string, required — Name of the event that this metric is tracking.
          - `property_name` string, nullable, required — The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count.
          - `aggregation_type` string, required
          - `granularity` 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'quarters' | 'years' | 'total' | 'null', nullable, required — The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'.
          - `event_type` 'delta' | 'total' | 'null', nullable, required — Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types.
          - `metric_type` 'counter' | 'rate' | 'custom' | 'gauge', required — The type of metric that this is. Please refer to our documentation for an explanation of the different types.
          - `metric_name` string, required
          - `numeric_filters` NumericFilter[], required
            - `property_name` string, required
            - `operator` 'gte' | 'gt' | 'eq' | 'lt' | 'lte', required
            - `comparison_value` number, double, required
          - `categorical_filters` CategoricalFilter[], required
            - `property_name` string, required
            - `operator` 'isin' | 'isnotin', required
            - `comparison_value` string[], required
          - `is_cost_metric` boolean, required — Whether or not this metric is a cost metric (used to track costs to your business).
          - `custom_sql` string, nullable, required — A custom SQL query that can be used to define the metric. Please refer to our documentation for more information.
          - `proration` 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'quarters' | 'years' | 'total' | 'null', nullable, required — The proration of the metric. Only applies to metrics of type 'gauge'.
        - `plan_version` LightweightPlanVersion, required
          - `plan_name` string, required
          - `plan_id` string, required
          - `version` integer, required
        - `threshold` number, double, required
    - `original_plan` PlanVersionDetail, required
      - `description` string, nullable, required
      - `flat_fee_billing_type` 'in_arrears' | 'in_advance', required
      - `flat_rate` number, double, required
      - `components` PlanComponent[], required
        - `billable_metric` Metric, required
          - `metric_id` string, required
          - `event_name` string, required — Name of the event that this metric is tracking.
          - `property_name` string, nullable, required — The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count.
          - `aggregation_type` string, required
          - `granularity` 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'quarters' | 'years' | 'total' | 'null', nullable, required — The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'.
          - `event_type` 'delta' | 'total' | 'null', nullable, required — Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types.
          - `metric_type` 'counter' | 'rate' | 'custom' | 'gauge', required — The type of metric that this is. Please refer to our documentation for an explanation of the different types.
          - `metric_name` string, required
          - `numeric_filters` NumericFilter[], required
            - `property_name` string, required
            - `operator` 'gte' | 'gt' | 'eq' | 'lt' | 'lte', required
            - `comparison_value` number, double, required
          - `categorical_filters` CategoricalFilter[], required
            - `property_name` string, required
            - `operator` 'isin' | 'isnotin', required
            - `comparison_value` string[], required
          - `is_cost_metric` boolean, required — Whether or not this metric is a cost metric (used to track costs to your business).
          - `custom_sql` string, nullable, required — A custom SQL query that can be used to define the metric. Please refer to our documentation for more information.
          - `proration` 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'quarters' | 'years' | 'total' | 'null', nullable, required — The proration of the metric. Only applies to metrics of type 'gauge'.
        - `tiers` PriceTier[], required
          - `type` 'flat' | 'per_unit' | 'free', required
          - `range_start` number, double, required
          - `range_end` number, double, nullable, required
          - `cost_per_batch` number, double, nullable, required
          - `metric_units_per_batch` number, double, nullable, required
          - `batch_rounding_type` 'round_up' | 'round_down' | 'round_nearest' | 'no_rounding', nullable, required
        - `pricing_unit` PricingUnit, required
          - `code` string, required
          - `name` string, required
          - `symbol` string, required
      - `features` Feature[], required
        - `feature_name` string, required
        - `feature_description` string, nullable, required
      - `price_adjustment` PriceAdjustment, required
        - `price_adjustment_name` string, required
        - `price_adjustment_description` string, nullable, required
        - `price_adjustment_type` 'percentage' | 'fixed' | 'price_override', required
        - `price_adjustment_amount` number, double, required
      - `usage_billing_frequency` 'monthly' | 'quarterly' | 'end_of_period' | 'null', nullable, required
      - `version` integer, required
      - `status` 'active' | 'retiring' | 'grandfathered' | 'archived' | 'inactive', required
      - `plan_name` string, required
      - `currency` PricingUnit, required
        - `code` string, required
        - `name` string, required
        - `symbol` string, required
      - `version_id` string, required
      - `plan_id` string, required
      - `alerts` UsageAlert[], required
        - `usage_alert_id` string, required
        - `metric` Metric, required
          - `metric_id` string, required
          - `event_name` string, required — Name of the event that this metric is tracking.
          - `property_name` string, nullable, required — The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count.
          - `aggregation_type` string, required
          - `granularity` 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'quarters' | 'years' | 'total' | 'null', nullable, required — The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'.
          - `event_type` 'delta' | 'total' | 'null', nullable, required — Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types.
          - `metric_type` 'counter' | 'rate' | 'custom' | 'gauge', required — The type of metric that this is. Please refer to our documentation for an explanation of the different types.
          - `metric_name` string, required
          - `numeric_filters` NumericFilter[], required
            - `property_name` string, required
            - `operator` 'gte' | 'gt' | 'eq' | 'lt' | 'lte', required
            - `comparison_value` number, double, required
          - `categorical_filters` CategoricalFilter[], required
            - `property_name` string, required
            - `operator` 'isin' | 'isnotin', required
            - `comparison_value` string[], required
          - `is_cost_metric` boolean, required — Whether or not this metric is a cost metric (used to track costs to your business).
          - `custom_sql` string, nullable, required — A custom SQL query that can be used to define the metric. Please refer to our documentation for more information.
          - `proration` 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'quarters' | 'years' | 'total' | 'null', nullable, required — The proration of the metric. Only applies to metrics of type 'gauge'.
        - `plan_version` LightweightPlanVersion, required
          - `plan_name` string, required
          - `plan_id` string, required
          - `version` integer, required
        - `threshold` number, double, required
  - `backtest_results` AllSubstitutionResults, required
    - `substitution_results` SingleSubstitution[]
      - `substitution_name` string, required
      - `original_plan` PlanRepresentation, required
        - `plan_name` string, required
        - `plan_id` string, required
        - `plan_revenue` number, double, required
      - `new_plan` PlanRepresentation, required
        - `plan_name` string, required
        - `plan_id` string, required
        - `plan_revenue` number, double, required
      - `pct_revenue_change` number, double, nullable, required
      - `results` SingleSubstitutionResults, required
        - `cumulative_revenue` RevenueDate[], required
          - `date` string, date, required
          - `original_plan_revenue` number, double, required
          - `new_plan_revenue` number, double, required
        - `revenue_by_metric` MetricRevenue[], required
          - `metric_name` string, required
          - `original_plan_revenue` number, double, required
          - `new_plan_revenue` number, double, required
        - `top_customers` TopCustomers, required
          - `original_plan_revenue` SingleCustomerValue[], required
            - `customer_id` string, required
            - `customer_name` string, required
            - `value` number, double, required
          - `new_plan_revenue` SingleCustomerValue[], required
            - `customer_id` string, required
            - `customer_name` string, required
            - `value` number, double, required
          - `biggest_pct_increase` SingleCustomerValue[], required
            - `customer_id` string, required
            - `customer_name` string, required
            - `value` number, double, required
          - `biggest_pct_decrease` SingleCustomerValue[], required
            - `customer_id` string, required
            - `customer_name` string, required
            - `value` number, double, required
    - `original_plans_revenue` number, double
    - `new_plans_revenue` number, double
    - `pct_revenue_change` number, double, nullable

## Changes

- **2023-01-16** `36b48cae00a3` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/uselotus/apis/lotus-api/changes/app/backtests/:backtest_id/get.md)

---

[API](https://skmtc.dev/uselotus/apis/lotus-api.md) · [All operations](https://skmtc.dev/uselotus/apis/lotus-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/uselotus/lotus-api/revisions/36b48cae00a3/schema)
