> ## Documentation Index
> Fetch the complete documentation index at: https://lightdash-mintlify-9d6f9427.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get pre-aggregate materializations

> Retrieves pre-aggregate definitions with their latest materialization status



## OpenAPI

````yaml https://raw.githubusercontent.com/lightdash/lightdash/refs/heads/main/packages/backend/src/generated/swagger.json get /api/v2/projects/{projectUuid}/pre-aggregates/materializations
openapi: 3.0.0
info:
  title: Lightdash API
  version: 0.3249.0
  description: >
    Open API documentation for all public Lightdash API endpoints. #
    Authentication Before you get started, you might need to create a Personal
    Access Token to authenticate via the API. You can create a token by
    following this guide: https://docs.lightdash.com/references/personal_tokens
  license:
    name: MIT
  contact:
    name: Lightdash Support
    email: support@lightdash.com
    url: https://docs.lightdash.com/help-and-contact/contact/contact_info/
servers:
  - url: /
security: []
tags:
  - name: My Account
    description: These routes allow users to manage their own user account.
  - name: Organizations
    description: >-
      Each user is a member of a single organization. These routes allow users
      to manage their organization. Most actions are only available to admin
      users.
  - name: Projects
    description: >-
      Projects belong to a single organization. These routes allow users to
      manage their projects, browse content, and execute queries. Users inside
      an organization might have access to a project from an organization-level
      role or they might be granted access to a project directly.
  - name: Spaces
    description: >-
      Spaces allow you to organize charts and dashboards within a project. They
      also allow granular access to content by allowing you to create private
      spaces, which are only accessible to the creator and admins.
  - name: Roles & Permissions
    description: >-
      These routes allow users to manage roles and permissions for their
      organization.
    externalDocs:
      url: https://docs.lightdash.com/references/roles
  - name: Query
    description: >-
      These routes allow users to execute and manage queries against their data
      warehouse. This includes metric queries, SQL queries, and retrieving query
      results.
