canonical: https://jentic.com/apis/azure.com/run-history-apis

# Microsoft Azure Run History APIs

Jentic publishes the only available OpenAPI specification for the Azure Machine Learning Run History APIs, keeping it validated and agent-ready. The Run History service tracks experiments, runs, metrics, artifacts, events, and tags inside an Azure Machine Learning workspace, giving teams a queryable record of every training and evaluation execution. Agents can query runs by tag or experiment, log metrics in batches, list run children for hierarchical workflows, and fetch artifact metadata for downstream packaging or serving. It is the system of record behind Azure ML experiment tracking.

## For AI agents

Query Azure Machine Learning experiments, runs, metrics, artifacts, and events to reconstruct training history and feed downstream model promotion workflows.

## Scope

Does not train models, deploy scoring endpoints, or manage compute clusters - use for tracking and querying ML experiments, runs, metrics, and artifacts only.

## Capabilities

- Query runs across an experiment by tags, status, or time window
- Log batches of metrics or events to an in-progress run
- List the artifact tree produced by a run including content URIs
- Inspect run details and child runs for hyperparameter search hierarchies
- Update tags on experiments and runs to drive promotion workflows
- Delete experiment ids that are no longer needed in the workspace

## Use cases

### Experiment Tracking and Run Comparison

Data science teams query the Run History API to compare metrics across runs of an experiment when picking a model to promote. The runs:query endpoint returns matching runs filtered by tag or status, and the metrics endpoints return per-run scalar values. This is the backbone of any model leaderboard built on top of Azure ML.

Example prompt: POST runs:query for experiment churn-baseline filtered by status=Completed and return the runId and final accuracy metric for each match

### Streaming Metric and Event Logging

Training jobs send metric and event batches back to the Run History service while running. The batch endpoints accept arrays of metric and event objects so a long training loop can flush them periodically without one-call-per-step overhead. This keeps the experiment timeline up to date without saturating the control plane.

Example prompt: POST a batch of 50 metric records and 10 event records to runs/{runId}/batch/metrics for the active training run

### Artifact Discovery for Model Promotion

When promoting a trained model from a winning run, the agent needs the full artifact tree the run produced - typically the model file, evaluation report, and signature. The artifacts endpoints list paths, content URIs, and metadata so the agent can copy the right files into the registry without scanning the workspace blob store directly.

Example prompt: GET runs/{runId}/artifacts and then GET artifacts/contentinfo for each artifact path to retrieve the SAS URLs for downloading

### Agent-Driven Run Triage via Jentic

Through Jentic, an MLOps agent can search for query azure ml runs, load the runs:query input schema, execute it with experiment and tag filters, then iterate to fetch metrics for the top runs. The Azure OAuth token is managed by Jentic, so the agent never holds a workspace credential directly.

Example prompt: Search Jentic for query azure ml runs, load the runs:query schema, execute it for experiment churn-baseline filtered by tag promote=candidate, then call client.execute on the metrics endpoint for each returned runId

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /history/v1.0/.../experiments/{experimentName}/runs:query | Query runs by filter |
| GET | /history/v1.0/.../experiments/{experimentName}/runs/{runId} | Get a single run |
| GET | /history/v1.0/.../experiments/{experimentName}/runs/{runId}/metrics | List metrics for a run |
| POST | /history/v1.0/.../experiments/{experimentName}/runs/{runId}/batch/metrics | Log metrics in batch |
| GET | /history/v1.0/.../experiments/{experimentName}/runs/{runId}/artifacts | List artifacts produced by a run |
| GET | /history/v1.0/.../experiments/{experimentName}/runs/{runId}/children | List child runs |

## Key resources

- **Experiments** — List, query, and tag experiments inside an Azure ML workspace
- **Runs** — Query runs, fetch details, list children, and update tags for individual training executions
- **Metrics** — Log and query scalar metrics produced by runs
- **Artifacts** — List and resolve content URIs for files produced by a run
- **Events** — Log lifecycle events such as start, fail, and complete to runs

## Why Jentic

- **Setup:** Wiring the Azure ML Run History APIs by hand means registering an Azure AD app, running the OAuth2 azure_auth token exchange for the Azure ML audience, and constructing the deeply nested workspace path and batch metric payloads yourself. Through Jentic you install once, import Run History APIs from the API Directory, store the Azure service principal credential once, and your agent calls it.
- **Permission scoping:** Run History puts the experiment and run identifiers in the URL path (.../experiments/{experimentName}/runs/{runId}/...), so a rule can pin your agent to reading and logging within a given experiment. You choose the operations it may call, so destructive ones like deleting an experiment are not included unless you add them.
- **Credential handling:** Your Azure service principal credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'query Azure ML runs by experiment' or 'log training metrics in batch', and Jentic returns the matching Run History operation with its input schema, including the nested workspace and experiment path parameters.

## Related APIs

- **Azure ML Web Services Management Client** — Deploys models trained in runs as scoring web services
- **Azure ML Team Account Management Client** — Manages workspaces and team accounts that own these experiments
- **Azure ML Commitment Plans** — Controls capacity and pricing for ML workloads

## FAQ

### Why is there no official OpenAPI spec for the Run History APIs?

Microsoft Azure does not publish a unified OpenAPI specification for the Azure Machine Learning Run History service. Jentic generates and maintains this spec so that AI agents and developers can call Run History via structured tooling. It is validated against the live Azure ML API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Run History API use?

It uses Azure Active Directory OAuth 2.0 via the azure_auth flow defined in the spec. Acquire a bearer token for the Azure ML service audience and pass it as Authorization: Bearer. Jentic stores the underlying service principal in its vault so the agent only sees a scoped token.

### Can I query runs by tag with the Run History API?

Yes. POST to .../experiments/{experimentName}/runs:query with a filter expression that matches tag keys and values. The response is a paginated list of run objects including runId, status, and metrics references.

### How do I log metrics from a long-running training job?

Use the batch endpoint POST .../runs/{runId}/batch/metrics with an array of metric records. Batching avoids one-call-per-step overhead and keeps the experiment timeline current. Events follow the same pattern at /batch/events.

### What are the rate limits for the Run History API?

Azure ML applies workspace-scoped throttling. Heavy ingestion of metrics and events is expected to use the batch endpoints. Throttled requests return HTTP 429 with a Retry-After header. For sustained logging, batch sizes of 50-100 records per call are typical.

### How do I fetch artifact URIs through Jentic?

Search Jentic for list azure ml run artifacts, load the GET artifacts schema, and execute it for the target runId. Then call client.execute on the artifacts/contentinfo operation to receive the SAS URLs the agent needs to download model files.

### Can I limit what my agent is allowed to do with the Run History API?

Yes. Because Jentic One is self-hosted, you decide which Run History operations the agent may call, so read and log actions like querying runs, fetching metrics, and listing artifacts can be enabled while destructive ones such as deleting an experiment stay off unless you add them. Since the service puts the experiment and run identifiers in the URL path, your own rules can also pin the agent to reading and logging within a specific experiment. The Azure service principal credential is held by your instance and injected only at execution time, so the agent works within the scope you set.
