Query - Get Event Schema

Returns environment event schema for a given search span. Event schema is a set of property definitions. Event schema may not be contain all persisted properties when there are too many properties.

POST https://{environmentFqdn}/eventSchema?api-version=2020-07-31
POST https://{environmentFqdn}/eventSchema?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.

Request Body

Name Required Type Description
searchSpan True

DateTimeRange

The range of time on which the query is executed. Cannot be null.

Responses

Name Type Description
200 OK

EventSchema

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

ColdStoreEventSchemaGet
EventSchemaGet
EventSchemaGetEmpty
WarmStoreEventSchemaGet

ColdStoreEventSchemaGet

Sample request

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

{
  "searchSpan": {
    "from": "2018-08-01T00:00:00.000Z",
    "to": "2018-08-31T00:00:00.000Z"
  }
}

Sample response

{
  "properties": [
    {
      "name": "Building",
      "type": "String"
    },
    {
      "name": "Room",
      "type": "String"
    },
    {
      "name": "DeviceId",
      "type": "Double"
    },
    {
      "name": "Temperature",
      "type": "Double"
    },
    {
      "name": "Pressure",
      "type": "Double"
    },
    {
      "name": "Status",
      "type": "String"
    }
  ]
}

EventSchemaGet

Sample request

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

{
  "searchSpan": {
    "from": "2018-08-01T00:00:00.000Z",
    "to": "2018-08-31T00:00:00.000Z"
  }
}

Sample response

{
  "properties": [
    {
      "name": "Building",
      "type": "String"
    },
    {
      "name": "Room",
      "type": "String"
    },
    {
      "name": "DeviceId",
      "type": "Double"
    },
    {
      "name": "Temperature",
      "type": "Double"
    },
    {
      "name": "Pressure",
      "type": "Double"
    },
    {
      "name": "Status",
      "type": "String"
    }
  ]
}

EventSchemaGetEmpty

Sample request

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

{
  "searchSpan": {
    "from": "2016-08-01T00:00:00.000Z",
    "to": "2016-08-31T00:00:00.000Z"
  }
}

Sample response

{
  "properties": []
}

WarmStoreEventSchemaGet

Sample request

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

{
  "searchSpan": {
    "from": "2018-08-01T00:00:00.000Z",
    "to": "2018-08-31T00:00:00.000Z"
  }
}

Sample response

{
  "properties": [
    {
      "name": "Building",
      "type": "String"
    },
    {
      "name": "Room",
      "type": "String"
    },
    {
      "name": "DeviceId",
      "type": "Double"
    },
    {
      "name": "Temperature",
      "type": "Double"
    },
    {
      "name": "Pressure",
      "type": "Double"
    },
    {
      "name": "Status",
      "type": "String"
    }
  ]
}

Definitions

Name Description
DateTimeRange

The range of time. Cannot be null or negative.

EventProperty

Property of an event that is either stored or computed. Properties are identified by both name and type. Different events can have properties with same name, but different type.

EventSchema

Event schema of all events within a given search span. Event schema is a set of property definitions. Properties are identified by both name and type. Different events can have properties with same name, but different type. Event schema may not be contain all persisted properties when there are too many properties.

GetEventSchemaRequest

Request to get the event schema of all events within a given search span.

PropertyTypes

The type of the property.

TsiError

Information about an API error.

TsiErrorBody

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

TsiErrorDetails

Additional error information.

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).

EventProperty

Property of an event that is either stored or computed. Properties are identified by both name and type. Different events can have properties with same name, but different type.

Name Type Description
name

string

The name of the property.

type

PropertyTypes

The type of the property.

EventSchema

Event schema of all events within a given search span. Event schema is a set of property definitions. Properties are identified by both name and type. Different events can have properties with same name, but different type. Event schema may not be contain all persisted properties when there are too many properties.

Name Type Description
properties

EventProperty[]

A set of property definitions. When environment has no data, the returned array is empty.

GetEventSchemaRequest

Request to get the event schema of all events within a given search span.

Name Type Description
searchSpan

DateTimeRange

The range of time on which the query is executed. Cannot be null.

PropertyTypes

The type of the property.

Name Type Description
Bool

string

DateTime

string

Double

string

Long

string

String

string

TimeSpan

string

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.