> ## 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.

# 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.



## OpenAPI

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

````