paths:
  /api/v2/projects/{projectUuid}/pre-aggregates/materializations:
    get:
      tags:
        - v2
        - Pre-Aggregates
      summary: Get pre-aggregate materializations
      description: >-
        Retrieves pre-aggregate definitions with their latest materialization
        status
      operationId: getPreAggregateMaterializations
      parameters:
        - in: path
          name: projectUuid
          required: true
          schema:
            type: string
        - in: query
          name: page
          required: false
          schema:
            type: number
            format: double
        - in: query
          name: pageSize
          required: false
          schema:
            type: number
            format: double
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiGetPreAggregateMaterializationsResponse
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      security: []
components:
  schemas:
    ApiGetPreAggregateMaterializationsResponse:
      properties:
        results:
          $ref: >-
            #/components/schemas/KnexPaginatedData_ApiPreAggregateMaterializationsResults_
        status:
          type: string
          enum:
            - ok
          nullable: false
      required:
        - results
        - status
      type: object
    ApiErrorPayload:
      properties:
        error:
          properties:
            data:
              $ref: '#/components/schemas/AnyType'
              description: Optional data containing details of the error
            message:
              type: string
              description: A friendly message summarising the error
            name:
              type: string
              description: Unique name for the type of error
            statusCode:
              type: number
              format: integer
              description: HTTP status code
          required:
            - name
            - statusCode
          type: object
        status:
          type: string
          enum:
            - error
          nullable: false
      required:
        - error
        - status
      type: object
      description: |-
        The Error object is returned from the api any time there is an error.
        The message contains
    KnexPaginatedData_ApiPreAggregateMaterializationsResults_:
      properties:
        pagination:
          allOf:
            - $ref: '#/components/schemas/KnexPaginateArgs'
            - properties:
                totalResults:
                  type: number
                  format: double
                totalPageCount:
                  type: number
                  format: double
              required:
                - totalResults
                - totalPageCount
              type: object
        data:
          $ref: '#/components/schemas/ApiPreAggregateMaterializationsResults'
      required:
        - data
      type: object
    AnyType:
      description: |-
        This AnyType is an alias for any
        The goal is to make it easier to identify any type in the codebase
        without having to eslint-disable all the time
        These are only used on legacy `any` types, don't use it for new types.
        This is added on a separate file to avoid circular dependencies.
    KnexPaginateArgs:
      properties:
        page:
          type: number
          format: double
        pageSize:
          type: number
          format: double
      required:
        - page
        - pageSize
      type: object
    ApiPreAggregateMaterializationsResults:
      properties:
        materializations:
          items:
            $ref: '#/components/schemas/PreAggregateMaterializationSummary'
          type: array
      required:
        - materializations
      type: object
    PreAggregateMaterializationSummary:
      properties:
        materialization:
          properties:
            trigger:
              $ref: '#/components/schemas/PreAggregateMaterializationTrigger'
            errorMessage:
              type: string
              nullable: true
            totalBytes:
              type: number
              format: double
              nullable: true
            columns:
              allOf:
                - $ref: '#/components/schemas/ResultColumns'
              nullable: true
            rowCount:
              type: number
              format: double
              nullable: true
            durationMs:
              type: number
              format: double
              nullable: true
            materializedAt:
              type: string
              format: date-time
              nullable: true
            status:
              $ref: '#/components/schemas/PreAggregateMaterializationStatus'
            materializationUuid:
              type: string
          required:
            - trigger
            - errorMessage
            - totalBytes
            - columns
            - rowCount
            - durationMs
            - materializedAt
            - status
            - materializationUuid
          type: object
          nullable: true
        warnings:
          items:
            $ref: '#/components/schemas/PreAggregateMaterializationWarning'
          type: array
        resolvedMaxRows:
          type: number
          format: double
          nullable: true
        definitionError:
          type: string
          nullable: true
        refreshCron:
          type: string
          nullable: true
        granularity:
          allOf:
            - $ref: '#/components/schemas/TimeFrames'
          nullable: true
        timeDimension:
          type: string
          nullable: true
        filters:
          items:
            $ref: '#/components/schemas/MetricFilterRule'
          type: array
        metrics:
          items:
            type: string
          type: array
        dimensions:
          items:
            type: string
          type: array
        materializationRole:
          allOf:
            - $ref: '#/components/schemas/PreAggregateMaterializationRole'
          nullable: true
        sourceExploreName:
          type: string
        preAggExploreName:
          type: string
        preAggregateName:
          type: string
        preAggregateDefinitionUuid:
          type: string
      required:
        - materialization
        - warnings
        - resolvedMaxRows
        - definitionError
        - refreshCron
        - granularity
        - timeDimension
        - filters
        - metrics
        - dimensions
        - materializationRole
        - sourceExploreName
        - preAggExploreName
        - preAggregateName
        - preAggregateDefinitionUuid
      type: object
    PreAggregateMaterializationTrigger:
      type: string
      enum:
        - compile
        - cron
        - manual
        - webhook
    ResultColumns:
      $ref: '#/components/schemas/Record_string.ResultColumn_'
    PreAggregateMaterializationStatus:
      type: string
      enum:
        - in_progress
        - active
        - superseded
        - failed
    PreAggregateMaterializationWarning:
      anyOf:
        - properties:
            threshold:
              type: number
              format: double
            rowCount:
              type: number
              format: double
            message:
              type: string
            type:
              type: string
              enum:
                - row_count_exceeded
              nullable: false
          required:
            - threshold
            - rowCount
            - message
            - type
          type: object
        - properties:
            maxRows:
              type: number
              format: double
            message:
              type: string
            type:
              type: string
              enum:
                - max_rows_applied
              nullable: false
          required:
            - maxRows
            - message
            - type
          type: object
    TimeFrames:
      enum:
        - RAW
        - YEAR
        - QUARTER
        - MONTH
        - WEEK
        - DAY
        - HOUR
        - MINUTE
        - SECOND
        - MILLISECOND
        - DAY_OF_WEEK_INDEX
        - DAY_OF_MONTH_NUM
        - DAY_OF_YEAR_NUM
        - WEEK_NUM
        - MONTH_NUM
        - QUARTER_NUM
        - YEAR_NUM
        - DAY_OF_WEEK_NAME
        - MONTH_NAME
        - QUARTER_NAME
        - HOUR_OF_DAY_NUM
        - MINUTE_OF_HOUR_NUM
      type: string
    MetricFilterRule:
      description: Filter rule for metrics, targeting fields by reference
      properties:
        values:
          items:
            $ref: '#/components/schemas/AnyType'
          type: array
          description: Values to filter by
        operator:
          $ref: '#/components/schemas/FilterOperator'
          description: Filter operator
        id:
          type: string
          description: Unique identifier for the filter
        target:
          properties:
            fieldRef:
              type: string
              description: Field reference to filter on (e.g., 'table_name.field_name')
          required:
            - fieldRef
          type: object
          description: Target field for the filter
        settings:
          $ref: '#/components/schemas/AnyType'
          description: Additional settings for date/time filters
        disabled:
          type: boolean
          description: Whether this filter is disabled
        required:
          type: boolean
          description: Whether this filter is required
        caseSensitive:
          type: boolean
          description: >-
            Overrides the field/explore case-sensitivity for this rule only.

            Used by internal features like autocomplete search that must always

            match case-insensitively regardless of the field's configured
            setting.
      required:
        - operator
        - id
        - target
      type: object
      additionalProperties: true
    PreAggregateMaterializationRole:
      properties:
        attributes:
          $ref: '#/components/schemas/UserAttributeValueMap'
        email:
          type: string
      required:
        - attributes
        - email
      type: object
    Record_string.ResultColumn_:
      properties: {}
      additionalProperties:
        $ref: '#/components/schemas/ResultColumn'
      type: object
      description: Construct a type with a set of properties K of type T
    FilterOperator:
      enum:
        - isNull
        - notNull
        - equals
        - notEquals
        - startsWith
        - endsWith
        - include
        - doesNotInclude
        - lessThan
        - lessThanOrEqual
        - greaterThan
        - greaterThanOrEqual
        - inThePast
        - notInThePast
        - inTheNext
        - inTheCurrent
        - notInTheCurrent
        - inBetween
        - notInBetween
        - inPeriodToDate
      type: string
    UserAttributeValueMap:
      $ref: '#/components/schemas/Record_string.string-Array_'
    ResultColumn:
      properties:
        type:
          $ref: '#/components/schemas/DimensionType'
        reference:
          type: string
      required:
        - type
        - reference
      type: object
    Record_string.string-Array_:
      properties: {}
      additionalProperties:
        items:
          type: string
        type: array
      type: object
      description: Construct a type with a set of properties K of type T
    DimensionType:
      enum:
        - string
        - number
        - timestamp
        - date
        - boolean
      type: string

````