Metric Baseline - Get

Gets the baseline values for a specific metric.

GET https://management.azure.com/{resourceUri}/providers/microsoft.insights/baseline/{metricName}?api-version=2017-11-01-preview
GET https://management.azure.com/{resourceUri}/providers/microsoft.insights/baseline/{metricName}?timespan={timespan}&interval={interval}&aggregation={aggregation}&sensitivities={sensitivities}&resultType={resultType}&api-version=2017-11-01-preview

URI Parameters

Name In Required Type Description
metricName
path True
  • string

The name of the metric to retrieve the baseline for.

resourceUri
path True
  • string

The identifier of the resource. It has the following structure: subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. For example: subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1

api-version
query True
  • string

Client Api Version.

aggregation
query
  • string

The aggregation type of the metric to retrieve the baseline for.

interval
query
  • string
duration

The interval (i.e. timegrain) of the query.

resultType
query

Allows retrieving only metadata of the baseline. On data request all information is retrieved.

sensitivities
query
  • string

The list of sensitivities (comma separated) to retrieve.

timespan
query
  • string

The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.

Responses

Name Type Description
200 OK

Successful request to get the list of metric values.

Other Status Codes

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Get Metric for data
Get Metric for metadata

Get Metric for data

Sample Request

GET https://management.azure.com/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/baseline/PercentageCpu?timespan=2017-04-14T02:20:00Z/2017-04-14T04:20:00Z&interval=PT1H&aggregation=Average&sensitivities=Low,Medium&api-version=2017-11-01-preview

Sample Response

{
  "id": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/baseline/PercentageCpu",
  "type": "Microsoft.Insights/baseline",
  "name": {
    "value": "PercentageCpu"
  },
  "properties": {
    "timespan": "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
    "aggregation": "Average",
    "interval": "PT1H",
    "timestamps": [
      "2017-04-14T02:20:00Z",
      "2017-04-14T03:20:00Z"
    ],
    "baseline": [
      {
        "sensitivity": "Low",
        "lowThresholds": [
          30,
          31.1
        ],
        "highThresholds": [
          90.3453,
          91.3453
        ]
      },
      {
        "sensitivity": "Medium",
        "lowThresholds": [
          50,
          51.1
        ],
        "highThresholds": [
          70.3453,
          71.3453
        ]
      }
    ]
  }
}

Get Metric for metadata

Sample Request

GET https://management.azure.com/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/baseline/PercentageCpu?timespan=2017-04-14T02:20:00Z/2017-04-14T04:20:00Z&interval=PT1H&aggregation=Average&api-version=2017-11-01-preview

Sample Response

{
  "id": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/baseline/PercentageCpu",
  "type": "Microsoft.Insights/baseline",
  "name": {
    "value": "PercentageCpu"
  },
  "properties": {
    "timespan": "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
    "aggregation": "Average",
    "interval": "PT1H",
    "metadata": [
      {
        "name": "CurrentTrainingState",
        "value": "Trained"
      },
      {
        "name": "SelectedModel",
        "value": "AdjustedBoxplot"
      }
    ]
  }
}

Definitions

Baseline

The baseline values for a single sensitivity value.

BaselineMetadataValue

Represents a baseline metadata value.

BaselineResponse

The response to a baseline query.

ErrorResponse

Describes the format of Error response.

LocalizableString

The localizable string class.

ResultType

Allows retrieving only metadata of the baseline. On data request all information is retrieved.

Sensitivity

the sensitivity of the baseline.

Baseline

The baseline values for a single sensitivity value.

Name Type Description
highThresholds
  • number[]

The high thresholds of the baseline.

lowThresholds
  • number[]

The low thresholds of the baseline.

sensitivity

the sensitivity of the baseline.

BaselineMetadataValue

Represents a baseline metadata value.

Name Type Description
name

the name of the metadata.

value
  • string

the value of the metadata.

BaselineResponse

The response to a baseline query.

Name Type Description
id
  • string

the metric baseline Id.

name

the name and the display name of the metric, i.e. it is localizable string.

properties.aggregation
  • string

The aggregation type of the metric.

properties.baseline

the baseline values for each sensitivity.

properties.interval
  • string

The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.

properties.metadata

the baseline metadata values.

properties.timespan
  • string

The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.

properties.timestamps
  • string[]

the array of timestamps of the baselines.

type
  • string

the resource type of the baseline resource.

ErrorResponse

Describes the format of Error response.

Name Type Description
code
  • string

Error code

message
  • string

Error message indicating why the operation failed.

LocalizableString

The localizable string class.

Name Type Description
localizedValue
  • string

the locale specific value.

value
  • string

the invariant value.

ResultType

Allows retrieving only metadata of the baseline. On data request all information is retrieved.

Name Type Description
Data
  • string
Metadata
  • string

Sensitivity

the sensitivity of the baseline.

Name Type Description
High
  • string
Low
  • string
Medium
  • string