Time Series Hierarchies - Execute Batch
Executes a batch get, create, update, delete operation on multiple time series hierarchy definitions.
POST https://{environmentFqdn}/timeseries/hierarchies/$batch?api-version=2020-07-31
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
environment
|
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". |
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 | Type | Description |
---|---|---|
delete |
"delete" should be set while fetching specific hierarchies either by IDs or names. |
|
get |
"get" should be set while fetching specific hierarchies either by IDs or names. |
|
put |
"put" should be set while creating or updating hierarchies. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successful operation. Headers x-ms-request-id: string |
|
Other Status Codes |
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
Hierarchies |
Hierarchies |
Hierarchies |
Hierarchies |
Hierarchies |
HierarchiesBatchDeleteByIds
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/hierarchies/$batch?api-version=2020-07-31
{
"delete": {
"hierarchyIds": [
"a28fd14c-6b98-4ab5-9301-3840f142d30e"
]
}
}
Sample response
{
"delete": [
null
]
}
HierarchiesBatchDeleteByNames
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/hierarchies/$batch?api-version=2020-07-31
{
"delete": {
"names": [
"WindFarm"
]
}
}
Sample response
{
"delete": [
null
]
}
HierarchiesBatchGetByIds
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/hierarchies/$batch?api-version=2020-07-31
{
"get": {
"hierarchyIds": [
"6e292e54-9a26-4be1-9034-607d71492707",
"a28fd14c-6b98-4ab5-9301-3840f142d30e"
]
}
}
Sample response
{
"get": [
{
"hierarchy": {
"id": "6e292e54-9a26-4be1-9034-607d71492707",
"name": "Location",
"source": {
"instanceFieldNames": [
"state",
"city"
]
}
}
},
{
"hierarchy": {
"id": "a28fd14c-6b98-4ab5-9301-3840f142d30e",
"name": "ManufactureDate",
"source": {
"instanceFieldNames": [
"year",
"month"
]
}
}
}
]
}
HierarchiesBatchGetByNames
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/hierarchies/$batch?api-version=2020-07-31
{
"get": {
"names": [
"Location",
"ManufactureDate"
]
}
}
Sample response
{
"get": [
{
"hierarchy": {
"id": "6e292e54-9a26-4be1-9034-607d71492707",
"name": "Location",
"source": {
"instanceFieldNames": [
"state",
"city"
]
}
}
},
{
"hierarchy": {
"id": "a28fd14c-6b98-4ab5-9301-3840f142d30e",
"name": "ManufactureDate",
"source": {
"instanceFieldNames": [
"year",
"month"
]
}
}
}
]
}
HierarchiesBatchPut
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/hierarchies/$batch?api-version=2020-07-31
{
"put": [
{
"id": "6e292e54-9a26-4be1-9034-607d71492707",
"name": "Location",
"source": {
"instanceFieldNames": [
"state",
"city"
]
}
},
{
"id": "a28fd14c-6b98-4ab5-9301-3840f142d30e",
"name": "ManufactureDate",
"source": {
"instanceFieldNames": [
"year",
"month"
]
}
}
]
}
Sample response
{
"put": [
{
"hierarchy": {
"id": "6e292e54-9a26-4be1-9034-607d71492707",
"name": "Location",
"source": {
"instanceFieldNames": [
"state",
"city"
]
}
},
"error": null
},
{
"hierarchy": {
"id": "a28fd14c-6b98-4ab5-9301-3840f142d30e",
"name": "ManufactureDate",
"source": {
"instanceFieldNames": [
"year",
"month"
]
}
},
"error": null
}
]
}
Definitions
Name | Description |
---|---|
Hierarchies |
Request to perform a single operation on a batch of hierarchies. Exactly one of "get", "put" or "delete" must be set. |
Hierarchies |
Response of a single operation on a batch of time series hierarchies. Only one of "get", "put" or "delete" will be set. |
Hierarchies |
Request to get or delete multiple time series hierarchies. Exactly one of "hierarchyIds" or "names" must be set. |
Source |
Definition of how time series hierarchy tree levels are created. |
Time |
Time series hierarchy organizes time series instances into a tree. |
Time |
Result of a batch operation on a particular time series hierarchy. Hierarchy is set when operation is successful and error object is set when operation is unsuccessful. |
Tsi |
Information about an API error. |
Tsi |
A particular API error with an error code and a message. |
Tsi |
Additional error information. |
HierarchiesBatchRequest
Request to perform a single operation on a batch of hierarchies. Exactly one of "get", "put" or "delete" must be set.
Name | Type | Description |
---|---|---|
delete |
"delete" should be set while fetching specific hierarchies either by IDs or names. |
|
get |
"get" should be set while fetching specific hierarchies either by IDs or names. |
|
put |
"put" should be set while creating or updating hierarchies. |
HierarchiesBatchResponse
Response of a single operation on a batch of time series hierarchies. Only one of "get", "put" or "delete" will be set.
Name | Type | Description |
---|---|---|
delete |
List of error objects corresponding by position to the "delete" array in the request - null when the operation is successful. |
|
get |
List of hierarchy or error objects corresponding by position to the "get" array in the request. Hierarchy object is set when operation is successful and error object is set when operation is unsuccessful. |
|
put |
List of hierarchy or error object corresponding by position to the "put" array in the request. Hierarchy object is set when operation is successful and error object is set when operation is unsuccessful. |
HierarchiesRequestBatchGetDelete
Request to get or delete multiple time series hierarchies. Exactly one of "hierarchyIds" or "names" must be set.
Name | Type | Description |
---|---|---|
hierarchyIds |
string[] |
List of hierarchy IDs. |
names |
string[] |
List of hierarchy names. |
Source
Definition of how time series hierarchy tree levels are created.
Name | Type | Description |
---|---|---|
instanceFieldNames |
string[] |
List of instance field names that must be set in all time series instances that belong to this hierarchy. The order of the instance fields defines the levels in the hierarchy. |
TimeSeriesHierarchy
Time series hierarchy organizes time series instances into a tree.
Name | Type | Description |
---|---|---|
id |
string |
Case-sensitive unique hierarchy identifier. Can be null while creating hierarchy objects and then server generates the id, not null on get and delete operations. |
name |
string |
User-given unique name for the type. It is mutable and not null. |
source |
Definition of how time series hierarchy tree levels are created. |
TimeSeriesHierarchyOrError
Result of a batch operation on a particular time series hierarchy. Hierarchy is set when operation is successful and error object is set when operation is unsuccessful.
Name | Type | Description |
---|---|---|
error |
Error object - set when the operation is unsuccessful. |
|
hierarchy |
Time series hierarchy object - set when the operation is successful. |
TsiError
Information about an API error.
Name | Type | Description |
---|---|---|
error |
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 |
Contains additional error information. May be null. |
|
innerError |
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. |