> ## Documentation Index
> Fetch the complete documentation index at: https://docs.causeloop.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Pattern Frequency

> GET /patterns/{pattern_id}/frequency
Occurrence histogram + forecast timeseries.
window: 7d | 30d | 90d



## OpenAPI

````yaml /openapi.json get /v1/patterns/{pattern_id}/frequency
openapi: 3.1.0
info:
  description: Causeloop Platform Backend
  title: Causeloop API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/patterns/{pattern_id}/frequency:
    get:
      tags:
        - patterns
      summary: Get Pattern Frequency
      description: |-
        GET /patterns/{pattern_id}/frequency
        Occurrence histogram + forecast timeseries.
        window: 7d | 30d | 90d
      operationId: get_pattern_frequency_v1_patterns__pattern_id__frequency_get
      parameters:
        - in: path
          name: pattern_id
          required: true
          schema:
            title: Pattern Id
            type: string
        - in: query
          name: window
          required: false
          schema:
            default: 90d
            title: Window
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatternFrequencyResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    PatternFrequencyResponse:
      properties:
        axis:
          $ref: '#/components/schemas/FreqAxis'
        forecast:
          items:
            $ref: '#/components/schemas/ForecastPoint'
          title: Forecast
          type: array
        observed:
          items:
            $ref: '#/components/schemas/FrequencyObservedPoint'
          title: Observed
          type: array
        occurrences:
          items:
            $ref: '#/components/schemas/FrequencyOccurrencePoint'
          title: Occurrences
          type: array
        recurrence:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Recurrence
        window:
          title: Window
          type: string
      required:
        - window
        - occurrences
        - observed
        - forecast
        - axis
      title: PatternFrequencyResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    FreqAxis:
      properties:
        today_x:
          title: Today X
          type: number
        x_labels:
          items:
            $ref: '#/components/schemas/FreqXLabel'
          title: X Labels
          type: array
        y_labels:
          items:
            type: string
          title: Y Labels
          type: array
      required:
        - x_labels
        - y_labels
        - today_x
      title: FreqAxis
      type: object
    ForecastPoint:
      properties:
        bucket_ts:
          title: Bucket Ts
          type: string
        lower:
          title: Lower
          type: number
        upper:
          title: Upper
          type: number
        value:
          title: Value
          type: number
      required:
        - bucket_ts
        - value
        - lower
        - upper
      title: ForecastPoint
      type: object
    FrequencyObservedPoint:
      properties:
        bucket_ts:
          title: Bucket Ts
          type: string
        value:
          title: Value
          type: number
        'y':
          title: 'Y'
          type: number
      required:
        - bucket_ts
        - value
        - 'y'
      title: FrequencyObservedPoint
      type: object
    FrequencyOccurrencePoint:
      properties:
        issue_id:
          title: Issue Id
          type: string
        occurred_at:
          title: Occurred At
          type: string
      required:
        - occurred_at
        - issue_id
      title: FrequencyOccurrencePoint
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    FreqXLabel:
      properties:
        label:
          title: Label
          type: string
        x:
          title: X
          type: number
      required:
        - label
        - x
      title: FreqXLabel
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````