LogBrew · Schema

SdkProductAnalyticsRetentionRequest

Bounded retention request for one owned project.

ObservabilityLoggingMonitoringAnalyticsError Tracking

Properties

Name Type Description
cohort_mode object Anchor mode; version 1 supports first-in-range cohorts only.
environment stringnull Optional exact environment filter.
interval object Fixed retention period width; defaults according to the selected query range.
interval_count integernull Number of zero-based periods to evaluate; defaults to ten.
mode object Exact-period or rolling retention; defaults to exact-period retention.
project_id string Required project scope, optional only for actionable validation.
release stringnull Optional exact release filter.
response_version integernull Optional response schema; version 2 enables automatic classified-activity analysis, and version 3 adds previous-period change and example users with or without exact selectors.
return_event object Exact event that qualifies a return after the anchor.
service_name stringnull Optional exact service filter.
since string Required inclusive lower bound, as a duration or RFC 3339 timestamp.
start_event object Exact event that anchors each subject.
until stringnull Optional exclusive RFC 3339 upper bound; defaults to request time.
View JSON Schema on GitHub

JSON Schema

logbrew-sdk-product-analytics-retention-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logbrew/json-schema/logbrew-sdk-product-analytics-retention-request-schema.json",
  "title": "SdkProductAnalyticsRetentionRequest",
  "description": "Bounded retention request for one owned project.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logbrew-product-analytics-api-openapi.yml#/components/schemas/SdkProductAnalyticsRetentionRequest",
  "additionalProperties": false,
  "properties": {
    "cohort_mode": {
      "anyOf": [
        {
          "$ref": "#/$defs/SdkProductAnalyticsRetentionCohortMode"
        },
        {
          "type": "null"
        }
      ],
      "description": "Anchor mode; version 1 supports first-in-range cohorts only."
    },
    "environment": {
      "description": "Optional exact environment filter.",
      "type": [
        "string",
        "null"
      ]
    },
    "interval": {
      "anyOf": [
        {
          "$ref": "#/$defs/SdkProductAnalyticsFixedInterval"
        },
        {
          "type": "null"
        }
      ],
      "description": "Fixed retention period width; defaults according to the selected query range."
    },
    "interval_count": {
      "description": "Number of zero-based periods to evaluate; defaults to ten.",
      "format": "uint8",
      "maximum": 255,
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "mode": {
      "anyOf": [
        {
          "$ref": "#/$defs/SdkProductAnalyticsRetentionMode"
        },
        {
          "type": "null"
        }
      ],
      "description": "Exact-period or rolling retention; defaults to exact-period retention."
    },
    "project_id": {
      "description": "Required project scope, optional only for actionable validation.",
      "format": "uuid",
      "type": "string"
    },
    "release": {
      "description": "Optional exact release filter.",
      "type": [
        "string",
        "null"
      ]
    },
    "response_version": {
      "description": "Optional response schema; version 2 enables automatic classified-activity analysis, and\nversion 3 adds previous-period change and example users with or without exact selectors.",
      "format": "uint8",
      "maximum": 255,
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "return_event": {
      "anyOf": [
        {
          "$ref": "#/$defs/SdkProductAnalyticsEventRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Exact event that qualifies a return after the anchor."
    },
    "service_name": {
      "description": "Optional exact service filter.",
      "type": [
        "string",
        "null"
      ]
    },
    "since": {
      "description": "Required inclusive lower bound, as a duration or RFC 3339 timestamp.",
      "type": "string"
    },
    "start_event": {
      "anyOf": [
        {
          "$ref": "#/$defs/SdkProductAnalyticsEventRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Exact event that anchors each subject."
    },
    "until": {
      "description": "Optional exclusive RFC 3339 upper bound; defaults to request time.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "project_id",
    "since"
  ],
  "type": "object",
  "$defs": {
    "SdkProductAnalyticsEventKind": {
      "description": "Supported version-1 classified product-event kind.",
      "oneOf": [
        {
          "const": "page_view",
          "description": "Browser route view.",
          "type": "string"
        },
        {
          "const": "screen_view",
          "description": "Application-owned screen view.",
          "type": "string"
        },
        {
          "const": "interaction",
          "description": "Explicit application product action.",
          "type": "string"
        }
      ]
    },
    "SdkProductAnalyticsEventRequest": {
      "additionalProperties": false,
      "description": "One exact classified product-event selector.",
      "properties": {
        "event_name": {
          "description": "Stable route template, screen name, or bounded action name.",
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/SdkProductAnalyticsEventKind",
          "description": "Supported classified event kind."
        }
      },
      "required": [
        "kind",
        "event_name"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsFixedInterval": {
      "description": "Fixed product-analytics period width.",
      "oneOf": [
        {
          "const": "hour",
          "description": "One hour.",
          "type": "string"
        },
        {
          "const": "day",
          "description": "One fixed 24-hour day.",
          "type": "string"
        },
        {
          "const": "week",
          "description": "One fixed seven-day week.",
          "type": "string"
        },
        {
          "const": "thirty_day",
          "description": "One fixed 30-day period; this is not a calendar month.",
          "type": "string"
        }
      ]
    },
    "SdkProductAnalyticsRetentionCohortMode": {
      "description": "How each subject receives a cohort anchor.",
      "oneOf": [
        {
          "const": "first_in_range",
          "description": "Use the subject's first matching start event inside the selected query range.",
          "type": "string"
        }
      ]
    },
    "SdkProductAnalyticsRetentionMode": {
      "description": "How a return qualifies for each requested period.",
      "oneOf": [
        {
          "const": "return_on",
          "description": "Return inside that exact subject-relative period.",
          "type": "string"
        },
        {
          "const": "return_on_or_after",
          "description": "Return at or after that period's subject-relative threshold.",
          "type": "string"
        }
      ]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/logbrew-sdk-product-analytics-retention-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.