MATIH Platform is in active MVP development. Documentation reflects current implementation status.
13. ML Service & MLOps
Experiment Tracking
API Reference

Experiments API Reference

Complete REST API reference for the experiment tracking endpoints at /api/v1/experiments.


Endpoints Summary

MethodPathDescription
POST/experimentsCreate a new experiment
GET/experimentsList experiments with filtering
GET/experiments/:idGet experiment by ID
PATCH/experiments/:idUpdate experiment metadata
DELETE/experiments/:idSoft-delete (archive) experiment
POST/experiments/:id/restoreRestore archived experiment
POST/experiments/runsCreate a new run
GET/experiments/runsList runs in an experiment
GET/experiments/runs/:idGet run by ID
POST/experiments/runs/:id/log-metricsLog metrics to run
POST/experiments/runs/:id/log-paramsLog parameters to run
POST/experiments/runs/:id/log-batchBatch log metrics/params/tags
POST/experiments/runs/:id/log-artifactUpload artifact file
POST/experiments/runs/:id/endEnd a run
POST/experiments/runs/compareCompare multiple runs

POST /experiments

Create a new experiment.

Request Body:

{
  "name": "string (required, 1-255 chars)",
  "description": "string (optional, max 1000 chars)",
  "artifact_location": "string (optional, S3 URI)",
  "tags": {"key": "value"}
}

Response: 201 Created with ExperimentResponse


GET /experiments

List experiments with filtering.

Query Parameters:

ParameterTypeDefaultDescription
searchstringnullSearch by name (case-insensitive)
lifecycle_stagestringactiveFilter: active or deleted
limitint100Max results (1-1000)
offsetint0Pagination offset

Response: 200 OK with ExperimentListResponse


POST /experiments/runs

Create a new run within an experiment.

Request Body:

{
  "experiment_id": "string (required)",
  "name": "string (optional)",
  "description": "string (optional)",
  "tags": {"key": "value"}
}

Response: 201 Created with RunResponse


POST /experiments/runs/:run_id/log-metrics

Log metrics to a run.

Request Body:

{
  "metrics": {"metric_name": 0.95},
  "step": 10,
  "timestamp": 1707723600000
}

Response: 200 OK


POST /experiments/runs/:run_id/log-batch

Batch log metrics, parameters, and tags.

Request Body:

{
  "metrics": [{"key": "loss", "value": 0.34, "step": 1}],
  "params": [{"key": "lr", "value": "0.01"}],
  "tags": [{"key": "type", "value": "baseline"}]
}

Response: 200 OK with counts of logged items


POST /experiments/runs/:run_id/log-artifact

Upload an artifact file (multipart form).

Parameters:

ParameterTypeDescription
fileFile (required)The artifact file
artifact_pathstring (query)Subdirectory within artifacts

Response: 200 OK


POST /experiments/runs/compare

Compare multiple runs.

Request Body:

{
  "run_ids": ["id1", "id2", "id3"],
  "metrics": ["val_accuracy", "val_loss"]
}

Constraints: 2-10 run IDs

Response: 200 OK with CompareRunsResponse


Error Codes

StatusMeaning
400Invalid request parameters
403Tenant access denied
404Experiment or run not found
500Internal server error

Source Files

FilePath
Experiments Routerdata-plane/ml-service/src/api/experiments.py