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

# End trace

> End trace.



## OpenAPI

````yaml /api-specs/cloud/public-api.json patch /api/2.0/mlflow/traces/{trace_id}
openapi: 3.0.3
info:
  title: Domino Public API
  description: Reference for Domino's public REST API endpoints.
  version: 6.4.0
  x-catalog-key: nucleus
servers:
  - url: https://mycluster.domino.tech
    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.
security: []
tags:
  - name: Projects
  - name: Project templates
  - name: Workspaces
  - name: Jobs
  - name: HPC Jobs
  - name: Environments
  - name: Hardware Tiers
  - name: Datasets
  - name: Data Sources
  - name: GenAI
  - name: AI Systems
  - name: MLflow experiments and runs
  - name: MLflow models
  - name: MLflow artifacts
  - name: MLflow traces
  - name: Apps
  - name: App versions
  - name: App instances
  - name: Model APIs
  - name: Registered models
  - name: Model deployment
  - name: Extensions
  - name: Cost and billing
  - name: Users and organizations
  - name: Service accounts
  - name: Personal Access Tokens
  - name: Personal Access Tokens (admin)
  - name: Audit Trail
  - name: Custom metrics
  - name: PPM
  - name: Model Monitoring models
  - name: Model Monitoring drift and quality
  - name: Model Monitoring settings
  - name: Model Monitoring authentication
  - name: Governance bundles
  - name: Governance policies
  - name: Governance evidence and results
  - name: Governance operations
  - name: NetApp Volumes
  - name: NetApp Volumes snapshots
  - name: NetApp Volumes filesystems
  - name: NetApp Volumes transfers
  - name: Tags
  - name: Properties
externalDocs:
  description: OpenAPI
  url: https://swagger.io/resources/open-api/
paths:
  /api/2.0/mlflow/traces/{trace_id}:
    patch:
      tags:
        - MLflow traces
      description: End trace.
      operationId: traces.End
      parameters:
        - in: path
          name: trace_id
          schema:
            type: string
          required: true
          description: ID of the trace to retrieve.
          example: trace-12345-abcde
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/mlflow-proxy_EndTraceRequest'
      responses:
        '200':
          description: The updated trace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/mlflow-proxy_EndTraceResponse'
        default:
          $ref: '#/components/responses/mlflow-proxy_MLflowNativeError'
components:
  schemas:
    mlflow-proxy_EndTraceRequest:
      properties:
        request_id:
          description: Unique identifier for the trace.
          type: string
        timestamp_ms:
          description: Unix timestamp of when the trace ended in milliseconds.
          oneOf:
            - format: int64
              type: integer
            - type: string
        status:
          $ref: '#/components/schemas/mlflow-proxy_TraceStatus'
        request_metadata:
          description: Other trace metadata.
          type: array
          items:
            $ref: '#/components/schemas/mlflow-proxy_Tag'
        tags:
          description: Tags for the trace.
          type: array
          items:
            $ref: '#/components/schemas/mlflow-proxy_Tag'
      required:
        - request_id
        - timestamp_ms
        - status
        - request_metadata
        - tags
      type: object
    mlflow-proxy_EndTraceResponse:
      properties:
        trace_info:
          $ref: '#/components/schemas/mlflow-proxy_TraceInfo'
      required:
        - trace_info
      type: object
    mlflow-proxy_TraceStatus:
      description: Status of the operation being traced.
      type: string
      enum:
        - TRACE_STATUS_UNSPECIFIED
        - OK
        - ERROR
        - IN_PROGRESS
    mlflow-proxy_Tag:
      properties:
        key:
          description: >-
            Name of the tag. Maximum size depends on storage backend.

            If a tag with this name already exists, its preexisting value will
            be replaced by the specified value. All storage backends are
            guaranteed to support key values up to 250 bytes in size. This field
            is required.
          type: string
        value:
          description: >-
            String value of the tag being logged. Maximum size depends on
            storage backend.

            All storage backends are guaranteed to support key values up to 5000
            bytes in size. This field is required.
          type: string
      required:
        - key
        - value
      type: object
    mlflow-proxy_TraceInfo:
      properties:
        request_id:
          description: Unique identifier for the trace.
          type: string
        experiment_id:
          description: The ID of the experiment that contains the trace.
          type: string
        timestamp_ms:
          description: Unix timestamp of when the trace started in milliseconds.
          oneOf:
            - format: int64
              type: integer
            - type: string
        execution_time_ms:
          description: Unix timestamp of the duration of the trace in milliseconds.
          oneOf:
            - format: int64
              type: integer
            - type: string
        status:
          $ref: '#/components/schemas/mlflow-proxy_TraceStatus'
        request_metadata:
          description: Other trace metadata.
          type: array
          items:
            $ref: '#/components/schemas/mlflow-proxy_Tag'
        tags:
          description: Tags for the trace.
          type: array
          items:
            $ref: '#/components/schemas/mlflow-proxy_Tag'
      required:
        - request_id
        - experiment_id
        - execution_time_ms
        - status
        - request_metadata
        - tags
      type: object
    mlflow-proxy_ErrorResponse:
      properties:
        error_code:
          $ref: '#/components/schemas/mlflow-proxy_ErrorCode'
        message:
          description: Error message
          type: string
      required:
        - error_code
        - message
      type: object
    mlflow-proxy_ErrorCode:
      description: Error code
      enum:
        - INTERNAL_ERROR
        - INVALID_STATE
        - DATA_LOSS
        - NOT_IMPLEMENTED
        - TEMPORARILY_UNAVAILABLE
        - DEADLINE_EXCEEDED
        - CANCELLED
        - RESOURCE_EXHAUSTED
        - REQUEST_LIMIT_EXCEEDED
        - ABORTED
        - RESOURCE_CONFLICT
        - ALREADY_EXISTS
        - NOT_FOUND
        - ENDPOINT_NOT_FOUND
        - RESOURCE_DOES_NOT_EXIST
        - PERMISSION_DENIED
        - CUSTOMER_UNAUTHORIZED
        - UNAUTHENTICATED
        - BAD_REQUEST
        - RESOURCE_ALREADY_EXISTS
        - INVALID_PARAMETER_VALUE
      type: string
  responses:
    mlflow-proxy_MLflowNativeError:
      description: The client issued a bad request to the server
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/mlflow-proxy_ErrorResponse'

````

## Related topics

- [The python-domino library](/cloud/reference/python-sdk/python-domino.md)
- [Search traces](/api-reference/mlflow-traces/search-traces.md)
- [List traces](/api-reference/ai-systems/list-traces.md)
- [API reference for the Agents Python SDK](/cloud/reference/experiment-agent-sdk/python-sdk-agents.md)
