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

# Analyze drift



## OpenAPI

````yaml /api-specs/cloud/dmm.json post /model-monitor/v2/api/model/{model_id}/analyse-drift
openapi: 3.0.3
info:
  description: The API for programmatic access to Domino Model Monitor.
  title: Domino Model Monitor API
  version: 1.0.1
servers:
  - description: >-
      Replace 'mycluster.domino.tech' with your Domino cluster hostname. For
      Domino Cloud customers, that is `your-subdomain`.domino.tech (e.g.,
      acme.domino.tech). For self-hosted deployments, it is the hostname you
      reach the Domino UI at.
    url: https://mycluster.domino.tech
security: []
tags:
  - description: All Dataset Job related operations.
    name: DatasetJob
  - description: All data source related operations.
    name: DataSource
  - description: All Model related operations.
    name: Model
  - description: Operations related to the management of model tags.
    name: ModelTag
  - description: All Model drift related operations.
    name: ModelDrift
  - description: All Model quality related operations.
    name: ModelQuality
  - description: All Workbench related operations.
    name: Workbench
  - description: Operations related to drift and model quality defaults setting in DMM.
    name: DefaultSettings
  - description: Operations related to configuring user related settings for DMM.
    name: UserSettings
  - description: >-
      Operations related to configuring notification channel config and alert
      recipients for the model.
    name: Notification
  - description: Other miscellaneous operations.
    name: Other
  - description: All scheduler related operations
    name: Scheduler
paths:
  /model-monitor/v2/api/model/{model_id}/analyse-drift:
    summary: >
      Returns drift analysis for the model based on the user's config (or
      model's scheduler config). The endpoint is behind the old backend's auth
      mechanism.
    parameters:
      - description: Identifier for the model to be updated.
        in: path
        name: model_id
        required: true
        schema:
          type: string
    post:
      tags:
        - ModelDrift
      summary: Analyze drift
      operationId: analyzeDrift
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/driftAnalyzeRequest'
        description: ''
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/driftAnalyzeResponse'
          description: The drift analyze query was done successfully.
        '204':
          description: Empty response.
        '400':
          description: Bad request input data.
        '403':
          description: Forbidden. The endpoint enforces permissions.
        '500':
          description: Internal server error, check server logs.
      security:
        - DominoApiKeyAuth: []
        - DmmApiKeyAuth: []
        - cookieAuth: []
        - BearerAuth: []
