/** * MLflow API Request/Response Specifications * * This module defines the types and interfaces for MLflow API communication, * including request payloads and response structures for all trace-related endpoints. */ import type { TraceInfo } from '../core/entities/trace_info'; import type { SerializedTraceLocation } from '../core/entities/trace_location'; import { ArtifactCredentialType } from './artifacts/databricks'; /** * Create a new TraceInfo entity in the backend. */ export declare namespace StartTraceV3 { const getEndpoint: (host: string) => string; interface Request { trace: { trace_info: Parameters[0]; }; } interface Response { trace: { trace_info: Parameters[0]; }; } } /** * Get the TraceInfo entity for a given trace ID. */ export declare namespace GetTraceInfoV3 { const getEndpoint: (host: string, traceId: string) => string; interface Response { trace: { trace_info: Parameters[0]; }; } } /** * Search trace metadata using the V3 traces API. */ export declare namespace SearchTracesV3 { const getEndpoint: (host: string) => string; interface Request { locations: SerializedTraceLocation[]; filter?: string; max_results?: number; order_by?: string[]; page_token?: string; } interface Response { traces?: Parameters[0][]; next_page_token?: string; } } /** Create Experiment (used for testing) */ export declare namespace CreateExperiment { const getEndpoint: (host: string) => string; interface Request { name?: string; artifact_location?: string; tags?: Record; } interface Response { experiment_id: string; } } /** Get Experiment (used for UC destination auto-resolution) */ export declare namespace GetExperiment { const getEndpoint: (host: string, experimentId: string) => string; interface Response { experiment?: { experiment_id: string; name: string; artifact_location?: string; lifecycle_stage?: string; tags?: { key: string; value: string; }[]; }; } } /** Get Experiment By Name */ export declare namespace GetExperimentByName { const getEndpoint: (host: string, experimentName: string) => string; interface Response { experiment?: { experiment_id: string; name: string; }; } } /** Delete Experiment (used for testing) */ export declare namespace DeleteExperiment { const getEndpoint: (host: string) => string; interface Request { experiment_id: string; } } /** * Create trace info using the V4 API path. Used for Databricks Unity Catalog * backed traces (UC schema or UC table prefix locations). * * Endpoint: POST /api/4.0/mlflow/traces/{location}/{otel_trace_id}/info * where `{location}` is "catalog.schema" or "catalog.schema.table_prefix", * and `{otel_trace_id}` is the hex OTel trace ID (no `trace://` prefix). */ export declare namespace CreateTraceInfoV4 { const getEndpoint: (host: string, location: string, otelTraceId: string) => string; type Request = Parameters[0]; type Response = Parameters[0]; } /** * OTLP span upload endpoint for Databricks Unity Catalog backed traces. * * Endpoint: POST /api/2.0/otel/v1/traces * Required header: `X-Databricks-UC-Table-Name: ` * Content-Type: application/x-protobuf (OTLP/HTTP+protobuf); the Databricks * endpoint does not accept the OTLP/HTTP+JSON form. */ export declare namespace ExportOtlpTraces { const getEndpoint: (host: string) => string; } /** * OTLP span upload endpoint for OSS (non-Databricks) tracking servers. * * Endpoint: POST /v1/traces * Required header: `x-mlflow-experiment-id: ` * Content-Type: application/x-protobuf (OTLP/HTTP+protobuf). */ export declare namespace ExportOtlpTracesOss { const getEndpoint: (host: string) => string; } /** * Get credentials for uploading trace data to the artifact store. Only used for Databricks. */ export declare namespace GetCredentialsForTraceDataUpload { const getEndpoint: (host: string, traceId: string) => string; interface Response { credential_info: { type: ArtifactCredentialType; signed_uri: string; }; } } /** * Get credentials for downloading trace data from the artifact store. Only used for Databricks. */ export declare namespace GetCredentialsForTraceDataDownload { const getEndpoint: (host: string, traceId: string) => string; interface Response { credential_info: { type: ArtifactCredentialType; signed_uri: string; }; } }