|
| 1 | +# Time Series Insights |
| 2 | + |
| 3 | +## Model Settings |
| 4 | + |
| 5 | +The main motivation for Time Series Model is to simplify finding and analyzing IoT or Time Series data. It achieves this objective by enabling the curation, maintenance, and enrichment of time series data to help prepare consumer-ready datasets for analytics. |
| 6 | + |
| 7 | +Time Series Model settings can be managed through the Model Settings API which includes model display name, Time Series ID properties and default type ID. Every Gen2 environment has a model that is automatically created. |
| 8 | + |
| 9 | +### GET /timeseries/modelSettings |
| 10 | + |
| 11 | +Returns the model settings which includes model display name, Time Series ID properties and default type ID. Every Gen2 environment has a model that is automatically created. |
| 12 | + |
| 13 | +```json |
| 14 | +{ |
| 15 | + "parameters": { |
| 16 | + "api-version": "2020-07-31", |
| 17 | + "environmentFqdn": "10000000-0000-0000-0000-100000000109.env.timeseries.azure.com" |
| 18 | + }, |
| 19 | + "responses": { |
| 20 | + "200": { |
| 21 | + "body": { |
| 22 | + "modelSettings": { |
| 23 | + "name": "DefaultModel", |
| 24 | + "timeSeriesIdProperties": [ |
| 25 | + { |
| 26 | + "name": "DeviceId", |
| 27 | + "type": "String" |
| 28 | + } |
| 29 | + ], |
| 30 | + "defaultTypeId": "5AB70D71-A8CD-410E-B70D-6F04AB9C132C" |
| 31 | + } |
| 32 | + } |
| 33 | + } |
| 34 | + } |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +```csharp |
| 39 | + /// <summary> |
| 40 | +/// Gets model settings asynchronously. |
| 41 | +/// </summary> |
| 42 | +/// <param name="cancellationToken">The cancellation token.</param> |
| 43 | +/// <returns>The Model Settings which includes model display name, Time Series ID properties and default type ID with the http response <see cref="Response{T}"/>.</returns> |
| 44 | +public virtual async Task<Response<TimeSeriesModelSettings>> GetModelSettingsAsync(CancellationToken cancellationToken = default) |
| 45 | +``` |
| 46 | + |
| 47 | +### POST /timeseries/modelSettings |
| 48 | + |
| 49 | +Updates time series model settings - either the model name or default type ID. |
| 50 | + |
| 51 | +```json |
| 52 | +{ |
| 53 | + "parameters": { |
| 54 | + "api-version": "2020-07-31", |
| 55 | + "environmentFqdn": "10000000-0000-0000-0000-100000000109.env.timeseries.azure.com", |
| 56 | + "parameters": { |
| 57 | + "name": "Thermostats" |
| 58 | + } |
| 59 | + }, |
| 60 | + "responses": { |
| 61 | + "200": { |
| 62 | + "body": { |
| 63 | + "modelSettings": { |
| 64 | + "name": "Thermostats", |
| 65 | + "timeSeriesIdProperties": [ |
| 66 | + { |
| 67 | + "name": "DeviceId", |
| 68 | + "type": "String" |
| 69 | + } |
| 70 | + ], |
| 71 | + "defaultTypeId": "5AB70D71-A8CD-410E-B70D-6F04AB9C132C" |
| 72 | + } |
| 73 | + } |
| 74 | + } |
| 75 | + } |
| 76 | +} |
| 77 | +``` |
| 78 | +```csharp |
| 79 | + /// <summary> |
| 80 | +/// Updates model settings, either the model name or default type ID asynchronously. |
| 81 | +/// </summary> |
| 82 | +/// <param name="options">Model settings update request body.</param> |
| 83 | +/// <param name="cancellationToken">The cancellation token.</param> |
| 84 | +/// <returns>The updated Model Settings with the http response <see cref="Response{T}"/>.</returns> |
| 85 | +/// <exception cref="ArgumentNullException"> <paramref name="modelSettings"/> is null. </exception> |
| 86 | +public virtual async Task<Response<TimeSeriesModelSettings>> UpdateModelSettingsAsync(UpdateModelSettingsOptions options, CancellationToken cancellationToken = default) |
| 87 | +``` |
0 commit comments