Skip to content

Commit f92de12

Browse files
authored
[TSI] Design of Time Series Types APIs (Azure#19441)
1 parent d104fd1 commit f92de12

File tree

1 file changed

+102
-0
lines changed

1 file changed

+102
-0
lines changed
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Time Series Insights
2+
3+
## Types
4+
5+
Time Series Model types help you define variables or formulas for doing computations. Types are associated with a specific instance.
6+
7+
A type can have one or more variables. For example, a Time Series Model instance might be of type Temperature Sensor, which consists of the variables avg temperature, min temperature, and max temperature.
8+
9+
### GET /timeseries/types
10+
11+
Returns time series types in pages.
12+
13+
```csharp
14+
/// <summary>
15+
/// Gets time series insight types in pages asynchronously.
16+
/// </summary>
17+
/// <param name="cancellationToken">The cancellation token.</param>
18+
/// <returns>The pageable list <see cref="AsyncPageable{TimeSeriesType}"/> of Time Series instances types with the http response.</returns>
19+
public virtual AsyncPageable<TimeSeriesType> GetTimeSeriesTypesAsync(
20+
CancellationToken cancellationToken = default)
21+
```
22+
23+
### POST /timeseries/types
24+
25+
Executes a batch get, create, update, delete operation on multiple time series types.
26+
27+
#### Get Time Series Insights Types
28+
29+
```csharp
30+
/// <summary>
31+
/// Gets time series insight types by Time Series Id asynchronously.
32+
/// </summary>
33+
/// <param name="timeSeriesIds">List of Ids of the Time Series instances.</param>
34+
/// <param name="cancellationToken">The cancellation token.</param>
35+
/// <returns>List of types or error objects corresponding by position to the array in the request. Type object is set when operation is successful and error object is set when operation is unsuccessful.
36+
public virtual async Task<Response<TimeSeriesTypeOperationResult[]>> GetTimeSeriesTypesAsync(
37+
IEnumerable<TimeSeriesId> timeSeriesIds,
38+
CancellationToken cancellationToken = default)
39+
```
40+
41+
```csharp
42+
/// <summary>
43+
/// Gets time series insight types by Time Series Names asynchronously.
44+
/// </summary>
45+
/// <param name="timeSeriesNames">List of names of the Time Series instances.</param>
46+
/// <param name="cancellationToken">The cancellation token.</param>
47+
/// <returns>List of types or error objects corresponding by position to the array in the request. Type object is set when operation is successful and error object is set when operation is unsuccessful.
48+
public virtual async Task<Response<TimeSeriesTypeOperationResult[]>> GetTimeSeriesTypesAsync(
49+
IEnumerable<string> timeSeriesNames,
50+
CancellationToken cancellationToken = default)
51+
```
52+
53+
#### Create OR Replace Time Series Insights Types
54+
55+
```csharp
56+
/// <summary>
57+
/// Creates Time Series instances types asynchronously. If a provided instance type is already in use, then this will attempt to replace the existing instance type with the provided Time Series Instance.
58+
/// </summary>
59+
/// <param name="timeSeriesTypes">The Time Series instances types to be created or replaced.</param>
60+
/// <param name="cancellationToken">The cancellation token.</param>
61+
/// <returns>
62+
/// List of error objects corresponding by position to the <paramref name="timeSeriesTypes"/> array in the request.
63+
/// An error object will be set when operation is unsuccessful.
64+
/// </returns>
65+
public virtual async Task<Response<TimeSeriesTypeOperationResult[]>> CreateOrReplaceTimeSeriesTypesAsync(
66+
IEnumerable<TimeSeriesType> timeSeriesTypes,
67+
CancellationToken cancellationToken = default)
68+
```
69+
70+
#### Delete Time Series Insights Types
71+
72+
```csharp
73+
/// <summary>
74+
/// Deletes Time Series instances types asynchronously.
75+
/// </summary>
76+
/// <param name="timeSeriesIds">List of Ids of the Time Series instances.</param>
77+
/// <param name="cancellationToken">The cancellation token.</param>
78+
/// <returns>
79+
/// List of error objects corresponding by position to the <paramref name="timeSeriesIds"/> array in the request.
80+
/// An error object will be set when operation is unsuccessful.
81+
/// null will be set when the operation is successful.
82+
/// </returns>
83+
public virtual async Task<Response<TimeSeriesTypeOperationResult[]>> DeleteTimeSeriesTypesAsync(
84+
IEnumerable<TimeSeriesId> timeSeriesIds,
85+
CancellationToken cancellationToken = default)
86+
```
87+
88+
```csharp
89+
/// <summary>
90+
/// Deletes Time Series instances types asynchronously.
91+
/// </summary>
92+
/// <param name="timeSeriesNames">List of names of the Time Series instances.</param>
93+
/// <param name="cancellationToken">The cancellation token.</param>
94+
/// <returns>
95+
/// List of error objects corresponding by position to the <paramref name="timeSeriesNames"/> array in the request.
96+
/// An error object will be set when operation is unsuccessful.
97+
/// null will be set when the operation is successful.
98+
/// </returns>
99+
public virtual async Task<Response<TimeSeriesTypeOperationResult[]>> DeleteTimeSeriesTypesAsync(
100+
IEnumerable<string> timeSeriesNames,
101+
CancellationToken cancellationToken = default)
102+
```

0 commit comments

Comments
 (0)