diff --git a/docs/FirmwareInfo.md b/docs/FirmwareInfo.md index 39242c3..7087558 100644 --- a/docs/FirmwareInfo.md +++ b/docs/FirmwareInfo.md @@ -2,20 +2,22 @@ ## Properties -| Name | Type | Description | Notes | -| ---------------- | --------------------- | -------------------------------------------- | ---------- | -| **Built** | Pointer to **string** | The date the firmware was built. | [optional] | -| **Created** | Pointer to **string** | The date the firmware was created. | [optional] | -| **Description** | Pointer to **string** | A description of the firmware. | [optional] | -| **Filename** | Pointer to **string** | The name of the firmware file. | [optional] | -| **Md5** | Pointer to **string** | The MD5 hash of the firmware file. | [optional] | -| **Organization** | Pointer to **string** | The organization that owns the firmware. | [optional] | -| **Product** | Pointer to **string** | The product that the firmware is for. | [optional] | -| **Published** | Pointer to **bool** | True if the firmware is published. | [optional] | -| **Tags** | Pointer to **string** | A list of tags associated with the firmware. | [optional] | -| **Target** | Pointer to **string** | The target device for the firmware. | [optional] | -| **Type** | Pointer to **string** | The type of firmware. | [optional] | -| **Version** | Pointer to **string** | The version of the firmware. | [optional] | +| Name | Type | Description | Notes | +| ---------------- | ------------------------------------- | -------------------------------------------- | ---------- | +| **Built** | Pointer to **string** | The date the firmware was built. | [optional] | +| **Created** | Pointer to **string** | The date the firmware was created. | [optional] | +| **Description** | Pointer to **string** | A description of the firmware. | [optional] | +| **Filename** | Pointer to **string** | The name of the firmware file. | [optional] | +| **Info** | Pointer to **map[string]interface{}** | User-defined metadata | [optional] | +| **Md5** | Pointer to **string** | The MD5 hash of the firmware file. | [optional] | +| **Notes** | Pointer to **string** | User-defined notes | [optional] | +| **Organization** | Pointer to **string** | The organization that owns the firmware. | [optional] | +| **Product** | Pointer to **string** | The product that the firmware is for. | [optional] | +| **Published** | Pointer to **bool** | True if the firmware is published. | [optional] | +| **Tags** | Pointer to **string** | A list of tags associated with the firmware. | [optional] | +| **Target** | Pointer to **string** | The target device for the firmware. | [optional] | +| **Type** | Pointer to **string** | The type of firmware. | [optional] | +| **Version** | Pointer to **string** | The version of the firmware. | [optional] | ## Methods @@ -136,6 +138,31 @@ SetFilename sets Filename field to given value. HasFilename returns a boolean if a field has been set. +### GetInfo + +`func (o *FirmwareInfo) GetInfo() map[string]interface{}` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *FirmwareInfo) GetInfoOk() (*map[string]interface{}, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *FirmwareInfo) SetInfo(v map[string]interface{})` + +SetInfo sets Info field to given value. + +### HasInfo + +`func (o *FirmwareInfo) HasInfo() bool` + +HasInfo returns a boolean if a field has been set. + ### GetMd5 `func (o *FirmwareInfo) GetMd5() string` @@ -161,6 +188,31 @@ SetMd5 sets Md5 field to given value. HasMd5 returns a boolean if a field has been set. +### GetNotes + +`func (o *FirmwareInfo) GetNotes() string` + +GetNotes returns the Notes field if non-nil, zero value otherwise. + +### GetNotesOk + +`func (o *FirmwareInfo) GetNotesOk() (*string, bool)` + +GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotes + +`func (o *FirmwareInfo) SetNotes(v string)` + +SetNotes sets Notes field to given value. + +### HasNotes + +`func (o *FirmwareInfo) HasNotes() bool` + +HasNotes returns a boolean if a field has been set. + ### GetOrganization `func (o *FirmwareInfo) GetOrganization() string` diff --git a/docs/UsageEventsData.md b/docs/UsageEventsData.md index 3ee5285..332389d 100644 --- a/docs/UsageEventsData.md +++ b/docs/UsageEventsData.md @@ -13,6 +13,8 @@ | **TotalDaysInPeriod** | Pointer to **int32** | The total number of days in this period. Useful for calculating daily averages for month period. Note that the current period will be the total number of days in the current period, including days in the future. | [optional] | | **TotalDevices** | **int64** | Total devices represented in this count | | **TotalEvents** | **int64** | Total events the device sent to notehub, including associated notehub generated events | +| **TotalFwUpdates** | Pointer to **NullableInt64** | Number of firmware updates in this period (from \_health.qo DFU events) | [optional] | +| **TotalReboots** | Pointer to **NullableInt64** | Number of device reboots in this period (from \_health.qo boot events) | [optional] | | **WatchdogEvents** | **int64** | Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time. | ## Methods @@ -235,6 +237,80 @@ and a boolean to check if the value has been set. SetTotalEvents sets TotalEvents field to given value. +### GetTotalFwUpdates + +`func (o *UsageEventsData) GetTotalFwUpdates() int64` + +GetTotalFwUpdates returns the TotalFwUpdates field if non-nil, zero value otherwise. + +### GetTotalFwUpdatesOk + +`func (o *UsageEventsData) GetTotalFwUpdatesOk() (*int64, bool)` + +GetTotalFwUpdatesOk returns a tuple with the TotalFwUpdates field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalFwUpdates + +`func (o *UsageEventsData) SetTotalFwUpdates(v int64)` + +SetTotalFwUpdates sets TotalFwUpdates field to given value. + +### HasTotalFwUpdates + +`func (o *UsageEventsData) HasTotalFwUpdates() bool` + +HasTotalFwUpdates returns a boolean if a field has been set. + +### SetTotalFwUpdatesNil + +`func (o *UsageEventsData) SetTotalFwUpdatesNil(b bool)` + +SetTotalFwUpdatesNil sets the value for TotalFwUpdates to be an explicit nil + +### UnsetTotalFwUpdates + +`func (o *UsageEventsData) UnsetTotalFwUpdates()` + +UnsetTotalFwUpdates ensures that no value is present for TotalFwUpdates, not even an explicit nil + +### GetTotalReboots + +`func (o *UsageEventsData) GetTotalReboots() int64` + +GetTotalReboots returns the TotalReboots field if non-nil, zero value otherwise. + +### GetTotalRebootsOk + +`func (o *UsageEventsData) GetTotalRebootsOk() (*int64, bool)` + +GetTotalRebootsOk returns a tuple with the TotalReboots field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalReboots + +`func (o *UsageEventsData) SetTotalReboots(v int64)` + +SetTotalReboots sets TotalReboots field to given value. + +### HasTotalReboots + +`func (o *UsageEventsData) HasTotalReboots() bool` + +HasTotalReboots returns a boolean if a field has been set. + +### SetTotalRebootsNil + +`func (o *UsageEventsData) SetTotalRebootsNil(b bool)` + +SetTotalRebootsNil sets the value for TotalReboots to be an explicit nil + +### UnsetTotalReboots + +`func (o *UsageEventsData) UnsetTotalReboots()` + +UnsetTotalReboots ensures that no value is present for TotalReboots, not even an explicit nil + ### GetWatchdogEvents `func (o *UsageEventsData) GetWatchdogEvents() int64` diff --git a/docs/UsageRouteLogsData.md b/docs/UsageRouteLogsData.md index 5d52058..a31adb8 100644 --- a/docs/UsageRouteLogsData.md +++ b/docs/UsageRouteLogsData.md @@ -2,13 +2,14 @@ ## Properties -| Name | Type | Description | Notes | -| -------------------- | --------------------- | -------------------------------------------------------------- | ---------- | -| **FailedRoutes** | **int64** | | -| **Period** | **time.Time** | | -| **Route** | Pointer to **string** | The route UID (only present when aggregate is 'route') | [optional] | -| **SuccessfulRoutes** | **int64** | | -| **TotalRoutes** | **int64** | | +| Name | Type | Description | Notes | +| -------------------- | ------------------------------ | ----------------------------------------------------------------------------- | ---------- | +| **AvgLatencyMs** | Pointer to **NullableFloat64** | Average routing latency in milliseconds for route logs with recorded duration | [optional] | +| **FailedRoutes** | **int64** | | +| **Period** | **time.Time** | | +| **Route** | Pointer to **string** | The route UID (only present when aggregate is 'route') | [optional] | +| **SuccessfulRoutes** | **int64** | | +| **TotalRoutes** | **int64** | | ## Methods @@ -29,6 +30,43 @@ NewUsageRouteLogsDataWithDefaults instantiates a new UsageRouteLogsData object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set +### GetAvgLatencyMs + +`func (o *UsageRouteLogsData) GetAvgLatencyMs() float64` + +GetAvgLatencyMs returns the AvgLatencyMs field if non-nil, zero value otherwise. + +### GetAvgLatencyMsOk + +`func (o *UsageRouteLogsData) GetAvgLatencyMsOk() (*float64, bool)` + +GetAvgLatencyMsOk returns a tuple with the AvgLatencyMs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAvgLatencyMs + +`func (o *UsageRouteLogsData) SetAvgLatencyMs(v float64)` + +SetAvgLatencyMs sets AvgLatencyMs field to given value. + +### HasAvgLatencyMs + +`func (o *UsageRouteLogsData) HasAvgLatencyMs() bool` + +HasAvgLatencyMs returns a boolean if a field has been set. + +### SetAvgLatencyMsNil + +`func (o *UsageRouteLogsData) SetAvgLatencyMsNil(b bool)` + +SetAvgLatencyMsNil sets the value for AvgLatencyMs to be an explicit nil + +### UnsetAvgLatencyMs + +`func (o *UsageRouteLogsData) UnsetAvgLatencyMs()` + +UnsetAvgLatencyMs ensures that no value is present for AvgLatencyMs, not even an explicit nil + ### GetFailedRoutes `func (o *UsageRouteLogsData) GetFailedRoutes() int64` diff --git a/docs/UsageSessionsData.md b/docs/UsageSessionsData.md index 12638a6..8a601ca 100644 --- a/docs/UsageSessionsData.md +++ b/docs/UsageSessionsData.md @@ -2,15 +2,17 @@ ## Properties -| Name | Type | Description | Notes | -| --------------------- | --------------------- | -------------------------------------------- | ---------- | -| **Device** | Pointer to **string** | | [optional] | -| **FirstSyncSessions** | **int64** | Number of first sync sessions in this period | -| **Fleet** | Pointer to **string** | | [optional] | -| **Period** | **time.Time** | | -| **Sessions** | **int64** | | -| **TotalBytes** | **int64** | | -| **TotalDevices** | **int64** | | +| Name | Type | Description | Notes | +| ----------------------- | ------------------------------- | ---------------------------------------------------------------------------------- | ---------- | +| **Device** | Pointer to **string** | | [optional] | +| **FirstSyncSessions** | **int64** | Number of first sync sessions in this period | +| **Fleet** | Pointer to **string** | | [optional] | +| **Period** | **time.Time** | | +| **Sessions** | **int64** | | +| **SessionsByTransport** | Pointer to **map[string]int64** | Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan) | [optional] | +| **TlsSessions** | Pointer to **NullableInt64** | Number of TLS sessions in this period | [optional] | +| **TotalBytes** | **int64** | | +| **TotalDevices** | **int64** | | ## Methods @@ -138,6 +140,68 @@ and a boolean to check if the value has been set. SetSessions sets Sessions field to given value. +### GetSessionsByTransport + +`func (o *UsageSessionsData) GetSessionsByTransport() map[string]int64` + +GetSessionsByTransport returns the SessionsByTransport field if non-nil, zero value otherwise. + +### GetSessionsByTransportOk + +`func (o *UsageSessionsData) GetSessionsByTransportOk() (*map[string]int64, bool)` + +GetSessionsByTransportOk returns a tuple with the SessionsByTransport field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSessionsByTransport + +`func (o *UsageSessionsData) SetSessionsByTransport(v map[string]int64)` + +SetSessionsByTransport sets SessionsByTransport field to given value. + +### HasSessionsByTransport + +`func (o *UsageSessionsData) HasSessionsByTransport() bool` + +HasSessionsByTransport returns a boolean if a field has been set. + +### GetTlsSessions + +`func (o *UsageSessionsData) GetTlsSessions() int64` + +GetTlsSessions returns the TlsSessions field if non-nil, zero value otherwise. + +### GetTlsSessionsOk + +`func (o *UsageSessionsData) GetTlsSessionsOk() (*int64, bool)` + +GetTlsSessionsOk returns a tuple with the TlsSessions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsSessions + +`func (o *UsageSessionsData) SetTlsSessions(v int64)` + +SetTlsSessions sets TlsSessions field to given value. + +### HasTlsSessions + +`func (o *UsageSessionsData) HasTlsSessions() bool` + +HasTlsSessions returns a boolean if a field has been set. + +### SetTlsSessionsNil + +`func (o *UsageSessionsData) SetTlsSessionsNil(b bool)` + +SetTlsSessionsNil sets the value for TlsSessions to be an explicit nil + +### UnsetTlsSessions + +`func (o *UsageSessionsData) UnsetTlsSessions()` + +UnsetTlsSessions ensures that no value is present for TlsSessions, not even an explicit nil + ### GetTotalBytes `func (o *UsageSessionsData) GetTotalBytes() int64` diff --git a/model_firmware_info.go b/model_firmware_info.go index 38e562d..02f5a91 100644 --- a/model_firmware_info.go +++ b/model_firmware_info.go @@ -28,8 +28,12 @@ type FirmwareInfo struct { Description *string `json:"description,omitempty"` // The name of the firmware file. Filename *string `json:"filename,omitempty"` + // User-defined metadata + Info map[string]interface{} `json:"info,omitempty"` // The MD5 hash of the firmware file. Md5 *string `json:"md5,omitempty"` + // User-defined notes + Notes *string `json:"notes,omitempty"` // The organization that owns the firmware. Organization *string `json:"organization,omitempty"` // The product that the firmware is for. @@ -194,6 +198,38 @@ func (o *FirmwareInfo) SetFilename(v string) { o.Filename = &v } +// GetInfo returns the Info field value if set, zero value otherwise. +func (o *FirmwareInfo) GetInfo() map[string]interface{} { + if o == nil || IsNil(o.Info) { + var ret map[string]interface{} + return ret + } + return o.Info +} + +// GetInfoOk returns a tuple with the Info field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirmwareInfo) GetInfoOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Info) { + return map[string]interface{}{}, false + } + return o.Info, true +} + +// HasInfo returns a boolean if a field has been set. +func (o *FirmwareInfo) HasInfo() bool { + if o != nil && !IsNil(o.Info) { + return true + } + + return false +} + +// SetInfo gets a reference to the given map[string]interface{} and assigns it to the Info field. +func (o *FirmwareInfo) SetInfo(v map[string]interface{}) { + o.Info = v +} + // GetMd5 returns the Md5 field value if set, zero value otherwise. func (o *FirmwareInfo) GetMd5() string { if o == nil || IsNil(o.Md5) { @@ -226,6 +262,38 @@ func (o *FirmwareInfo) SetMd5(v string) { o.Md5 = &v } +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *FirmwareInfo) GetNotes() string { + if o == nil || IsNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirmwareInfo) GetNotesOk() (*string, bool) { + if o == nil || IsNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *FirmwareInfo) HasNotes() bool { + if o != nil && !IsNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *FirmwareInfo) SetNotes(v string) { + o.Notes = &v +} + // GetOrganization returns the Organization field value if set, zero value otherwise. func (o *FirmwareInfo) GetOrganization() string { if o == nil || IsNil(o.Organization) { @@ -472,9 +540,15 @@ func (o FirmwareInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.Filename) { toSerialize["filename"] = o.Filename } + if !IsNil(o.Info) { + toSerialize["info"] = o.Info + } if !IsNil(o.Md5) { toSerialize["md5"] = o.Md5 } + if !IsNil(o.Notes) { + toSerialize["notes"] = o.Notes + } if !IsNil(o.Organization) { toSerialize["organization"] = o.Organization } @@ -522,7 +596,9 @@ func (o *FirmwareInfo) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "created") delete(additionalProperties, "description") delete(additionalProperties, "filename") + delete(additionalProperties, "info") delete(additionalProperties, "md5") + delete(additionalProperties, "notes") delete(additionalProperties, "organization") delete(additionalProperties, "product") delete(additionalProperties, "published") diff --git a/model_usage_events_data.go b/model_usage_events_data.go index 2cf8fc0..7851be9 100644 --- a/model_usage_events_data.go +++ b/model_usage_events_data.go @@ -37,6 +37,10 @@ type UsageEventsData struct { TotalDevices int64 `json:"total_devices"` // Total events the device sent to notehub, including associated notehub generated events TotalEvents int64 `json:"total_events"` + // Number of firmware updates in this period (from _health.qo DFU events) + TotalFwUpdates NullableInt64 `json:"total_fw_updates,omitempty"` + // Number of device reboots in this period (from _health.qo boot events) + TotalReboots NullableInt64 `json:"total_reboots,omitempty"` // Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time. WatchdogEvents int64 `json:"watchdog_events"` AdditionalProperties map[string]interface{} @@ -322,6 +326,92 @@ func (o *UsageEventsData) SetTotalEvents(v int64) { o.TotalEvents = v } +// GetTotalFwUpdates returns the TotalFwUpdates field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UsageEventsData) GetTotalFwUpdates() int64 { + if o == nil || IsNil(o.TotalFwUpdates.Get()) { + var ret int64 + return ret + } + return *o.TotalFwUpdates.Get() +} + +// GetTotalFwUpdatesOk returns a tuple with the TotalFwUpdates field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UsageEventsData) GetTotalFwUpdatesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TotalFwUpdates.Get(), o.TotalFwUpdates.IsSet() +} + +// HasTotalFwUpdates returns a boolean if a field has been set. +func (o *UsageEventsData) HasTotalFwUpdates() bool { + if o != nil && o.TotalFwUpdates.IsSet() { + return true + } + + return false +} + +// SetTotalFwUpdates gets a reference to the given NullableInt64 and assigns it to the TotalFwUpdates field. +func (o *UsageEventsData) SetTotalFwUpdates(v int64) { + o.TotalFwUpdates.Set(&v) +} + +// SetTotalFwUpdatesNil sets the value for TotalFwUpdates to be an explicit nil +func (o *UsageEventsData) SetTotalFwUpdatesNil() { + o.TotalFwUpdates.Set(nil) +} + +// UnsetTotalFwUpdates ensures that no value is present for TotalFwUpdates, not even an explicit nil +func (o *UsageEventsData) UnsetTotalFwUpdates() { + o.TotalFwUpdates.Unset() +} + +// GetTotalReboots returns the TotalReboots field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UsageEventsData) GetTotalReboots() int64 { + if o == nil || IsNil(o.TotalReboots.Get()) { + var ret int64 + return ret + } + return *o.TotalReboots.Get() +} + +// GetTotalRebootsOk returns a tuple with the TotalReboots field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UsageEventsData) GetTotalRebootsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TotalReboots.Get(), o.TotalReboots.IsSet() +} + +// HasTotalReboots returns a boolean if a field has been set. +func (o *UsageEventsData) HasTotalReboots() bool { + if o != nil && o.TotalReboots.IsSet() { + return true + } + + return false +} + +// SetTotalReboots gets a reference to the given NullableInt64 and assigns it to the TotalReboots field. +func (o *UsageEventsData) SetTotalReboots(v int64) { + o.TotalReboots.Set(&v) +} + +// SetTotalRebootsNil sets the value for TotalReboots to be an explicit nil +func (o *UsageEventsData) SetTotalRebootsNil() { + o.TotalReboots.Set(nil) +} + +// UnsetTotalReboots ensures that no value is present for TotalReboots, not even an explicit nil +func (o *UsageEventsData) UnsetTotalReboots() { + o.TotalReboots.Unset() +} + // GetWatchdogEvents returns the WatchdogEvents field value func (o *UsageEventsData) GetWatchdogEvents() int64 { if o == nil { @@ -375,6 +465,12 @@ func (o UsageEventsData) ToMap() (map[string]interface{}, error) { } toSerialize["total_devices"] = o.TotalDevices toSerialize["total_events"] = o.TotalEvents + if o.TotalFwUpdates.IsSet() { + toSerialize["total_fw_updates"] = o.TotalFwUpdates.Get() + } + if o.TotalReboots.IsSet() { + toSerialize["total_reboots"] = o.TotalReboots.Get() + } toSerialize["watchdog_events"] = o.WatchdogEvents for key, value := range o.AdditionalProperties { @@ -432,6 +528,8 @@ func (o *UsageEventsData) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "total_days_in_period") delete(additionalProperties, "total_devices") delete(additionalProperties, "total_events") + delete(additionalProperties, "total_fw_updates") + delete(additionalProperties, "total_reboots") delete(additionalProperties, "watchdog_events") o.AdditionalProperties = additionalProperties } diff --git a/model_usage_route_logs_data.go b/model_usage_route_logs_data.go index 477808f..77923a7 100644 --- a/model_usage_route_logs_data.go +++ b/model_usage_route_logs_data.go @@ -22,8 +22,10 @@ var _ MappedNullable = &UsageRouteLogsData{} // UsageRouteLogsData struct for UsageRouteLogsData type UsageRouteLogsData struct { - FailedRoutes int64 `json:"failed_routes"` - Period time.Time `json:"period"` + // Average routing latency in milliseconds for route logs with recorded duration + AvgLatencyMs NullableFloat64 `json:"avg_latency_ms,omitempty"` + FailedRoutes int64 `json:"failed_routes"` + Period time.Time `json:"period"` // The route UID (only present when aggregate is 'route') Route *string `json:"route,omitempty"` SuccessfulRoutes int64 `json:"successful_routes"` @@ -54,6 +56,49 @@ func NewUsageRouteLogsDataWithDefaults() *UsageRouteLogsData { return &this } +// GetAvgLatencyMs returns the AvgLatencyMs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UsageRouteLogsData) GetAvgLatencyMs() float64 { + if o == nil || IsNil(o.AvgLatencyMs.Get()) { + var ret float64 + return ret + } + return *o.AvgLatencyMs.Get() +} + +// GetAvgLatencyMsOk returns a tuple with the AvgLatencyMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UsageRouteLogsData) GetAvgLatencyMsOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.AvgLatencyMs.Get(), o.AvgLatencyMs.IsSet() +} + +// HasAvgLatencyMs returns a boolean if a field has been set. +func (o *UsageRouteLogsData) HasAvgLatencyMs() bool { + if o != nil && o.AvgLatencyMs.IsSet() { + return true + } + + return false +} + +// SetAvgLatencyMs gets a reference to the given NullableFloat64 and assigns it to the AvgLatencyMs field. +func (o *UsageRouteLogsData) SetAvgLatencyMs(v float64) { + o.AvgLatencyMs.Set(&v) +} + +// SetAvgLatencyMsNil sets the value for AvgLatencyMs to be an explicit nil +func (o *UsageRouteLogsData) SetAvgLatencyMsNil() { + o.AvgLatencyMs.Set(nil) +} + +// UnsetAvgLatencyMs ensures that no value is present for AvgLatencyMs, not even an explicit nil +func (o *UsageRouteLogsData) UnsetAvgLatencyMs() { + o.AvgLatencyMs.Unset() +} + // GetFailedRoutes returns the FailedRoutes field value func (o *UsageRouteLogsData) GetFailedRoutes() int64 { if o == nil { @@ -192,6 +237,9 @@ func (o UsageRouteLogsData) MarshalJSON() ([]byte, error) { func (o UsageRouteLogsData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if o.AvgLatencyMs.IsSet() { + toSerialize["avg_latency_ms"] = o.AvgLatencyMs.Get() + } toSerialize["failed_routes"] = o.FailedRoutes toSerialize["period"] = o.Period if !IsNil(o.Route) { @@ -245,6 +293,7 @@ func (o *UsageRouteLogsData) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "avg_latency_ms") delete(additionalProperties, "failed_routes") delete(additionalProperties, "period") delete(additionalProperties, "route") diff --git a/model_usage_sessions_data.go b/model_usage_sessions_data.go index 34926f1..7d8f20f 100644 --- a/model_usage_sessions_data.go +++ b/model_usage_sessions_data.go @@ -24,12 +24,16 @@ var _ MappedNullable = &UsageSessionsData{} type UsageSessionsData struct { Device *string `json:"device,omitempty"` // Number of first sync sessions in this period - FirstSyncSessions int64 `json:"first_sync_sessions"` - Fleet *string `json:"fleet,omitempty"` - Period time.Time `json:"period"` - Sessions int64 `json:"sessions"` - TotalBytes int64 `json:"total_bytes"` - TotalDevices int64 `json:"total_devices"` + FirstSyncSessions int64 `json:"first_sync_sessions"` + Fleet *string `json:"fleet,omitempty"` + Period time.Time `json:"period"` + Sessions int64 `json:"sessions"` + // Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan) + SessionsByTransport *map[string]int64 `json:"sessions_by_transport,omitempty"` + // Number of TLS sessions in this period + TlsSessions NullableInt64 `json:"tls_sessions,omitempty"` + TotalBytes int64 `json:"total_bytes"` + TotalDevices int64 `json:"total_devices"` AdditionalProperties map[string]interface{} } @@ -193,6 +197,81 @@ func (o *UsageSessionsData) SetSessions(v int64) { o.Sessions = v } +// GetSessionsByTransport returns the SessionsByTransport field value if set, zero value otherwise. +func (o *UsageSessionsData) GetSessionsByTransport() map[string]int64 { + if o == nil || IsNil(o.SessionsByTransport) { + var ret map[string]int64 + return ret + } + return *o.SessionsByTransport +} + +// GetSessionsByTransportOk returns a tuple with the SessionsByTransport field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSessionsData) GetSessionsByTransportOk() (*map[string]int64, bool) { + if o == nil || IsNil(o.SessionsByTransport) { + return nil, false + } + return o.SessionsByTransport, true +} + +// HasSessionsByTransport returns a boolean if a field has been set. +func (o *UsageSessionsData) HasSessionsByTransport() bool { + if o != nil && !IsNil(o.SessionsByTransport) { + return true + } + + return false +} + +// SetSessionsByTransport gets a reference to the given map[string]int64 and assigns it to the SessionsByTransport field. +func (o *UsageSessionsData) SetSessionsByTransport(v map[string]int64) { + o.SessionsByTransport = &v +} + +// GetTlsSessions returns the TlsSessions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UsageSessionsData) GetTlsSessions() int64 { + if o == nil || IsNil(o.TlsSessions.Get()) { + var ret int64 + return ret + } + return *o.TlsSessions.Get() +} + +// GetTlsSessionsOk returns a tuple with the TlsSessions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UsageSessionsData) GetTlsSessionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TlsSessions.Get(), o.TlsSessions.IsSet() +} + +// HasTlsSessions returns a boolean if a field has been set. +func (o *UsageSessionsData) HasTlsSessions() bool { + if o != nil && o.TlsSessions.IsSet() { + return true + } + + return false +} + +// SetTlsSessions gets a reference to the given NullableInt64 and assigns it to the TlsSessions field. +func (o *UsageSessionsData) SetTlsSessions(v int64) { + o.TlsSessions.Set(&v) +} + +// SetTlsSessionsNil sets the value for TlsSessions to be an explicit nil +func (o *UsageSessionsData) SetTlsSessionsNil() { + o.TlsSessions.Set(nil) +} + +// UnsetTlsSessions ensures that no value is present for TlsSessions, not even an explicit nil +func (o *UsageSessionsData) UnsetTlsSessions() { + o.TlsSessions.Unset() +} + // GetTotalBytes returns the TotalBytes field value func (o *UsageSessionsData) GetTotalBytes() int64 { if o == nil { @@ -260,6 +339,12 @@ func (o UsageSessionsData) ToMap() (map[string]interface{}, error) { } toSerialize["period"] = o.Period toSerialize["sessions"] = o.Sessions + if !IsNil(o.SessionsByTransport) { + toSerialize["sessions_by_transport"] = o.SessionsByTransport + } + if o.TlsSessions.IsSet() { + toSerialize["tls_sessions"] = o.TlsSessions.Get() + } toSerialize["total_bytes"] = o.TotalBytes toSerialize["total_devices"] = o.TotalDevices @@ -314,6 +399,8 @@ func (o *UsageSessionsData) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "fleet") delete(additionalProperties, "period") delete(additionalProperties, "sessions") + delete(additionalProperties, "sessions_by_transport") + delete(additionalProperties, "tls_sessions") delete(additionalProperties, "total_bytes") delete(additionalProperties, "total_devices") o.AdditionalProperties = additionalProperties diff --git a/openapi.yaml b/openapi.yaml index 0a55143..c5987b7 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3,14 +3,14 @@ info: contact: email: engineering@blues.io name: Blues Engineering - url: 'https://dev.blues.io/support/' + url: https://dev.blues.io/support/ description: | The OpenAPI definition for the Notehub.io API. title: Notehub API version: 1.2.0 servers: - description: Production server - url: 'https://api.notefile.net' + url: https://api.notefile.net paths: /auth/login: post: @@ -46,6 +46,8 @@ paths: description: Internal Server Error tags: - authorization + x-custom-attributes: + permission: create /oauth2/token: post: operationId: OAuth2ClientCredentials @@ -143,7 +145,9 @@ paths: - personalAccessToken: [] tags: - billing_account - '/v1/billing-accounts/{billingAccountUID}': + x-custom-attributes: + permission: read + /v1/billing-accounts/{billingAccountUID}: get: operationId: GetBillingAccount description: Get Billing Account Information @@ -191,10 +195,12 @@ paths: - personalAccessToken: [] tags: - billing_account - '/v1/billing-accounts/{billingAccountUID}/balance-history': + x-custom-attributes: + permission: read + /v1/billing-accounts/{billingAccountUID}/balance-history: get: operationId: GetBillingAccountBalanceHistory - description: 'Get Billing Account Balance history, only enterprise supported' + description: Get Billing Account Balance history parameters: - $ref: '#/components/parameters/billingAccountUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -217,8 +223,12 @@ paths: remaining_event_capacity: type: integer format: int64 + total_event_capacity_used: + type: integer + format: int64 required: - remaining_event_capacity + - total_event_capacity_used - period type: object default: @@ -227,7 +237,9 @@ paths: - personalAccessToken: [] tags: - billing_account - '/v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin': + x-custom-attributes: + permission: read + /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin: get: operationId: GetDeviceEnvironmentVariablesByPin description: Get environment variables of a device with device pin authorization @@ -236,8 +248,12 @@ paths: $ref: '#/components/responses/GetDeviceEnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -257,9 +273,83 @@ paths: $ref: '#/components/responses/EnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] tags: - device - '/v1/products/{productUID}/ext-devices/{deviceUID}/event': + x-custom-attributes: + permission: update + /v1/products/{productUID}/devices/{deviceUID}/webhook-event: + post: + operationId: CreateLegacyWebhookEvent + description: Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + requestBody: + description: A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload. + required: true + content: + application/json: + example: + body: + key: value + file: data.qo + payload: SGVsbG8sIFdvcmxkIQ== + schema: + type: object + properties: + body: + description: Arbitrary JSON event body. + type: object + additionalProperties: true + file: + description: The notefile to which the event should be written. + type: string + payload: + description: Optional base64-encoded binary payload. + type: string + additionalProperties: true + responses: + '200': + description: Event created successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/devices/{deviceUID}/webhook-session: + put: + operationId: UpdateLegacyWebhookSession + description: Legacy endpoint for opening or updating a webhook session for the given device (provisioning the device if necessary). Used by external services that need to maintain a callable session against a device behind a webhook. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + requestBody: + description: Optional session metadata. + required: false + content: + application/json: + schema: + type: object + additionalProperties: true + responses: + '200': + description: Webhook session updated successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/ext-devices/{deviceUID}/event: post: operationId: CreateEventExtDevice description: Creates an event using specified webhook @@ -282,7 +372,10 @@ paths: - personalAccessToken: [] tags: - external devices - '/v1/products/{productUID}/ext-devices/{deviceUID}/session/close': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/ext-devices/{deviceUID}/session/close: post: operationId: ExtDeviceSessionClose description: Closes the session for the specified device if open @@ -305,7 +398,10 @@ paths: - personalAccessToken: [] tags: - external devices - '/v1/products/{productUID}/ext-devices/{deviceUID}/session/open': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/ext-devices/{deviceUID}/session/open: post: operationId: ExtDeviceSessionOpen description: Create a Session for the specified device. | If a session is currently open it will be closed and a new one opened. @@ -328,7 +424,10 @@ paths: - personalAccessToken: [] tags: - external devices - '/v1/products/{productUID}/project': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/project: get: operationId: GetProjectByProduct description: Get a Project by ProductUID @@ -352,6 +451,114 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event: + post: + operationId: CreateWebhookDeviceEventByProduct + description: Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + requestBody: + description: The event body (arbitrary JSON) + required: true + content: + application/json: + schema: + type: object + additionalProperties: true + responses: + '200': + description: Event created successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/webhooks/{webhookUID}/event: + post: + operationId: CreateWebhookEventByProduct + description: Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' + requestBody: + description: The event body (arbitrary JSON) + required: true + content: + application/json: + schema: + type: object + additionalProperties: true + responses: + '200': + description: Event created successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/webhooks/{webhookUID}/settings: + get: + operationId: GetWebhookSettingsByProduct + description: Retrieves the configuration settings for the specified webhook, addressed by productUID. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' + responses: + '200': + description: Webhook settings retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookSettings' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings + put: + operationId: UpdateWebhookSettingsByProduct + description: Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' + requestBody: + required: true + content: + application/json: + example: + disabled: false + transform: '{"device":body.end_device_ids.dev_eui,"sn":body.end_device_ids.device_id,"body":body.uplink_message.decoded_payload,"details":body}' + schema: + $ref: '#/components/schemas/WebhookSettings' + responses: + '200': + description: Webhook settings updated successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings /v1/projects: get: operationId: GetProjects @@ -374,6 +581,8 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read post: operationId: CreateProject description: Create a Project @@ -408,7 +617,9 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}': + x-custom-attributes: + permission: create + /v1/projects/{projectOrProductUID}: delete: operationId: DeleteProject description: Delete a Project by ProjectUID @@ -423,6 +634,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings get: operationId: GetProject description: Get a Project by ProjectUID @@ -441,7 +655,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/alerts': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/alerts: get: operationId: GetAlerts description: Get list of defined Alerts @@ -459,7 +676,10 @@ paths: - personalAccessToken: [] tags: - alert - '/v1/projects/{projectOrProductUID}/aws-role-config': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/aws-role-config: get: operationId: GetAWSRoleConfig summary: Get AWS role configuration for role-based authentication @@ -481,7 +701,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/clone': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/clone: post: operationId: CloneProject description: Clone a Project @@ -496,7 +719,7 @@ paths: type: object properties: billing_account_uid: - description: 'The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned.' + description: The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned. type: string disable_clone_fleets: description: Whether to disallow the cloning of the fleets from the parent project. Default is false if not specified. @@ -523,7 +746,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/devices': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/devices: get: operationId: GetDevices description: Get Devices of a Project @@ -549,7 +775,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}: delete: operationId: DeleteDevice description: Delete Device @@ -562,6 +791,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:devices get: operationId: GetDevice description: Get Device @@ -578,10 +810,13 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history': + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history: get: operationId: GetDeviceDfuHistory description: Get device DFU history for host or Notecard firmware @@ -602,7 +837,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status: get: operationId: GetDeviceDfuStatus description: Get device DFU history for host or Notecard firmware @@ -623,7 +861,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable: post: operationId: DisableDevice description: Disable Device @@ -639,7 +880,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable': + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable: post: operationId: EnableDevice description: Enable Device @@ -655,7 +899,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy': + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy: get: operationId: GetDeviceEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -677,7 +924,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables: get: operationId: GetDeviceEnvironmentVariables description: Get environment variables of a device @@ -690,6 +940,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -712,7 +965,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}': + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}: delete: operationId: DeleteDeviceEnvironmentVariable description: Delete environment variable of a device @@ -734,7 +990,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files': + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files: delete: operationId: DeleteNotefiles description: Deletes Notefiles and the Notes they contain. @@ -762,6 +1021,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:notefiles get: operationId: ListNotefiles description: Lists .qi and .db files for the device @@ -795,7 +1057,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:notefiles + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets: delete: operationId: DeleteDeviceFromFleets description: Remove Device from Fleets @@ -824,6 +1089,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:devices get: operationId: GetDeviceFleets description: Get Device Fleets @@ -836,6 +1104,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -867,7 +1138,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log': + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log: get: operationId: GetDeviceHealthLog description: Get Device Health Log @@ -919,7 +1193,129 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys: + get: + operationId: GetDeviceJourneys + description: | + Get the list of journeys for a device, derived from `_track.qo` events. Returns journey metadata only (no event payloads). Capped at 100 most recent journeys; `has_more` is true when the cap is hit. + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/startDateParam' + - $ref: '#/components/parameters/endDateParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + has_more: + type: boolean + journeys: + type: array + items: + properties: + end_date: + description: Latest event time within the journey. + type: string + format: date-time + journey_id: + description: | + Identifier of the journey, taken from the `journey` field on `_track.qo` events. This value is itself a Unix timestamp marking the start of the journey. + type: integer + format: int64 + start_date: + description: Earliest event time within the journey. + type: string + format: date-time + required: + - journey_id + - start_date + - end_date + type: object + required: + - journeys + - has_more + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys/{journeyID}: + get: + operationId: GetDeviceJourney + description: | + Get a single journey for a device along with its `_track.qo` events. The events array is paginated via `pageSize` / `pageNum`; use `journey.has_more` to detect additional pages. + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - name: journeyID + in: path + description: | + Identifier of the journey, taken from the `journey` field on `_track.qo` events (a Unix timestamp marking the start of the journey). + required: true + schema: + type: integer + format: int64 + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + end_date: + description: Latest event time within the journey. + type: string + format: date-time + journey: + description: Paginated `_track.qo` events for the journey. + type: object + properties: + events: + type: array + items: + $ref: '#/components/schemas/Event' + has_more: + type: boolean + required: + - events + - has_more + journey_id: + description: Identifier of the journey. + type: integer + format: int64 + start_date: + description: Earliest event time within the journey. + type: string + format: date-time + required: + - journey_id + - start_date + - end_date + - journey + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest: get: operationId: GetDeviceLatestEvents description: Get Device Latest Events @@ -935,7 +1331,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}: post: operationId: CreateNotefile description: Creates an empty Notefile on the device. @@ -952,10 +1351,13 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notefiles + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}: get: operationId: GetNotefile - description: 'For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile' + description: For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1001,9 +1403,12 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:notefiles post: operationId: AddQiNote - description: 'Adds a Note to a Notefile, creating the Notefile if it doesn''t yet exist.' + description: Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist. parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1024,7 +1429,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}: delete: operationId: DeleteNote description: Delete a note from a .db or .qi notefile @@ -1042,6 +1450,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:notes get: operationId: GetDbNote description: Get a note from a .db or .qi notefile @@ -1085,6 +1496,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:notes post: operationId: AddDbNote description: Add a Note to a .db notefile. if noteID is '-' then payload is ignored and empty notefile is created @@ -1109,6 +1523,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes put: operationId: UpdateDbNote description: Update a note in a .db or .qi notefile @@ -1133,10 +1550,13 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans': + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:notes + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans: get: operationId: GetDevicePlans - description: 'Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections.' + description: Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections. responses: '200': $ref: '#/components/responses/DevicePlansResponse' @@ -1146,10 +1566,13 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision': + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision: post: operationId: ProvisionDevice description: Provision Device for a Project @@ -1192,7 +1615,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key: get: operationId: GetDevicePublicKey description: Get Device Public Key @@ -1220,7 +1646,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions: get: operationId: GetDeviceSessions description: Get Device Sessions @@ -1241,7 +1670,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal: post: operationId: SignalDevice description: Send a signal from Notehub to a Notecard. @@ -1272,7 +1704,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/public-keys': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/public-keys: get: operationId: GetDevicePublicKeys description: Get Device Public Keys of a Project @@ -1308,7 +1743,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}: post: operationId: PerformDfuAction description: Update/cancel host or notecard firmware updates @@ -1341,7 +1779,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history: get: operationId: GetDevicesDfuHistory description: Get host or Notecard DFU history for all devices that match the filter criteria @@ -1374,7 +1815,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status: get: operationId: GetDevicesDfuStatus description: Get host or Notecard DFU history for all devices that match the filter criteria @@ -1407,7 +1851,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/environment_hierarchy': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/environment_hierarchy: get: operationId: GetProjectEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -1428,7 +1875,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/environment_variables': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/environment_variables: get: operationId: GetProjectEnvironmentVariables description: Get environment variables of a project @@ -1441,6 +1891,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' put: @@ -1460,7 +1913,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/environment_variables/{key}': + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/environment_variables/{key}: delete: operationId: DeleteProjectEnvironmentVariable description: Delete an environment variable of a project by key @@ -1481,7 +1937,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/events': + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/events: get: operationId: GetEvents description: Get Events of a Project @@ -1528,7 +1987,10 @@ paths: - personalAccessToken: [] tags: - event - '/v1/projects/{projectOrProductUID}/events-cursor': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/events-cursor: get: operationId: GetEventsByCursor description: Get Events of a Project by cursor @@ -1550,7 +2012,10 @@ paths: - personalAccessToken: [] tags: - event - '/v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs: get: operationId: GetRouteLogsByEvent description: Get Route Logs by Event UID @@ -1572,7 +2037,10 @@ paths: - personalAccessToken: [] tags: - event - '/v1/projects/{projectOrProductUID}/firmware': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/firmware: get: operationId: GetFirmwareInfo description: Get Available Firmware Information @@ -1602,7 +2070,40 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}: + delete: + operationId: DeleteFirmware + description: | + Delete a host firmware binary. The filename must be the full stored filename including the timestamp suffix (e.g. test$20260324190911.bin) as returned by the firmware upload or list endpoints. + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - name: firmwareType + in: path + required: true + schema: + type: string + enum: + - host + - name: filename + in: path + required: true + schema: + type: string + responses: + '204': + description: Firmware deleted successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings get: operationId: DownloadFirmware description: Download firmware binary @@ -1628,6 +2129,50 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + post: + operationId: UpdateFirmware + description: | + Update the metadata of an existing host firmware entry. The filename must be the full stored filename including the timestamp suffix (e.g. test$20260324190911.bin) as returned by the firmware upload or list endpoints. + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - name: firmwareType + in: path + required: true + schema: + type: string + enum: + - host + - name: filename + in: path + required: true + schema: + type: string + requestBody: + description: Firmware metadata fields to update. All fields are optional; only provided fields will be updated. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateHostFirmwareRequest' + responses: + '200': + description: Update successful + content: + application/json: + schema: + $ref: '#/components/schemas/FirmwareInfo' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings put: operationId: UploadFirmware description: Upload firmware binary @@ -1641,7 +2186,7 @@ paths: type: string - name: version in: query - description: 'Firmware version (optional). If not provided, the version will be extracted from firmware binary if available, otherwise left empty' + description: Firmware version (optional). If not provided, the version will be extracted from firmware binary if available, otherwise left empty required: false schema: type: string @@ -1672,7 +2217,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/fleets': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/fleets: get: operationId: GetFleets description: Get Project Fleets @@ -1685,6 +2233,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:fleets parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -1701,7 +2252,7 @@ paths: connectivity_assurance: $ref: '#/components/schemas/FleetConnectivityAssurance' label: - description: 'The label, or name, for the Fleet.' + description: The label, or name, for the Fleet. type: string smart_rule: $ref: '#/components/schemas/FleetRule' @@ -1720,7 +2271,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}: delete: operationId: DeleteFleet description: Delete Fleet @@ -1733,6 +2287,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:fleets get: operationId: GetFleet description: Get Fleet @@ -1747,6 +2304,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:fleets parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -1797,7 +2357,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices': + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices: get: operationId: GetFleetDevices description: Get Devices of a Fleet within a Project @@ -1823,7 +2386,10 @@ paths: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy: get: operationId: GetFleetEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -1845,7 +2411,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables: get: operationId: GetFleetEnvironmentVariables description: Get environment variables of a fleet @@ -1858,6 +2427,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:fleets parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -1880,7 +2452,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}': + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}: delete: operationId: DeleteFleetEnvironmentVariable description: Delete environment variables of a fleet @@ -1902,7 +2477,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events': + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events: get: operationId: GetFleetEvents description: Get Events of a Fleet @@ -1935,97 +2513,308 @@ paths: deprecated: true - name: since in: query - description: Deprecated. - required: false + description: Deprecated. + required: false + schema: + type: string + deprecated: true + responses: + '200': + $ref: '#/components/responses/EventsResponse' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - event + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor: + get: + operationId: GetFleetEventsByCursor + description: Get Events of a Fleet by cursor + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/fleetUIDParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/cursorParam' + - $ref: '#/components/parameters/sortOrderParam' + - $ref: '#/components/parameters/systemFilesOnlyParam' + - $ref: '#/components/parameters/filesQueryParam' + - $ref: '#/components/parameters/deviceUIDParamQuery' + - $ref: '#/components/parameters/startDateParam' + - $ref: '#/components/parameters/endDateParam' + responses: + '200': + $ref: '#/components/responses/EventsByCursorResponse' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - event + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/global-transformation: + post: + operationId: SetGlobalEventTransformation + description: Set the project-level event JSONata transformation + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + requestBody: + description: JSONata expression which will be applied to each event before it is persisted and routed + required: true + content: + text/plain: + schema: + type: string + responses: + '200': + description: Successful operation + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/global-transformation/disable: + post: + operationId: DisableGlobalEventTransformation + description: Disable the project-level event JSONata transformation + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + responses: + '200': + description: Successful operation + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/global-transformation/enable: + post: + operationId: EnableGlobalEventTransformation + description: Enable the project-level event JSONata transformation + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + responses: + '200': + description: Successful operation + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs: + get: + operationId: GetJobs + description: List all batch jobs for a project + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + responses: + '200': + $ref: '#/components/responses/GetJobsResponse' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - jobs + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + post: + operationId: CreateJob + description: Create a new batch job with an optional name + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - name: name + in: query + description: Name for the job + required: true schema: type: string - deprecated: true + requestBody: + description: The job definition as raw JSON + required: true + content: + application/json: + schema: + description: Job definition (structure varies by job type) + type: object + responses: + '201': + $ref: '#/components/responses/CreateJobResponse' + '400': + description: Missing required name parameter or invalid job definition + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - jobs + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/{jobUID}: + delete: + operationId: DeleteJob + description: Delete a batch job + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/jobUIDParam' responses: '200': - $ref: '#/components/responses/EventsResponse' + $ref: '#/components/responses/DeleteJobResponse' + '404': + description: Job not found default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - - event - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor': + - jobs + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings get: - operationId: GetFleetEventsByCursor - description: Get Events of a Fleet by cursor + operationId: GetJob + description: Get a specific batch job definition parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/fleetUIDParam' - - $ref: '#/components/parameters/limitParam' - - $ref: '#/components/parameters/cursorParam' - - $ref: '#/components/parameters/sortOrderParam' - - $ref: '#/components/parameters/systemFilesOnlyParam' - - $ref: '#/components/parameters/filesQueryParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' - - $ref: '#/components/parameters/startDateParam' - - $ref: '#/components/parameters/endDateParam' + - $ref: '#/components/parameters/jobUIDParam' responses: '200': - $ref: '#/components/responses/EventsByCursorResponse' + $ref: '#/components/responses/GetJobResponse' + '404': + description: Job not found default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - - event - '/v1/projects/{projectOrProductUID}/global-transformation': + - jobs + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/{jobUID}/run: post: - operationId: SetGlobalEventTransformation - description: Set the project-level event JSONata transformation + operationId: RunJob + description: Execute a batch job parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - requestBody: - description: JSONata expression which will be applied to each event before it is persisted and routed - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/JSONata' + - $ref: '#/components/parameters/jobUIDParam' + - name: dry_run + in: query + description: Run job in dry-run mode without making actual changes + required: false + schema: + type: boolean + default: false responses: '200': - description: Successful operation + $ref: '#/components/responses/RunJobResponse' + '404': + description: Job not found default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - - project - '/v1/projects/{projectOrProductUID}/global-transformation/disable': - post: - operationId: DisableGlobalEventTransformation - description: Disable the project-level event JSONata transformation + - jobs + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs: + get: + operationId: GetJobRuns + description: List all runs for a specific job parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/jobUIDParam' + - name: status + in: query + description: Filter runs by status + required: false + schema: + type: string + - name: dry_run + in: query + description: Filter runs by dry run flag + required: false + schema: + type: boolean + nullable: true responses: '200': - description: Successful operation + $ref: '#/components/responses/GetJobRunsResponse' + '404': + description: Job not found default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - - project - '/v1/projects/{projectOrProductUID}/global-transformation/enable': + - jobs + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}: + get: + operationId: GetJobRun + description: Get the result of a job execution + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/reportUIDParam' + responses: + '200': + $ref: '#/components/responses/GetJobRunResponse' + '404': + description: Run not found + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - jobs + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel: post: - operationId: EnableGlobalEventTransformation - description: Enable the project-level event JSONata transformation + operationId: CancelJobRun + description: Cancel a running job execution parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/reportUIDParam' responses: '200': - description: Successful operation + $ref: '#/components/responses/CancelJobRunResponse' + '404': + description: Run not found default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - - project - '/v1/projects/{projectOrProductUID}/members': + - jobs + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/members: get: operationId: GetProjectMembers description: Get Project Members @@ -2049,9 +2838,12 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:accounts parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - '/v1/projects/{projectOrProductUID}/monitors': + /v1/projects/{projectOrProductUID}/monitors: get: operationId: GetMonitors description: Get list of defined Monitors @@ -2066,6 +2858,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices post: operationId: CreateMonitor description: Create a new Monitor @@ -2091,7 +2886,10 @@ paths: - personalAccessToken: [] tags: - monitor - '/v1/projects/{projectOrProductUID}/monitors/{monitorUID}': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/monitors/{monitorUID}: delete: operationId: DeleteMonitor description: Delete Monitor @@ -2111,6 +2909,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:devices get: operationId: GetMonitor description: Get Monitor @@ -2130,6 +2931,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices put: operationId: UpdateMonitor description: Update Monitor @@ -2156,7 +2960,10 @@ paths: - personalAccessToken: [] tags: - monitor - '/v1/projects/{projectOrProductUID}/products': + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/products: get: operationId: GetProducts description: Get Products within a Project @@ -2178,6 +2985,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:products parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -2196,7 +3006,7 @@ paths: items: type: string disable_devices_by_default: - description: 'If `true`, devices provisioned to this product will be automatically disabled by default.' + description: If `true`, devices provisioned to this product will be automatically disabled by default. type: boolean label: description: The label for the Product. @@ -2220,7 +3030,10 @@ paths: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/products/{productUID}': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/products/{productUID}: delete: operationId: DeleteProduct description: Delete a product @@ -2233,10 +3046,13 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/productUIDParam' - '/v1/projects/{projectOrProductUID}/routes': + /v1/projects/{projectOrProductUID}/routes: get: operationId: GetRoutes description: Get all Routes within a Project @@ -2250,34 +3066,34 @@ paths: example: - disabled: false label: success route - modified: '2020-03-09T17:58:37Z' + modified: 2020-03-09T17:58:37Z type: http - uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + uid: route:8d65a087d5d290ce5bdf03aeff2becc0 - disabled: false label: failing route - modified: '2020-03-09T17:59:15Z' + modified: 2020-03-09T17:59:15Z type: http - uid: 'route:a9eaad31d5cee8d01a42762f71fb777a' + uid: route:a9eaad31d5cee8d01a42762f71fb777a - disabled: true label: disabled route - modified: '2020-03-09T17:59:44Z' + modified: 2020-03-09T17:59:44Z type: http - uid: 'route:02ddc0e6e236c2a7e482da62047229ad' + uid: route:02ddc0e6e236c2a7e482da62047229ad - disabled: false label: Proxy Route - modified: '2020-03-09T17:58:36Z' + modified: 2020-03-09T17:58:36Z type: proxy - uid: 'route:0ac565deb7b478a250bb82348b9cfdd4' + uid: route:0ac565deb7b478a250bb82348b9cfdd4 - disabled: false label: Myjsonlive Webtest - modified: '2020-03-09T17:58:35Z' + modified: 2020-03-09T17:58:35Z type: proxy - uid: 'route:fb1b9e0aba1bf030311ba2c3c1e3efd7' + uid: route:fb1b9e0aba1bf030311ba2c3c1e3efd7 - disabled: false label: Myjsonlive Echo - modified: '2020-03-09T17:58:34Z' + modified: 2020-03-09T17:58:34Z type: proxy - uid: 'route:7804818f84a3be6193e14d804fe7fca7' + uid: route:7804818f84a3be6193e14d804fe7fca7 schema: type: array items: @@ -2289,6 +3105,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:routes post: operationId: CreateRoute description: Create Route within a Project @@ -2307,13 +3126,13 @@ paths: disable_http_headers: false filter: {} fleets: - - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d http_headers: X-My-Header: value throttle_ms: 100 timeout: 5000 transform: {} - url: 'https://example.com/ingest' + url: https://example.com/ingest label: Route Label schema: $ref: '#/components/schemas/NotehubRoute' @@ -2330,16 +3149,16 @@ paths: system_notefiles: false type: '' fleets: - - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d http_headers: null throttle_ms: 100 timeout: 0 transform: {} - url: 'http://route.url' + url: http://route.url label: Route Label - modified: '2020-03-09T17:59:44Z' + modified: 2020-03-09T17:59:44Z type: http - uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + uid: route:8d65a087d5d290ce5bdf03aeff2becc0 schema: $ref: '#/components/schemas/NotehubRoute' default: @@ -2348,7 +3167,10 @@ paths: - personalAccessToken: [] tags: - route - '/v1/projects/{projectOrProductUID}/routes/{routeUID}': + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:routes + /v1/projects/{projectOrProductUID}/routes/{routeUID}: delete: operationId: DeleteRoute description: Delete single route within a project @@ -2364,6 +3186,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:routes get: operationId: GetRoute description: Get single route within a project @@ -2383,16 +3208,16 @@ paths: system_notefiles: false type: '' fleets: - - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d http_headers: null throttle_ms: 100 timeout: 0 transform: {} - url: 'http://route.url' + url: http://route.url label: Route Label - modified: '2020-03-09T17:59:44Z' + modified: 2020-03-09T17:59:44Z type: http - uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + uid: route:8d65a087d5d290ce5bdf03aeff2becc0 schema: $ref: '#/components/schemas/NotehubRoute' default: @@ -2401,6 +3226,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:routes put: operationId: UpdateRoute description: Update route by UID @@ -2461,7 +3289,10 @@ paths: - personalAccessToken: [] tags: - route - '/v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs': + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:routes + /v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs: get: operationId: GetRouteLogsByRoute description: Get Route Logs by Route UID @@ -2495,7 +3326,10 @@ paths: - personalAccessToken: [] tags: - route - '/v1/projects/{projectOrProductUID}/schemas': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:routes + /v1/projects/{projectOrProductUID}/schemas: get: operationId: GetNotefileSchemas summary: Get variable format for a notefile @@ -2510,9 +3344,14 @@ paths: type: array items: $ref: '#/components/schemas/NotefileSchema' + security: + - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/usage/data': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/usage/data: get: operationId: GetDataUsage description: Get data usage in bytes for a project with time range and period aggregation @@ -2553,10 +3392,13 @@ paths: - personalAccessToken: [] tags: - usage - '/v1/projects/{projectOrProductUID}/usage/events': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/usage/events: get: operationId: GetEventsUsage - description: 'Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' + description: Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -2597,7 +3439,7 @@ paths: style: form - name: skipRecentData in: query - description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' + description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. required: false schema: type: boolean @@ -2622,10 +3464,13 @@ paths: - personalAccessToken: [] tags: - usage - '/v1/projects/{projectOrProductUID}/usage/route-logs': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/usage/route-logs: get: operationId: GetRouteLogsUsage - description: 'Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' + description: Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -2654,7 +3499,7 @@ paths: - project - name: skipRecentData in: query - description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' + description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. required: false schema: type: boolean @@ -2668,10 +3513,13 @@ paths: - personalAccessToken: [] tags: - usage - '/v1/projects/{projectOrProductUID}/usage/sessions': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/usage/sessions: get: operationId: GetSessionsUsage - description: 'Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' + description: Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -2702,7 +3550,7 @@ paths: - project - name: skipRecentData in: query - description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' + description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. required: false schema: type: boolean @@ -2716,7 +3564,10 @@ paths: - personalAccessToken: [] tags: - usage - '/v1/projects/{projectOrProductUID}/webhooks': + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/webhooks: get: operationId: GetWebhooks description: Retrieves all webhooks for the specified project @@ -2740,7 +3591,10 @@ paths: - personalAccessToken: [] tags: - webhook - '/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}': + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/webhooks/{webhookUID}: delete: operationId: DeleteWebhook description: Deletes the specified webhook @@ -2756,6 +3610,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings get: operationId: GetWebhook description: Retrieves the configuration settings for the specified webhook @@ -2775,6 +3632,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings post: operationId: CreateWebhook description: Creates a webhook for the specified product with the given name. The name | must be unique within the project. @@ -2801,6 +3661,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings put: operationId: UpdateWebhook description: Updates the configuration settings for the specified webhook. | Webhook will be created if it does not exist. Update body will completely replace the existing settings. @@ -2825,6 +3688,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings components: parameters: billingAccountUIDParam: @@ -2843,7 +3709,7 @@ components: schema: type: string datasetAggregateWindowQueryParam: - description: 'Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format' + description: Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format in: query name: aggregate_window required: false @@ -2857,7 +3723,7 @@ components: schema: type: boolean datasetEndQueryParam: - description: 'End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used.' + description: End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. in: query name: end required: false @@ -2871,15 +3737,15 @@ components: schema: type: integer datasetLocationNearQueryParam: - description: 'Latitude and Longitude for location-based filtering, location_near_radius must also be provided' + description: Latitude and Longitude for location-based filtering, location_near_radius must also be provided in: query name: location_near required: false schema: type: string - example: '42.393125,-71.185015' + example: 42.393125,-71.185015 datasetLocationRadiusQueryParam: - description: 'Distance from location_near in meters, location_near must also be provided' + description: Distance from location_near in meters, location_near must also be provided in: query name: location_near_radius required: false @@ -2900,28 +3766,28 @@ components: schema: type: string datasetSelectQueryParam: - description: 'Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent).' + description: Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent). in: query name: select required: false schema: type: string datasetStartQueryParam: - description: 'Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format.' + description: Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. in: query name: start required: true schema: type: string datasetWhereQueryParam: - description: 'Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100))' + description: Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100)) in: query name: where required: false schema: type: string dateTypeParam: - description: 'Which date to filter on, either ''captured'' or ''uploaded''. This will apply to the startDate and endDate parameters' + description: Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters example: uploaded in: query name: dateType @@ -2941,7 +3807,7 @@ components: items: type: string deviceUIDParam: - example: 'dev:000000000000000' + example: dev:000000000000000 in: path name: deviceUID required: true @@ -2977,7 +3843,7 @@ components: - update - cancel endDateParam: - description: 'End date for filtering results, specified as a Unix timestamp' + description: End date for filtering results, specified as a Unix timestamp example: 1657894210 in: query name: endDate @@ -3011,7 +3877,7 @@ components: schema: type: string filesQueryParam: - example: '_health.qo, data.qo' + example: _health.qo, data.qo in: query name: files required: false @@ -3031,7 +3897,7 @@ components: - version - length firmwareSortOrderParam: - description: 'Sort order (asc for ascending, desc for descending)' + description: Sort order (asc for ascending, desc for descending) in: query name: sortOrder required: false @@ -3057,7 +3923,7 @@ components: schema: type: string firstSyncParam: - description: 'When true, filters results to only show first sync sessions' + description: When true, filters results to only show first sync sessions in: query name: firstSync required: false @@ -3125,6 +3991,14 @@ components: items: type: string style: form + jobUIDParam: + description: Unique identifier for a batch job + example: my-reconciliation-job + in: path + name: jobUID + required: true + schema: + type: string limitParam: in: query name: limit @@ -3151,7 +4025,7 @@ components: schema: type: string monitorUIDParam: - example: 'monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad' + example: monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad in: path name: monitorUID required: true @@ -3218,7 +4092,7 @@ components: schema: type: string productUIDParam: - example: 'com.blues.bridge:sensors' + example: com.blues.bridge:sensors in: path name: productUID required: true @@ -3235,12 +4109,20 @@ components: type: string style: form projectOrProductUIDParam: - example: 'app:2606f411-dea6-44a0-9743-1130f57d77d8' + example: app:2606f411-dea6-44a0-9743-1130f57d77d8 in: path name: projectOrProductUID required: true schema: type: string + reportUIDParam: + description: Unique identifier for a job run report + example: my-reconciliation-job-1707654321000 + in: path + name: reportUID + required: true + schema: + type: string repositoryKey: description: The secret key used to access this repository in: header @@ -3254,7 +4136,7 @@ components: required: true schema: type: string - example: 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' + example: rid:2606f411-dea6-44a0-9743-1130f57d77d8 responseStatusParam: example: 500 in: query @@ -3285,7 +4167,7 @@ components: - asc - desc routeUIDParam: - example: 'route:cbd20093cba58392c9f9bbdd0cdeb1a0' + example: route:cbd20093cba58392c9f9bbdd0cdeb1a0 in: path name: routeUID required: true @@ -3315,7 +4197,7 @@ components: - failure type: string selectFieldsParam: - description: 'Comma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output.' + description: Comma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output. in: query name: selectFields required: false @@ -3393,7 +4275,7 @@ components: - asc - desc startDateParam: - description: 'Start date for filtering results, specified as a Unix timestamp' + description: Start date for filtering results, specified as a Unix timestamp example: 1628631763 in: query name: startDate @@ -3552,7 +4434,7 @@ components: type: number type: object resolved: - description: 'If true, the alert has been resolved' + description: If true, the alert has been resolved type: boolean source: description: The UID of the source of the alert @@ -3656,6 +4538,7 @@ components: - billing_admin - billing_manager - project_creator + - billing_member BlynkRoute: type: object properties: @@ -3710,9 +4593,9 @@ components: type: integer format: int64 plan_type: - description: 'Description of the SIM plan type including data allowance, region, and validity period' + description: Description of the SIM plan type including data allowance, region, and validity period type: string - example: '500MB, North America, 10-year lifetime' + example: 500MB, North America, 10-year lifetime CellularUsage: type: array items: @@ -3824,7 +4707,7 @@ components: description: Last updated timestamp type: number version: - description: 'Last known version, which is generally a JSON object contained within the firmware image' + description: Last known version, which is generally a JSON object contained within the firmware image type: string nullable: true DataField: @@ -4113,7 +4996,7 @@ components: bssid: type: string cell: - description: 'Cell ID where the session originated and quality ("mcc,mnc,lac,cellid")' + description: Cell ID where the session originated and quality ("mcc,mnc,lac,cellid") type: string continuous: description: Was this a continuous connection? @@ -4410,7 +5293,7 @@ components: description: Country type: string best_id: - description: 'The device serial number, or the DeviceUID if the serial number is not set' + description: The device serial number, or the DeviceUID if the serial number is not set type: string best_lat: description: Latitude @@ -4420,7 +5303,7 @@ components: description: Location type: string best_location_type: - description: 'One of "gps", "triangulated", or "tower"' + description: One of "gps", "triangulated", or "tower" type: string best_location_when: description: Unix timestamp @@ -4533,7 +5416,7 @@ components: description: Unix timestamp type: number transport: - description: 'The transport used for this event, e.g., "cellular", "wifi", ", etc.' + description: The transport used for this event, e.g., "cellular", "wifi", ", etc. type: string tri_country: description: Country @@ -4652,9 +5535,15 @@ components: filename: description: The name of the firmware file. type: string + info: + description: User-defined metadata + type: object md5: description: The MD5 hash of the firmware file. type: string + notes: + description: User-defined notes + type: string organization: description: The organization that owns the firmware. type: string @@ -4719,7 +5608,7 @@ components: enabled: true nullable: true FleetRule: - description: 'JSONata expression that will be evaluated to determine device membership into this fleet, if the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged.' + description: JSONata expression that will be evaluated to determine device membership into this fleet, if the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged. type: string properties: {} FleetsUIDList: @@ -4756,7 +5645,7 @@ components: filter: $ref: '#/components/schemas/Filter' fleets: - description: 'If non-empty, applies only to the listed fleets.' + description: If non-empty, applies only to the listed fleets. type: array items: type: string @@ -4777,6 +5666,84 @@ components: JSONata: type: object properties: {} + Job: + type: object + properties: + created: + description: Unix timestamp when job was created + type: integer + format: int64 + created_by: + description: User who created the job + type: string + definition: + description: Full job definition (only in detail view) + type: object + additionalProperties: true + job_uid: + description: Unique identifier for the job + type: string + name: + description: Human-readable job name + type: string + required: + - job_uid + - name + - created + - created_by + JobRun: + type: object + properties: + cancel: + description: Whether cancellation was requested + type: boolean + completed: + description: Unix timestamp when completed + type: integer + format: int64 + dry_run: + description: Whether this was a dry run + type: boolean + job_name: + description: Name of the job + type: string + job_uid: + description: Unique identifier for the job + type: string + report_uid: + description: Unique identifier for this run + type: string + results: + description: Full results (only in detail view) + type: object + additionalProperties: true + started: + description: Unix timestamp when started + type: integer + format: int64 + status: + description: Current status (submitted, running, completed, cancelled, failed) + type: string + submitted: + description: Unix timestamp when submitted + type: integer + format: int64 + submitted_by: + description: User who submitted the run + type: string + updated: + description: Unix timestamp of last update + type: integer + format: int64 + required: + - report_uid + - job_uid + - job_name + - status + - dry_run + - submitted_by + - submitted + - updated Location: type: object properties: @@ -4806,7 +5773,7 @@ components: type: object properties: aggregate_function: - description: 'Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]' + description: Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min] type: string enum: - none @@ -4818,9 +5785,9 @@ components: description: The time window to aggregate the selected values. It follows the format of a number followed by a time unit type: string example: 10m or 5h30m40s - pattern: '^[0-9]+[smh]$' + pattern: ^[0-9]+[smh]$ alert: - description: 'If true, the monitor is in alert state.' + description: If true, the monitor is in alert state. type: boolean alert_routes: type: array @@ -4830,7 +5797,7 @@ components: - $ref: '#/components/schemas/SlackBearerNotification' - $ref: '#/components/schemas/EmailNotification' condition_type: - description: 'A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]' + description: A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to] type: string enum: - greater_than @@ -4843,7 +5810,7 @@ components: description: type: string disabled: - description: 'If true, the monitor will not be evaluated.' + description: If true, the monitor will not be evaluated. type: boolean fleet_filter: type: array @@ -4859,18 +5826,18 @@ components: items: type: string per_device: - description: 'Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices.' + description: Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices. type: boolean routing_cooldown_period: description: The time period to wait before routing another event after the monitor | has been triggered. It follows the format of a number followed by a time unit. type: string example: 10m or 5h30m40s - pattern: '^[0-9]+[smh]$' + pattern: ^[0-9]+[smh]$ silenced: - description: 'If true, alerts will be created, but no notifications will be sent.' + description: If true, alerts will be created, but no notifications will be sent. type: boolean source_selector: - description: 'A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.' + description: A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value. type: string example: body.temperature source_type: @@ -4884,6 +5851,16 @@ components: type: integer uid: type: string + usage_scope: + description: 'For usage monitors: the scope of aggregation. Supported values are "device" and "fleet".' + type: string + usage_type: + description: 'For usage monitors: the type of data usage to monitor. Supported values are "cellular" and "satellite".' + type: string + usage_window: + description: 'For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days).' + type: integer + format: int32 MqttRoute: type: object properties: @@ -4930,7 +5907,7 @@ components: description: True if originated from an edge source. type: boolean id: - description: 'Note name/identifier (e.g., "1:435", "my_note").' + description: Note name/identifier (e.g., "1:435", "my_note"). type: string payload: description: Optional base64-encoded payload. @@ -4965,7 +5942,7 @@ components: type: object properties: id: - description: 'Notefile id (e.g., "test.qi", "config.db").' + description: Notefile id (e.g., "test.qi", "config.db"). type: string notes: type: array @@ -4978,7 +5955,7 @@ components: - id - notes NotefileList: - description: 'Array of notefiles, each containing its notes.' + description: Array of notefiles, each containing its notes. type: array items: $ref: '#/components/schemas/Notefile' @@ -5065,7 +6042,7 @@ components: default: http uid: type: string - default: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + default: route:8d65a087d5d290ce5bdf03aeff2becc0 OAuth2Error: type: object properties: @@ -5132,7 +6109,7 @@ components: format: date-time nullable: true last_used: - description: 'When it was last used, if ever' + description: When it was last used, if ever type: string format: date-time nullable: true @@ -5140,7 +6117,7 @@ components: description: Name for this API Key type: string suspended: - description: 'if true, this token cannot be used' + description: if true, this token cannot be used type: boolean uid: description: Unique and public identifier @@ -5158,7 +6135,7 @@ components: name: type: string suspended: - description: 'if true, the token is temporarily suspended' + description: if true, the token is temporarily suspended type: boolean required: - expiresAt @@ -5300,6 +6277,67 @@ components: uid: description: The unique identifier for the data repository type: string + RepositoryListResponse: + type: object + properties: + repositories: + type: array + items: + $ref: '#/components/schemas/Repository' + required: + - repositories + RepositoryTokenRequest: + type: object + properties: + intent: + description: | + Access intent for the vended credentials. Only `read` is + supported today; `write` and `admin` are reserved for future use. + type: string + default: read + enum: + - read + ttl_seconds: + description: | + Requested credential lifetime in seconds. Clamped server-side to + [60, 3600]. Defaults to 900 (15 minutes) if omitted. + type: integer + default: 900 + maximum: 3600 + minimum: 60 + RepositoryTokenResponse: + type: object + properties: + database: + description: Storage service database name scoped to this repository + type: string + expires_at: + description: | + Absolute expiration time of the ephemeral user. The storage + service will reject connections and queries after this instant. + type: string + format: date-time + host: + description: Storage service hostname the caller should connect to + type: string + password: + description: | + Ephemeral password. Returned once; not stored by Notehub. Hold + this in memory only and discard after `expires_at`. + type: string + port: + description: Storage service port + type: integer + username: + description: Ephemeral storage service username (prefixed with `u_`) + type: string + required: + - host + - port + - username + - password + - database + - expires_at Role: type: string properties: {} @@ -5314,7 +6352,7 @@ components: type: object properties: attn: - description: 'If true, an error was returned when routing' + description: If true, an error was returned when routing type: boolean date: description: The date of the logs. @@ -5344,7 +6382,7 @@ components: type: object properties: format: - description: 'Output format for transformed data (e.g., "json", "xml", "text").' + description: Output format for transformed data (e.g., "json", "xml", "text"). type: string example: json jsonata: @@ -5449,7 +6487,7 @@ components: psid: description: Provider-specific identifier for the satellite subscription type: string - example: 'skylo:5746354465786' + example: skylo:5746354465786 satellite_data_usage: $ref: '#/components/schemas/SatelliteDataUsage' nullable: true @@ -5523,7 +6561,7 @@ components: - text - blocks text: - description: 'The text of the message, or the blocks definition' + description: The text of the message, or the blocks definition type: string token: description: The bearer token for the Slack app. @@ -5565,7 +6603,7 @@ components: - text - blocks text: - description: 'The text of the message, or the blocks definition' + description: The text of the message, or the blocks definition type: string url: description: The URL of the Slack webhook. @@ -5674,7 +6712,7 @@ components: mnc: description: Mobile Network Code type: integer - 'n': + n: description: Name of the location type: string source: @@ -5718,6 +6756,21 @@ components: to: type: string additionalProperties: false + UpdateHostFirmwareRequest: + description: | + Request body for updating host firmware metadata. All fields are optional; only provided fields will be updated. + type: object + properties: + info: + description: Arbitrary JSON metadata associated with this firmware entry. + type: object + additionalProperties: true + notes: + description: Notes describing this firmware version. + type: string + version: + description: The firmware version string. + type: string UploadMetadata: type: object properties: @@ -5772,7 +6825,7 @@ components: period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: 2025-07-23T00:00:00Z total_bytes: type: integer format: int64 @@ -5796,16 +6849,16 @@ components: type: object properties: billable_events: - description: 'Events that are billable, this include all events except platform events' + description: Events that are billable, this include all events except platform events type: integer format: int64 example: 10 device: type: string - example: 'dev:123456789012345' + example: dev:123456789012345 fleet: type: string - example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d notefiles: description: Count of events per notefile. Only present when includeNotefiles=true is specified. type: object @@ -5819,14 +6872,14 @@ components: period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: 2025-07-23T00:00:00Z platform_events: - description: 'Total platform events. Platform events are _log, _session, _health, and _geolocate events some of which are send from the device, some generated by notehub. These events are not billed.' + description: Total platform events. Platform events are _log, _session, _health, and _geolocate events some of which are send from the device, some generated by notehub. These events are not billed. type: integer format: int64 example: 15 total_days_in_period: - description: 'The total number of days in this period. Useful for calculating daily averages for month period. Note that the current period will be the total number of days in the current period, including days in the future.' + description: The total number of days in this period. Useful for calculating daily averages for month period. Note that the current period will be the total number of days in the current period, including days in the future. type: integer format: int32 total_devices: @@ -5834,12 +6887,24 @@ components: type: integer format: int64 total_events: - description: 'Total events the device sent to notehub, including associated notehub generated events' + description: Total events the device sent to notehub, including associated notehub generated events type: integer format: int64 example: 42 + total_fw_updates: + description: Number of firmware updates in this period (from _health.qo DFU events) + type: integer + format: int64 + example: 1 + nullable: true + total_reboots: + description: Number of device reboots in this period (from _health.qo boot events) + type: integer + format: int64 + example: 2 + nullable: true watchdog_events: - description: 'Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time.' + description: Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time. type: integer format: int64 example: 10 @@ -5863,6 +6928,12 @@ components: UsageRouteLogsData: type: object properties: + avg_latency_ms: + description: Average routing latency in milliseconds for route logs with recorded duration + type: number + format: double + example: 342.5 + nullable: true failed_routes: type: integer format: int64 @@ -5870,11 +6941,11 @@ components: period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: 2025-07-23T00:00:00Z route: description: The route UID (only present when aggregate is 'route') type: string - example: 'route:cbd20093cba58392c9f9bbdd0cdeb1a0' + example: route:cbd20093cba58392c9f9bbdd0cdeb1a0 successful_routes: type: integer format: int64 @@ -5893,7 +6964,7 @@ components: properties: device: type: string - example: 'dev:123456789012345' + example: dev:123456789012345 first_sync_sessions: description: Number of first sync sessions in this period type: integer @@ -5901,15 +6972,31 @@ components: example: 2 fleet: type: string - example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: 2025-07-23T00:00:00Z sessions: type: integer format: int64 example: 12 + sessions_by_transport: + description: Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan) + type: object + example: + cell: 8 + ntn: 1 + wifi: 3 + additionalProperties: + format: int64 + type: integer + tls_sessions: + description: Number of TLS sessions in this period + type: integer + format: int64 + example: 3 + nullable: true total_bytes: type: integer format: int64 @@ -5925,7 +7012,7 @@ components: - total_bytes - total_devices UsageTruncatedField: - description: 'If the data is truncated that means that the parameters selected resulted in a response of over | the requested limit of data points, in order to ensure' + description: If the data is truncated that means that the parameters selected resulted in a response of over | the requested limit of data points, in order to ensure type: boolean properties: {} UserDfuStateMachine: @@ -5993,6 +7080,42 @@ components: required: - alerts - has_more + CancelJobRunResponse: + description: Cancel operation completed + content: + application/json: + schema: + type: object + properties: + successful: + description: True if cancellation was successful + type: boolean + required: + - successful + CreateJobResponse: + description: Job created successfully + content: + application/json: + schema: + type: object + properties: + job_uid: + description: The unique identifier for the created job + type: string + required: + - job_uid + DeleteJobResponse: + description: Job deleted successfully + content: + application/json: + schema: + type: object + properties: + success: + description: True if deletion was successful + type: boolean + required: + - success DevicePlansResponse: description: Response body for /plans content: @@ -6061,7 +7184,7 @@ components: - has_more example: events: - - app: 'app:218f6217-9f78-432e-9fe0-02ca8b5a216c' + - app: app:218f6217-9f78-432e-9fe0-02ca8b5a216c best_country: US best_id: My Device best_lat: 34.82476372 @@ -6075,15 +7198,15 @@ components: pressure: 97705.66 temperature: 24.0625 voltage: 2.598 - device: 'dev:5c0272311928' + device: dev:5c0272311928 event: dfa3747d-688b-4250-935b-5dd60354313c file: air.qo - product: 'product:com.blues.project.demo' + product: product:com.blues.project.demo received: 1656011227.006928 req: note.add session: b623132c-6afb-4740-bc39-e3634e38f064 sn: My Device - tower_id: '0,0,0,0' + tower_id: 0,0,0,0 tri_country: US tri_lat: 34.82475372 tri_location: Atlanta GA @@ -6122,7 +7245,7 @@ components: - has_more example: events: - - app: 'app:218f6217-9f78-432e-9fe0-02ca8b5a216c' + - app: app:218f6217-9f78-432e-9fe0-02ca8b5a216c best_country: US best_id: My Device best_lat: 34.82476372 @@ -6136,15 +7259,15 @@ components: pressure: 97705.66 temperature: 24.0625 voltage: 2.598 - device: 'dev:5c0272311928' + device: dev:5c0272311928 event: dfa3747d-688b-4250-935b-5dd60354313c file: air.qo - product: 'product:com.blues.project.demo' + product: product:com.blues.project.demo received: 1656011227.006928 req: note.add session: b623132c-6afb-4740-bc39-e3634e38f064 sn: My Device - tower_id: '0,0,0,0' + tower_id: 0,0,0,0 tri_country: US tri_lat: 34.82475372 tri_location: Atlanta GA @@ -6191,7 +7314,7 @@ components: additionalProperties: type: string environment_variables_effective: - description: 'The environment variables as they will be seen by the device, fully resolved with project/fleet/device prioritization rules.' + description: The environment variables as they will be seen by the device, fully resolved with project/fleet/device prioritization rules. type: object additionalProperties: type: string @@ -6203,6 +7326,48 @@ components: required: - environment_variables - environment_variables_env_default + GetJobResponse: + description: Batch job details + content: + application/json: + schema: + type: '' + properties: {} + $ref: '#/components/schemas/Job' + GetJobRunResponse: + description: Job run details + content: + application/json: + schema: + type: '' + properties: {} + $ref: '#/components/schemas/JobRun' + GetJobRunsResponse: + description: List of job runs + content: + application/json: + schema: + type: object + properties: + runs: + type: array + items: + $ref: '#/components/schemas/JobRun' + required: + - runs + GetJobsResponse: + description: List of batch jobs + content: + application/json: + schema: + type: object + properties: + jobs: + type: array + items: + $ref: '#/components/schemas/Job' + required: + - jobs LatestResponse: description: The response body for a Latest Events request. content: @@ -6217,59 +7382,59 @@ components: $ref: '#/components/schemas/Event' example: latest_events: - - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' + - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 body: why: sensors.qo requested sync (sensors.qo) (TLS) - device: 'dev:864475040523995' + device: dev:864475040523995 event: 81bd2bf1-0399-4978-bc46-8f779b4af350 file: _session.qo - product: 'product:com.blues.app:myapp' + product: product:com.blues.app:myapp received: 1669667707.564694 req: session.begin session: ed18884b-f2a6-419f-b856-d28dc8f0892b tls: true tower_country: US - tower_id: '310,410,20483,184692495' + tower_id: 310,410,20483,184692495 tower_lat: 43.769062500000004 tower_location: Waverly MI tower_lon: -83.657359375 tower_timezone: America/Detroit tower_when: 1669667691 when: 1669667707 - - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' + - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 body: humid: 56.23 temp: 35.5 - device: 'dev:864475040523995' + device: dev:864475040523995 event: 916d4c81-06ae-4263-9b55-7a3a0f73cb5a file: data.qo - product: 'product:com.blues.app:myapp' + product: product:com.blues.app:myapp received: 1669667713.221659 req: note.add session: 28cdc39f-9f62-4789-b0a3-2f35f9448ced sn: tj-1 tower_country: US - tower_id: '310,410,20483,184692495' + tower_id: 310,410,20483,184692495 tower_lat: 43.769062500000004 tower_location: Waverly MI tower_lon: -83.657359375 tower_timezone: America/Detroit tower_when: 1669667677 when: 1669667689 - - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' + - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 body: humidity: 69.88647200683693 pressure: 993.6294496104914 temp: 21.273027181770885 - device: 'dev:864475040523995' + device: dev:864475040523995 event: e98c2c3b-edbe-4fe7-af57-2196cc843eb7 file: sensors.qo - product: 'product:com.blues.app:myapp' + product: product:com.blues.app:myapp received: 1669667711.85316 req: note.add session: 7211392c-6895-43f8-9256-790655348be5 tower_country: US - tower_id: '310,410,20483,184692496' + tower_id: 310,410,20483,184692496 tower_lat: 43.747037500000005 tower_location: Waverly MI tower_lon: -83.665859375 @@ -6300,6 +7465,18 @@ components: total: description: The total number of notes active on the Notefile. type: integer + RunJobResponse: + description: Job execution started + content: + application/json: + schema: + type: object + properties: + report_uid: + description: Unique identifier for this job run + type: string + required: + - report_uid SessionResponse: description: The response body for a session request. content: @@ -6322,12 +7499,12 @@ components: - apn: a-notehub.com.attz bars: 2 bearer: LTE FDD - cell: '310,410,17169,77315594' + cell: 310,410,17169,77315594 continuous: true - device: 'dev:000000000000000' + device: dev:000000000000000 events: 14 fleets: - - 'fleet:46be9834-5te6-42c1-0000-b5ea05e248d7' + - fleet:46be9834-5te6-42c1-0000-b5ea05e248d7 hp_cycles_data: 3 hp_cycles_total: 3 hp_secs_data: 7659 @@ -6343,7 +7520,7 @@ components: notes_sent: 12 sessions_tls: 1 since: 1667250832 - product: 'product:com.blues.demo:project' + product: product:com.blues.demo:project rat: lte rsrp: -91 rsrq: -13 @@ -6362,7 +7539,7 @@ components: lon: -89.44239062499999 mcc: 310 mnc: 410 - 'n': Shorewood Hills WI + n: Shorewood Hills WI time: 1667250835 towers: 1 zone: America/Chicago @@ -6389,14 +7566,14 @@ components: device: description: The device UID this usage data belongs to (only present when aggregate is 'device') type: string - example: 'dev:123456789012345' + example: dev:123456789012345 device_count: description: the number of devices represented by this data point type: integer fleet: description: The fleet UID this usage data belongs to (only present when aggregate is 'fleet') type: string - example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d iccid: description: The ICCID of the cellular SIM card (only present when type is 'cellular') type: string @@ -6404,7 +7581,7 @@ components: psid: description: The PSID (Packet Service ID) of the satellite (or other packet-based device) type: string - example: 'skylo:5746354465786' + example: skylo:5746354465786 type: description: The type of connectivity type: string @@ -6473,8 +7650,10 @@ tags: name: webhook - description: APIs for events and sessions for external devices name: external devices - - description: 'Project Usage information related to events, route logs, sessions, and data usage' + - description: Project Usage information related to events, route logs, sessions, and data usage name: usage + - description: Batch job operations + name: jobs externalDocs: description: Find out more about Blues - url: 'https://blues.io' + url: https://blues.io diff --git a/openapi_filtered.yaml b/openapi_filtered.yaml index 6c4d02d..dc964b6 100644 --- a/openapi_filtered.yaml +++ b/openapi_filtered.yaml @@ -4620,9 +4620,15 @@ components: filename: description: The name of the firmware file. type: string + info: + description: User-defined metadata + type: object md5: description: The MD5 hash of the firmware file. type: string + notes: + description: User-defined notes + type: string organization: description: The organization that owns the firmware. type: string @@ -5806,6 +5812,18 @@ components: type: integer format: int64 example: 42 + total_fw_updates: + description: Number of firmware updates in this period (from _health.qo DFU events) + type: integer + format: int64 + example: 1 + nullable: true + total_reboots: + description: Number of device reboots in this period (from _health.qo boot events) + type: integer + format: int64 + example: 2 + nullable: true watchdog_events: description: Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time. type: integer @@ -5831,6 +5849,12 @@ components: UsageRouteLogsData: type: object properties: + avg_latency_ms: + description: Average routing latency in milliseconds for route logs with recorded duration + type: number + format: double + example: 342.5 + nullable: true failed_routes: type: integer format: int64 @@ -5878,6 +5902,22 @@ components: type: integer format: int64 example: 12 + sessions_by_transport: + description: Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan) + type: object + example: + cell: 8 + ntn: 1 + wifi: 3 + additionalProperties: + format: int64 + type: integer + tls_sessions: + description: Number of TLS sessions in this period + type: integer + format: int64 + example: 3 + nullable: true total_bytes: type: integer format: int64