components:
  schemas:
    driftAnalyzeRequest:
      properties:
        config:
          items:
            $ref: '#/components/schemas/featureQuery'
          type: array
        endDate:
          nullable: true
          type: number
        modelId:
          type: string
        pagination:
          $ref: '#/components/schemas/pagination'
        searchQuery:
          type: string
        startDate:
          nullable: true
          type: number
      type: object
    driftAnalyzeResponse:
      properties:
        calculatedOn:
          description: Timestamp of time when the query was performed.
          title: Query Time
          type: number
        end:
          description: End time for the data used for the query.
          title: End Time Period
          type: number
        features:
          description: Drift calculations for selected columns for the query.
          items:
            $ref: '#/components/schemas/driftCalculations'
          title: Feature Drifts
          type: array
        pagination:
          $ref: '#/components/schemas/pagination'
        records:
          description: Number of records (rows) used for the query.
          properties:
            prediction:
              description: Number of records of prediction data used for the query.
              title: Prediction Records
              type: number
            training:
              description: Number of records of training data used for the query.
              title: Training Records
              type: number
          required:
            - training
            - prediction
          title: Record Count
          type: object
        start:
          description: Start time for the data used for the query.
          title: Start Time Period
          type: number
        totalCount:
          type: number
      required:
        - calculatedOn
        - start
        - end
        - records
        - features
        - totalCount
        - pagination
      type: object
    featureQuery:
      description: Query config for a feature in a model
      properties:
        alertable:
          description: Whether this feature is alertable for not
          title: Alertable
          type: boolean
        algorithm:
          description: Algorithm function used for the check query
          title: Algorithm
          type: string
        condition:
          $ref: '#/components/schemas/alertCondition'
        id:
          description: Identifier of the feature in a model
          title: Feature Identifier
          type: string
        name:
          description: Name for the model feature
          title: Feature Name
          type: string
        type:
          description: Type of the feature - feature, prediction, row identifier, timestamp
          title: Feature Type
          type: string
        value:
          description: Type of the feature value - categorical or numerical
          title: Feature Value Type
          type: string
      required:
        - id
        - name
        - type
        - value
        - alertable
        - algorithm
        - condition
      title: Feature Query
      type: object
    pagination:
      properties:
        pageNumber:
          type: integer
        pageSize:
          type: integer
        sortOn:
          enum:
            - column_name
            - divergence
            - model_column_id
            - feature_importance
            - created_on
            - created_at
            - updated_at
          type: string
        sortOrder:
          type: integer
      required:
        - pageSize
        - pageNumber
        - sortOrder
        - sortOn
      type: object
    driftCalculations:
      description: Drift calculations for a column for the given time query.
      properties:
        alertable:
          description: >-
            Boolean to suggest whether this feature is enabled for scheduled
            alerts.
          title: Alertable
          type: boolean
        algorithm:
          description: Algorithm function used for the check query
          title: Algorithm
          type: string
        columnType:
          description: Column type for column
          enum:
            - prediction
            - feature
          title: Column Type
          type: string
        condition:
          $ref: '#/components/schemas/alertCondition'
        drift:
          description: Feature's calculated drift for the requested query.
          nullable: true
          title: Feature Drift
          type: number
        driftTrends:
          description: Drift values for time periods representing the drift trend.
          items:
            items:
              type: number
            type: array
          title: Drift Trends
          type: array
        drifted:
          description: >-
            Boolean to suggest whether the feature has drifted for the input
            query.
          nullable: true
          title: Feature Drifted
          type: boolean
        error:
          description: Error occurred during computing for a feature
          nullable: true
          title: Calculation Error
          type: string
        id:
          description: Feature's unique identifier
          title: Identifier
          type: string
        importance:
          description: Custom feature importance value used during the model registration.
          nullable: true
          title: Feature Importance
          type: number
        name:
          description: Column's name used during model registration.
          title: Column Name
          type: string
        pValue:
          description: Feature's calculated p-value for the requested query.
          nullable: true
          title: Feature p-Value
          type: number
        prediction:
          $ref: '#/components/schemas/distribution'
        training:
          $ref: '#/components/schemas/distribution'
        valueType:
          description: Algorithm function used for the check query
          enum:
            - numerical
            - categorical
          title: Feature Type
          type: string
      required:
        - id
        - name
        - alertable
        - driftTrends
        - condition
        - algorithm
        - columnType
        - valueType
      title: Drift Calculation
      type: object
    alertCondition:
      description: Condition at which alert is triggered
      properties:
        lower:
          description: The lower bound for the condition
          title: Lower Bound
          type: number
        operator:
          description: The math operator for the condition, like < or <=.
          title: Math Operator
          type: string
        upper:
          description: The upper bound for the condition
          title: Upper Bound
          type: number
      required:
        - operator
        - lower
        - upper
      title: Alert Condition
      type: object
    distribution:
      nullable: true
      properties:
        binValues:
          default: []
          description: >-
            The "bin" for a statistical distribution. May be numerical or
            categorical.
          items:
            type: string
          type: array
        counts:
          description: An array of counts representing the bin distribution in the data.
          items:
            type: integer
          type: array
        normalizedValues:
          default: []
          description: >-
            Normalized form, or proportional representation, of "counts" in the
            data
          items:
            type: number
          type: array
      type: object
  securitySchemes:
    DominoApiKeyAuth:
      in: header
      name: X-Domino-Api-Key
      type: apiKey
    DmmApiKeyAuth:
      in: header
      name: X-DMM-API-KEY
      type: apiKey
    cookieAuth:
      in: cookie
      name: PLAY_SESSION
      type: apiKey
    BearerAuth:
      scheme: bearer
      type: http

````

## Related topics

- [Analyze data drift](/cloud/platform-capabilities/features/monitoring/5-use-monitoring/3-analyze-data-drift.md)
- [Drift detection for monitored models](/cloud/platform-capabilities/features/monitoring/4-set-up-model-monitor/4-set-up-drift-detection-mm.md)
- [Analyze model quality](/cloud/platform-capabilities/features/monitoring/5-use-monitoring/4-analyze-model-quality.md)
- [Data drift and quality monitoring](/cloud/platform-capabilities/features/monitoring/2-data-drift-and-model-quality.md)
