Azure Machine Learning API Reference
Explore the comprehensive REST API for Azure Machine Learning, enabling programmatic control and integration of your machine learning workflows.
Workspace Management
Get Workspace Details
Retrieves detailed information about a specific Azure Machine Learning workspace.
Parameters:
| Name | Type | Description | Required |
|---|---|---|---|
subscriptionId |
string | Your Azure subscription ID. | Yes |
resourceGroupName |
string | The name of the resource group containing the workspace. | Yes |
workspaceName |
string | The name of the Azure ML workspace. | Yes |
Responses:
200 OK
{
"name": "my-ml-workspace",
"id": "/subscriptions/...",
"type": "Microsoft.MachineLearningServices/workspaces",
"location": "East US",
"properties": {
"friendlyName": "My ML Workspace",
"creationTime": "2023-10-27T10:00:00Z",
"description": "Workspace for managing ML experiments and models.",
"storageAccount": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Storage/storageAccounts/mystorage",
"keyVault": "/subscriptions/.../resourceGroups/.../providers/Microsoft.KeyVault/vaults/mykeyvault",
"applicationInsights": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Insights/components/myappinsights"
}
}
Create Workspace
Creates a new Azure Machine Learning workspace. This is a simplified example; actual creation involves many more properties.
Parameters:
| Name | Type | Description | Required |
|---|---|---|---|
subscriptionId |
string | Your Azure subscription ID. | Yes |
resourceGroupName |
string | The name of the resource group to create the workspace in. | Yes |
workspaceName |
string | The desired name for the new Azure ML workspace. | Yes |
Request Body:
{
"location": "West US 2",
"tags": {
"environment": "production"
},
"sku": {
"name": "Basic"
}
}
Responses:
201 Created
{
"id": "/subscriptions/...",
"name": "my-new-workspace",
"type": "Microsoft.MachineLearningServices/workspaces",
"location": "West US 2",
"properties": {
"provisioningState": "Creating",
"creationTime": "..."
}
}
Compute Management
Get Compute Resource
Retrieves information about a specific compute resource (e.g., Compute Cluster, AKS, Managed Endpoint).
Parameters:
| Name | Type | Description | Required |
|---|---|---|---|
subscriptionId |
string | Your Azure subscription ID. | Yes |
resourceGroupName |
string | The name of the resource group. | Yes |
workspaceName |
string | The name of the Azure ML workspace. | Yes |
computeName |
string | The name of the compute resource. | Yes |
Create Compute Resource
Creates a new compute resource for training or deployment within the workspace.
Parameters:
| Name | Type | Description | Required |
|---|---|---|---|
subscriptionId |
string | Your Azure subscription ID. | Yes |
resourceGroupName |
string | The name of the resource group. | Yes |
workspaceName |
string | The name of the Azure ML workspace. | Yes |
Request Body:
{
"computeType": "AmlCompute",
"properties": {
"vmSize": "STANDARD_DS3_V2",
"scaleSettings": {
"maxNodes": 5,
"minNodes": 0,
"targetNodeUtilizationPercentage": 60
}
}
}
Experiments and Runs
List Runs
Retrieves a list of runs for a given experiment.
Parameters:
| Name | Type | Description | Required |
|---|---|---|---|
subscriptionId |
string | Your Azure subscription ID. | Yes |
resourceGroupName |
string | The name of the resource group. | Yes |
workspaceName |
string | The name of the Azure ML workspace. | Yes |
experimentName |
string | The name of the experiment. | Yes |
top |
integer | Maximum number of runs to return. | No |
skip |
integer | Number of runs to skip for pagination. | No |
Common Authentication
All Azure Machine Learning API requests must be authenticated. Typically, this is done using Azure Active Directory (Azure AD) service principals or managed identities. You will need to include an Authorization header with a valid OAuth 2.0 Bearer token in your requests.
Authorization: Bearer <YOUR_ACCESS_TOKEN>
Rate Limiting
Azure Machine Learning APIs are subject to rate limits. Exceeding these limits may result in temporary throttling. Consult the Azure documentation for specific limits.
Error Handling
API responses will include standard HTTP status codes. Error responses typically contain a JSON body with details about the error, including an error code and a message.
{
"error": {
"code": "InvalidRequest",
"message": "The specified resource was not found."
}
}