|
| 1 | +# Time Series Insights |
| 2 | + |
| 3 | +## Hierarchies |
| 4 | + |
| 5 | +Time Series Model hierarchies organize instances by specifying property names and their relationships. |
| 6 | +Hierarchies are represented in JSON as: |
| 7 | + |
| 8 | +```json |
| 9 | +{ |
| 10 | + "hierarchies": [ |
| 11 | + { |
| 12 | + "id": "6e292e54-9a26-4be1-9034-607d71492707", |
| 13 | + "name": "Location", |
| 14 | + "source": { |
| 15 | + "instanceFieldNames": [ |
| 16 | + "state", |
| 17 | + "city" |
| 18 | + ] |
| 19 | + } |
| 20 | + }, |
| 21 | + { |
| 22 | + "id": "a28fd14c-6b98-4ab5-9301-3840f142d30e", |
| 23 | + "name": "ManufactureDate", |
| 24 | + "source": { |
| 25 | + "instanceFieldNames": [ |
| 26 | + "year", |
| 27 | + "month" |
| 28 | + ] |
| 29 | + } |
| 30 | + } |
| 31 | + ] |
| 32 | +} |
| 33 | +``` |
| 34 | + |
| 35 | +## GET /timeseries/hierarchies |
| 36 | + |
| 37 | +Returns time series hierarchies definitions in pages. |
| 38 | + |
| 39 | +```csharp |
| 40 | +/// <summary> |
| 41 | +/// Gets time series insight hierarchies in pages asynchronously. |
| 42 | +/// </summary> |
| 43 | +/// <param name="cancellationToken">The cancellation token.</param> |
| 44 | +/// <returns> The pageable list <see cref="AsyncPageable{TimeSeriesHierarchy}"/> of Time Series instances hierarchies with the http response.</returns> |
| 45 | +public virtual AsyncPageable<TimeSeriesHierarchy> GetTimeSeriesHierarchiesAsync( |
| 46 | + CancellationToken cancellationToken = default) |
| 47 | +``` |
| 48 | + |
| 49 | +## POST /timeseries/hierarchies/$batch |
| 50 | + |
| 51 | +Executes a batch get, create, update, delete operation on multiple time series hierarchies. |
| 52 | + |
| 53 | +### Get Time Series Insights Hierarchies |
| 54 | + |
| 55 | +```csharp |
| 56 | +/// <summary> |
| 57 | +/// Gets time series insight hierarchies by Time Series hierarchy Ids asynchronously. |
| 58 | +/// </summary> |
| 59 | +/// <param name="timeSeriesHierarchyIds">List of Ids of the Time Series hierarchies to return.</param> |
| 60 | +/// <param name="cancellationToken">The cancellation token.</param> |
| 61 | +/// <returns>List of hierarchy or error objects corresponding by position to the array in the request. Hierarchy object is set when operation is successful and error object is set when operation is unsuccessful. |
| 62 | +public virtual async Task<Response<TimeSeriesHierarchyOperationResult[]>> GetTimeSeriesHierarchiesByIdAsync( |
| 63 | + IEnumerable<string> timeSeriesHierarchyIds, |
| 64 | + CancellationToken cancellationToken = default) |
| 65 | +``` |
| 66 | + |
| 67 | +```csharp |
| 68 | +/// <summary> |
| 69 | +/// Gets time series insight hierarchies by Time Series hierarchy Names asynchronously. |
| 70 | +/// </summary> |
| 71 | +/// <param name="timeSeriesHierarchyNames">List of names of the Time Series hierarchies to return.</param> |
| 72 | +/// <param name="cancellationToken">The cancellation token.</param> |
| 73 | +/// <returns>List of hierarchy or error objects corresponding by position to the array in the request. Hierarchy object is set when operation is successful and error object is set when operation is unsuccessful. |
| 74 | +public virtual async Task<Response<TimeSeriesHierarchyOperationResult[]>> GetTimeSeriesHierarchiesByNameAsync( |
| 75 | + IEnumerable<string> timeSeriesHierarchyNames, |
| 76 | + CancellationToken cancellationToken = default) |
| 77 | +``` |
| 78 | + |
| 79 | +### Create OR Replace Time Series Insights Hierarchies |
| 80 | + |
| 81 | +```csharp |
| 82 | +/// <summary> |
| 83 | +/// Creates or Updates Time Series insight hierarchies asynchronously. |
| 84 | +/// </summary> |
| 85 | +/// <param name="timeSeriesHierarchies">The Time Series insight hierarchies to be created or replaced.</param> |
| 86 | +/// <param name="cancellationToken">The cancellation token.</param> |
| 87 | +/// <returns> |
| 88 | +/// List of hierarchy or error objects corresponding by position to the array in the request. Hierarchy object is set when operation is successful and error object is set when operation is unsuccessful. |
| 89 | +/// </returns> |
| 90 | +public virtual async Task<Response<TimeSeriesHierarchyOperationResult[]>> CreateOrReplaceTimeSeriesHierarchiesAsync( |
| 91 | + IEnumerable<TimeSeriesHierarchy> timeSeriesHierarchies, |
| 92 | + CancellationToken cancellationToken = default) |
| 93 | +``` |
| 94 | + |
| 95 | +### Delete Time Series Insights Hierarchies |
| 96 | + |
| 97 | +```csharp |
| 98 | +/// <summary> |
| 99 | +/// Deletes Time Series insight hierarchies by Time Series hierarchy Ids asynchronously. |
| 100 | +/// </summary> |
| 101 | +/// <param name="timeSeriesHierarchyIds">List of names of the Time Series hierarchies to return.</param> |
| 102 | +/// <param name="cancellationToken">The cancellation token.</param> |
| 103 | +/// <returns> |
| 104 | +/// List of error objects corresponding by position to the "delete" array in the request - null when the operation is successful. |
| 105 | +/// </returns> |
| 106 | +public virtual async Task<Response<TimeSeriesOperationError[]>> DeleteTimeSeriesHierarchiesByIdAsync( |
| 107 | + IEnumerable<string> timeSeriesHierarchyIds, |
| 108 | + CancellationToken cancellationToken = default) |
| 109 | +``` |
| 110 | + |
| 111 | +```csharp |
| 112 | +/// <summary> |
| 113 | +/// Deletes time series insight hierarchies by Time Series hierarchy Names asynchronously. |
| 114 | +/// </summary> |
| 115 | +/// <param name="timeSeriesHierarchyNames">List of names of the Time Series hierarchies to return.</param> |
| 116 | +/// <param name="cancellationToken">The cancellation token.</param> |
| 117 | +/// <returns> |
| 118 | +/// List of error objects corresponding by position to the "delete" array in the request - null when the operation is successful. |
| 119 | +/// </returns> |
| 120 | +public virtual async Task<Response<TimeSeriesOperationError[]>> DeleteTimeSeriesHierarchiesByNameAsync( |
| 121 | + IEnumerable<string> timeSeriesHierarchyNames, |
| 122 | + CancellationToken cancellationToken = default) |
| 123 | +``` |
| 124 | + |
| 125 | +## Definitions |
| 126 | + |
| 127 | +### TimeSeriesHierarchyOperationResult: |
| 128 | + |
| 129 | +```json |
| 130 | + TimeSeriesHierarchyOperationResult: |
| 131 | + description: 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. |
| 132 | + type: object |
| 133 | + properties: |
| 134 | + hierarchy: |
| 135 | + description: Time series hierarchy object - set when the operation is successful. |
| 136 | + readOnly: true |
| 137 | + $ref: '#/definitions/TimeSeriesHierarchy' |
| 138 | + error: |
| 139 | + description: Error object - set when the operation is unsuccessful. |
| 140 | + readOnly: true |
| 141 | + $ref: '#/definitions/TsiErrorBody' |
| 142 | +``` |
| 143 | + |
| 144 | +### TimeSeriesOperationError: |
| 145 | + |
| 146 | +```json |
| 147 | +TsiErrorBody: |
| 148 | + description: A particular API error with an error code and a message. |
| 149 | + type: object |
| 150 | + properties: |
| 151 | + code: |
| 152 | + description: '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.' |
| 153 | + readOnly: true |
| 154 | + type: string |
| 155 | + message: |
| 156 | + description: '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.' |
| 157 | + readOnly: true |
| 158 | + type: string |
| 159 | + target: |
| 160 | + description: 'Target of the particular error (for example, the name of the property in error). May be null.' |
| 161 | + readOnly: true |
| 162 | + type: string |
| 163 | + innerError: |
| 164 | + description: Contains more specific error that narrows down the cause. May be null. |
| 165 | + readOnly: true |
| 166 | + $ref: '#/definitions/TsiErrorBody' |
| 167 | + details: |
| 168 | + description: Contains additional error information. May be null. |
| 169 | + readOnly: true |
| 170 | + type: array |
| 171 | + items: |
| 172 | + $ref: '#/definitions/TsiErrorDetails' |
| 173 | + additionalProperties: true |
| 174 | + x-ms-external: false |
| 175 | +``` |
0 commit comments