---
title: "GET /api/metric_access/"
method: GET
path: "/api/metric_access/"
tags: ["api"]
---

# GET /api/metric_access/

`GET /api/metric_access/`

## Query parameters

- `customer_id` string, nullable, required
- `metric_id` string, uuid, required
- `subscription_filters` SubscriptionFilterRequest[]
  - `value` string, required
  - `property_name` string, required — The string name of the property to filter on. Example: 'product_id'

## Response `200`

- MetricAccessResponse
  - `customer` LightweightCustomer, required
    - `customer_name` string, nullable, required — The display name of the customer
    - `email` string, email, nullable, required — The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider
    - `customer_id` string, nullable, required — The id provided when creating the customer, we suggest matching with your internal customer id in your backend
  - `access` boolean, required — Whether or not the customer has access to this metric. The default behavior for this is whether all of the customer's plans (that have access to the metric) are below the total limit of the metric. If you have specified subscription filters, then this will be whether all of the customer's plans that match the subscription filters are below the total limit of the metric. You can customize the behavior of this flag by setting a policy in your Organization settings in the frontend.
  - `metric` LightweightMetric, required
    - `metric_id` string, required
    - `event_name` string, required — Name of the event that this metric is tracking.
    - `metric_name` string, required
  - `access_per_subscription` MetricAccessPerSubscription[], required
    - `subscription` AccessMethodsSubscriptionRecord, required
      - `start_date` string, date-time, required — The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
      - `end_date` string, date-time, required — The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
      - `subscription_filters` SubscriptionFilter[], required
        - `value` string, required
        - `property_name` string, required — The string name of the property to filter on. Example: 'product_id'
      - `plan` LightweightPlanVersion, required
        - `plan_name` string, required
        - `plan_id` string, required
        - `version_id` string, required
        - `version` union, required
          - integer
          - 'custom_version'
    - `metric_usage` number, double, required — The current usage of the metric. Keep in mind the current usage of the metric can be different from the billable usage of the metric. For examnple, for a gauge metric, the `metric_usage` is the current value of the gauge, while the billable usage is the accumulated tiem at each gauge level at the end of the subscription.
    - `metric_free_limit` number, double, nullable, required — If you specified a free tier of usage for this metric, this is the amount of usage that is free. Will be 0 if you didn't specify a free limit for this metric or this subscription doesn't have access to this metric, and null if the free tier is unlimited.
    - `metric_total_limit` number, double, nullable, required — The total limit of the metric. Will be 0 if this subscription doesn't have access to this metric, and null if there is no limit to this metric.

---

[API](https://skmtc.net/uselotus/apis/lotus-api.md) · [All operations](https://skmtc.net/uselotus/apis/lotus-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/uselotus/lotus-api/versions/1f59f4fea13f/schema)
