Query - Get Availability

Returns the time range and distribution of event count over the event timestamp ($ts). This API can be used to provide landing experience of navigating to the environment.

GET https://{environmentFqdn}/availability?api-version=2020-07-31
GET https://{environmentFqdn}/availability?api-version=2020-07-31&storeType={storeType}

URI Parameters

Name In Required Type Description
environmentFqdn
path True

string

Per environment FQDN, for example 10000000-0000-0000-0000-100000000109.env.timeseries.azure.com. You can obtain this domain name from the response of the Get Environments API, Azure portal, or Azure Resource Manager.

api-version
query True

string

Version of the API to be used with the client request. Currently supported version is "2020-07-31".

storeType
query

string

For the environments with warm store enabled, the query can be executed either on the 'WarmStore' or 'ColdStore'. This parameter in the query defines which store the query should be executed on. If not defined, the query will be executed on the cold store.

Request Header

Name Required Type Description
x-ms-client-request-id

string

Optional client request ID. Service records this value. Allows the service to trace operation across services, and allows the customer to contact support regarding a particular request.

x-ms-client-session-id

string

Optional client session ID. Service records this value. Allows the service to trace a group of related operations across services, and allows the customer to contact support regarding a particular group of requests.

Responses

Name Type Description
200 OK

AvailabilityResponse

Successful operation.

Headers

x-ms-request-id: string

Other Status Codes

TsiError

Unexpected error.

Headers

x-ms-request-id: string

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

AvailabilityGet
AvailabilityGetEmpty
ColdStoreAvailabilityGet
WarmStoreAvailabilityGet

AvailabilityGet

Sample Request

GET https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/availability?api-version=2020-07-31

Sample Response

x-ms-request-id: 0d59d156-2807-4952-87bb-0e074417dbfb
{
  "availability": {
    "intervalSize": "PT1H",
    "distribution": {
      "2019-03-27T04:00:00Z": 432447,
      "2019-03-27T05:00:00Z": 432340,
      "2019-03-27T06:00:00Z": 432451,
      "2019-03-27T07:00:00Z": 432436,
      "2019-03-26T13:00:00Z": 386247,
      "2019-03-27T00:00:00Z": 436968,
      "2019-03-27T01:00:00Z": 432509,
      "2019-03-27T02:00:00Z": 432487
    },
    "range": {
      "from": "2019-03-14T06:38:27.153Z",
      "to": "2019-03-27T03:57:11.697Z"
    }
  }
}

AvailabilityGetEmpty

Sample Request

GET https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/availability?api-version=2020-07-31

Sample Response

{}

ColdStoreAvailabilityGet

Sample Request

GET https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/availability?api-version=2020-07-31&storeType=coldstore

Sample Response

x-ms-request-id: 0d59d156-2807-4952-87bb-0e074417dbfb
{
  "availability": {
    "intervalSize": "PT1H",
    "distribution": {
      "2019-03-27T04:00:00Z": 432447,
      "2019-03-27T05:00:00Z": 432340,
      "2019-03-27T06:00:00Z": 432451,
      "2019-03-27T07:00:00Z": 432436,
      "2019-03-26T13:00:00Z": 386247,
      "2019-03-27T00:00:00Z": 436968,
      "2019-03-27T01:00:00Z": 432509,
      "2019-03-27T02:00:00Z": 432487
    },
    "range": {
      "from": "2019-03-14T06:38:27.153Z",
      "to": "2019-03-27T03:57:11.697Z"
    }
  }
}

WarmStoreAvailabilityGet

Sample Request

GET https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/availability?api-version=2020-07-31&storeType=warmstore

Sample Response

x-ms-request-id: 0d59d156-2807-4952-87bb-0e074417dbfb
{
  "availability": {
    "intervalSize": "PT1H",
    "distribution": {
      "2019-03-27T04:00:00Z": 432447,
      "2019-03-27T05:00:00Z": 432340,
      "2019-03-27T06:00:00Z": 432451,
      "2019-03-27T07:00:00Z": 432436,
      "2019-03-26T13:00:00Z": 386247,
      "2019-03-27T00:00:00Z": 436968,
      "2019-03-27T01:00:00Z": 432509,
      "2019-03-27T02:00:00Z": 432487
    },
    "range": {
      "from": "2019-03-14T06:38:27.153Z",
      "to": "2019-03-27T03:57:11.697Z"
    }
  }
}

Definitions

Name Description
Availability

Event availability information when environment contains events. Contains time range of events and approximate distribution of events over time.

AvailabilityResponse

Response of Get Availability operation. When environment has no data, availability property is null.

DateTimeRange

The range of time. Cannot be null or negative.

TsiError

Information about an API error.

TsiErrorBody

A particular API error with an error code and a message.

TsiErrorDetails

Additional error information.

Availability

Event availability information when environment contains events. Contains time range of events and approximate distribution of events over time.

Name Type Description
distribution

object

intervalSize

string

Interval size for the returned distribution of the events. Returned interval is selected to return a reasonable number of points. All intervals are the same size. On the wire interval is specified in ISO-8601 duration format. One month is always converted to 30 days, and one year is always 365 days. Examples: 1 minute is "PT1M", 1 millisecond is "PT0.001S". For more information, see https://www.w3.org/TR/xmlschema-2/#duration

range

DateTimeRange

Minimum and maximum values of event timestamp ($ts) property.

AvailabilityResponse

Response of Get Availability operation. When environment has no data, availability property is null.

Name Type Description
availability

Availability

Event availability information when environment contains events. When environment has no data yet, this property is null or not present.

DateTimeRange

The range of time. Cannot be null or negative.

Name Type Description
from

string

Start timestamp of the time range. Start timestamp is inclusive when used in time series query requests. Events that have this timestamp are included.

to

string

End timestamp of the time range. End timestamp is exclusive when used in time series query requests. Events that match this timestamp are excluded. Note that end timestamp is inclusive when returned by Get Availability (meaning that there is an event with this exact "to" timestamp).

TsiError

Information about an API error.

Name Type Description
error

TsiErrorBody

A particular API error with an error code and a message.

TsiErrorBody

A particular API error with an error code and a message.

Name Type Description
code

string

Language-independent, human-readable string that defines a service-specific error code. This code serves as a more specific indicator for the HTTP error code specified in the response. Can be used to programmatically handle specific error cases.

details

TsiErrorDetails[]

Contains additional error information. May be null.

innerError

TsiErrorBody

Contains more specific error that narrows down the cause. May be null.

message

string

Human-readable, language-independent representation of the error. It is intended as an aid to developers and is not suitable for exposure to end users.

target

string

Target of the particular error (for example, the name of the property in error). May be null.

TsiErrorDetails

Additional error information.

Name Type Description
code

string

Language-independent, human-readable string that defines a service-specific error code. This code serves as a more specific indicator for the HTTP error code specified in the response. Can be used to programmatically handle specific error cases.

message

string

Human-readable, language-independent representation of the error. It is intended as an aid to developers and is not suitable for exposure to end users.