From 76ac8df751a25f56c124982f9f6984c3e6b9911c Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Fri, 13 Feb 2026 14:18:22 -0500 Subject: [PATCH] fix: regenerating with latest openapi.yaml --- config.json | 2 +- openapi.yaml | 1893 +++++++++-------- openapi_filtered.yaml | 101 +- src/README.md | 3 +- src/docs/GetDataUsage200Response.md | 7 +- src/docs/GetRouteLogsUsage200Response.md | 7 +- src/docs/GetSessionsUsage200Response.md | 7 +- src/docs/ProjectApi.md | 78 + src/docs/UsageApi.md | 24 +- src/docs/UsageData.md | 12 +- src/docs/UsageEventsData.md | 22 +- src/docs/UsageEventsResponse.md | 7 +- src/notehub_py/__init__.py | 2 +- src/notehub_py/api/project_api.py | 269 +++ src/notehub_py/api/usage_api.py | 104 + src/notehub_py/api_client.py | 2 +- src/notehub_py/configuration.py | 2 +- .../models/get_data_usage200_response.py | 11 +- .../get_route_logs_usage200_response.py | 13 +- .../models/get_sessions_usage200_response.py | 10 +- src/notehub_py/models/usage_data.py | 52 +- src/notehub_py/models/usage_events_data.py | 12 + .../models/usage_events_response.py | 13 +- src/pyproject.toml | 2 +- src/setup.py | 2 +- 25 files changed, 1641 insertions(+), 1016 deletions(-) diff --git a/config.json b/config.json index 34d6534..ffa5658 100644 --- a/config.json +++ b/config.json @@ -2,5 +2,5 @@ "packageName": "notehub_py", "packageUrl": "https://github.com/blues/notehub-py", "projectName": "notehub-py", - "packageVersion": "6.0.1" + "packageVersion": "6.0.2" } diff --git a/openapi.yaml b/openapi.yaml index b9fd0ba..ae220c1 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: @@ -31,7 +31,7 @@ paths: username: type: string responses: - '200': + "200": description: Successful operation content: application/json: @@ -40,9 +40,9 @@ paths: properties: session_token: type: string - '400': + "400": description: Bad Request - '500': + "500": description: Internal Server Error tags: - authorization @@ -81,7 +81,7 @@ paths: - client_id - client_secret responses: - '200': + "200": description: Successful token response content: application/json: @@ -91,17 +91,17 @@ paths: scope: openid token_type: bearer schema: - $ref: '#/components/schemas/OAuth2TokenResponse' - '400': + $ref: "#/components/schemas/OAuth2TokenResponse" + "400": description: Invalid request (missing or malformed parameters) content: application/json: example: error: invalid_request - error_description: 'Missing parameter: client_id' + error_description: "Missing parameter: client_id" schema: - $ref: '#/components/schemas/OAuth2Error' - '401': + $ref: "#/components/schemas/OAuth2Error" + "401": description: Invalid client authentication content: application/json: @@ -109,8 +109,8 @@ paths: error: invalid_client error_description: Client authentication failed schema: - $ref: '#/components/schemas/OAuth2Error' - '403': + $ref: "#/components/schemas/OAuth2Error" + "403": description: Unauthorized scope content: application/json: @@ -118,7 +118,7 @@ paths: error: invalid_scope error_description: Requested scope is invalid schema: - $ref: '#/components/schemas/OAuth2Error' + $ref: "#/components/schemas/OAuth2Error" tags: - authorization /v1/billing-accounts: @@ -126,7 +126,7 @@ paths: operationId: GetBillingAccounts description: Get Billing Accounts accessible by the api_key responses: - '200': + "200": description: Successful operation content: application/json: @@ -136,28 +136,28 @@ paths: billing_accounts: type: array items: - $ref: '#/components/schemas/BillingAccount' + $ref: "#/components/schemas/BillingAccount" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - billing_account - '/v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin': + "/v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin": get: operationId: GetDeviceEnvironmentVariablesByPin description: Get environment variables of a device with device pin authorization responses: - '200': - $ref: '#/components/responses/GetDeviceEnvironmentVariablesResponse' + "200": + $ref: "#/components/responses/GetDeviceEnvironmentVariablesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" tags: - device parameters: - - $ref: '#/components/parameters/productUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' - - $ref: '#/components/parameters/XAuthTokenHeader' + - $ref: "#/components/parameters/productUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/XAuthTokenHeader" put: operationId: SetDeviceEnvironmentVariablesByPin description: Set environment variables of a device with device pin authorization @@ -167,84 +167,84 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/EnvironmentVariables' + $ref: "#/components/schemas/EnvironmentVariables" responses: - '200': - $ref: '#/components/responses/EnvironmentVariablesResponse' + "200": + $ref: "#/components/responses/EnvironmentVariablesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" tags: - device - '/v1/products/{productUID}/ext-devices/{deviceUID}/event': + "/v1/products/{productUID}/ext-devices/{deviceUID}/event": post: operationId: CreateEventExtDevice description: Creates an event using specified webhook parameters: - - $ref: '#/components/parameters/productUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/productUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" requestBody: description: Event Object required: true content: application/json: schema: - $ref: '#/components/schemas/Event' + $ref: "#/components/schemas/Event" responses: - '200': + "200": description: Event Created Successfully default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - external devices - '/v1/products/{productUID}/ext-devices/{deviceUID}/session/close': + "/v1/products/{productUID}/ext-devices/{deviceUID}/session/close": post: operationId: ExtDeviceSessionClose description: Closes the session for the specified device if open parameters: - - $ref: '#/components/parameters/productUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/productUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" requestBody: description: Session Object required: true content: application/json: schema: - $ref: '#/components/schemas/DeviceSession' + $ref: "#/components/schemas/DeviceSession" responses: - '200': + "200": description: Session closed default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - external devices - '/v1/products/{productUID}/ext-devices/{deviceUID}/session/open': + "/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. parameters: - - $ref: '#/components/parameters/productUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/productUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" requestBody: description: Session Object required: true content: application/json: schema: - $ref: '#/components/schemas/DeviceSession' + $ref: "#/components/schemas/DeviceSession" responses: - '200': + "200": description: Session Created Successfully default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - external devices - '/v1/products/{productUID}/project': + "/v1/products/{productUID}/project": get: operationId: GetProjectByProduct description: Get a Project by ProductUID @@ -256,14 +256,14 @@ paths: type: string example: com.blues.airnote responses: - '200': + "200": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Project' + $ref: "#/components/schemas/Project" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -273,7 +273,7 @@ paths: operationId: GetProjects description: Get Projects accessible by the api_key responses: - '200': + "200": description: Successful operation content: application/json: @@ -283,9 +283,9 @@ paths: projects: type: array items: - $ref: '#/components/schemas/Project' + $ref: "#/components/schemas/Project" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -312,29 +312,29 @@ paths: - label - billing_account_uid responses: - '201': + "201": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Project' + $ref: "#/components/schemas/Project" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}': + "/v1/projects/{projectOrProductUID}": delete: operationId: DeleteProject description: Delete a Project by ProjectUID parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" responses: - '200': + "200": description: Successful operation default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -343,44 +343,44 @@ paths: operationId: GetProject description: Get a Project by ProjectUID parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" responses: - '200': + "200": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Project' + $ref: "#/components/schemas/Project" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/alerts': + "/v1/projects/{projectOrProductUID}/alerts": get: operationId: GetAlerts description: Get list of defined Alerts parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/pageSizeParam' - - $ref: '#/components/parameters/pageNumParam' - - $ref: '#/components/parameters/monitorUIDQueryParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/pageSizeParam" + - $ref: "#/components/parameters/pageNumParam" + - $ref: "#/components/parameters/monitorUIDQueryParam" responses: - '200': - $ref: '#/components/responses/AlertsResponse' + "200": + $ref: "#/components/responses/AlertsResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - alert - '/v1/projects/{projectOrProductUID}/clone': + "/v1/projects/{projectOrProductUID}/clone": post: operationId: CloneProject description: Clone a Project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" requestBody: description: Project to be cloned required: true @@ -390,7 +390,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. @@ -405,53 +405,53 @@ paths: - label - billing_account_uid responses: - '201': + "201": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Project' + $ref: "#/components/schemas/Project" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/devices': + "/v1/projects/{projectOrProductUID}/devices": get: operationId: GetDevices description: Get Devices of a Project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/pageSizeParam' - - $ref: '#/components/parameters/pageNumParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' - - $ref: '#/components/parameters/tagParam' - - $ref: '#/components/parameters/serialNumberParam' - - $ref: '#/components/parameters/fleetUIDsQueryParam' - - $ref: '#/components/parameters/notecardFirmwareParam' - - $ref: '#/components/parameters/locationParam' - - $ref: '#/components/parameters/hostFirmwareParam' - - $ref: '#/components/parameters/productUIDQueryParam' - - $ref: '#/components/parameters/skuParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/pageSizeParam" + - $ref: "#/components/parameters/pageNumParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/tagParam" + - $ref: "#/components/parameters/serialNumberParam" + - $ref: "#/components/parameters/fleetUIDsQueryParam" + - $ref: "#/components/parameters/notecardFirmwareParam" + - $ref: "#/components/parameters/locationParam" + - $ref: "#/components/parameters/hostFirmwareParam" + - $ref: "#/components/parameters/productUIDQueryParam" + - $ref: "#/components/parameters/skuParam" responses: - '200': - $ref: '#/components/responses/DevicesResponse' + "200": + $ref: "#/components/responses/DevicesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}": delete: operationId: DeleteDevice description: Delete Device responses: - '204': + "204": description: Successful operation default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -460,133 +460,133 @@ paths: operationId: GetDevice description: Get Device responses: - '200': + "200": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Device' + $ref: "#/components/schemas/Device" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history': + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history": get: operationId: GetDeviceDfuHistory description: Get device DFU history for host or Notecard firmware parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' - - $ref: '#/components/parameters/firmwareTypeParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/firmwareTypeParam" responses: - '200': + "200": description: Success content: application/json: schema: - $ref: '#/components/schemas/DeviceDfuHistory' + $ref: "#/components/schemas/DeviceDfuHistory" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status": get: operationId: GetDeviceDfuStatus description: Get device DFU history for host or Notecard firmware parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' - - $ref: '#/components/parameters/firmwareTypeParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/firmwareTypeParam" responses: - '200': + "200": description: Success content: application/json: schema: - $ref: '#/components/schemas/DeviceDfuStatus' + $ref: "#/components/schemas/DeviceDfuStatus" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable": post: operationId: DisableDevice description: Disable Device parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" responses: - '200': + "200": description: Successful operation default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable": post: operationId: EnableDevice description: Enable Device parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" responses: - '200': + "200": description: Successful operation default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy": get: operationId: GetDeviceEnvironmentHierarchy summary: Get environment variable hierarchy for a device parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" responses: - '200': + "200": description: Successfully retrieved device environment hierarchy content: application/json: schema: - $ref: '#/components/schemas/EnvTreeJsonNode' - '404': + $ref: "#/components/schemas/EnvTreeJsonNode" + "404": description: Project or device not found - '500': + "500": description: Server error security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables": get: operationId: GetDeviceEnvironmentVariables description: Get environment variables of a device responses: - '200': - $ref: '#/components/responses/GetDeviceEnvironmentVariablesResponse' + "200": + $ref: "#/components/responses/GetDeviceEnvironmentVariablesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" put: operationId: SetDeviceEnvironmentVariables description: Set environment variables of a device @@ -596,23 +596,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/EnvironmentVariables' + $ref: "#/components/schemas/EnvironmentVariables" responses: - '200': - $ref: '#/components/responses/EnvironmentVariablesResponse' + "200": + $ref: "#/components/responses/EnvironmentVariablesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}": delete: operationId: DeleteDeviceEnvironmentVariable description: Delete environment variable of a device parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" - name: key in: path description: The environment variable key to delete. @@ -620,21 +620,21 @@ paths: schema: type: string responses: - '200': - $ref: '#/components/responses/EnvironmentVariablesResponse' + "200": + $ref: "#/components/responses/EnvironmentVariablesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files": delete: operationId: DeleteNotefiles description: Deletes Notefiles and the Notes they contain. parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" requestBody: required: true content: @@ -648,10 +648,10 @@ paths: items: type: string responses: - '200': + "200": description: An empty object means success default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -660,8 +660,8 @@ paths: operationId: ListNotefiles description: Lists .qi and .db files for the device parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" - name: files in: query description: One or more files to obtain change information from. @@ -677,19 +677,19 @@ paths: schema: type: boolean responses: - '200': + "200": description: All notefiles and their notes content: application/json: schema: - $ref: '#/components/schemas/NotefileList' + $ref: "#/components/schemas/NotefileList" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets": delete: operationId: DeleteDeviceFromFleets description: Remove Device from Fleets @@ -710,10 +710,10 @@ paths: required: - fleet_uids responses: - '200': - $ref: '#/components/responses/FleetsResponse' + "200": + $ref: "#/components/responses/FleetsResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -722,17 +722,17 @@ paths: operationId: GetDeviceFleets description: Get Device Fleets responses: - '200': - $ref: '#/components/responses/FleetsResponse' + "200": + $ref: "#/components/responses/FleetsResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" put: operationId: AddDeviceToFleets description: Add Device to Fleets @@ -753,23 +753,23 @@ paths: required: - fleet_uids responses: - '200': - $ref: '#/components/responses/FleetsResponse' + "200": + $ref: "#/components/responses/FleetsResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log": get: operationId: GetDeviceHealthLog description: Get Device Health Log parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' - - $ref: '#/components/parameters/startDateParam' - - $ref: '#/components/parameters/endDateParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/startDateParam" + - $ref: "#/components/parameters/endDateParam" - name: log_type in: query description: Return only specified log types @@ -782,7 +782,7 @@ paths: - dfu_completed type: string responses: - '200': + "200": description: Successful operation content: application/json: @@ -808,35 +808,35 @@ paths: required: - health_log default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest": get: operationId: GetDeviceLatestEvents description: Get Device Latest Events parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" responses: - '200': - $ref: '#/components/responses/LatestResponse' + "200": + $ref: "#/components/responses/LatestResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}': + "/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' - - $ref: '#/components/parameters/notefileIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/notefileIDParam" - name: max in: query description: The maximum number of Notes to return in the request. @@ -856,7 +856,7 @@ paths: schema: type: boolean responses: - '200': + "200": description: The note changes object content: application/json: @@ -873,48 +873,48 @@ paths: description: The total number of notes. type: integer default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device 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' - - $ref: '#/components/parameters/notefileIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/notefileIDParam" requestBody: description: Body or payload of note to be added to the device required: true content: application/json: schema: - $ref: '#/components/schemas/NoteInput' + $ref: "#/components/schemas/NoteInput" responses: - '200': + "200": description: An empty object means success default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}": delete: operationId: DeleteNote description: Delete a note from a .db or .qi notefile parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' - - $ref: '#/components/parameters/notefileIDParam' - - $ref: '#/components/parameters/noteIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/notefileIDParam" + - $ref: "#/components/parameters/noteIDParam" responses: - '200': + "200": description: An empty object means success default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -923,10 +923,10 @@ paths: operationId: GetDbNote description: Get a note from a .db or .qi notefile parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' - - $ref: '#/components/parameters/notefileIDParam' - - $ref: '#/components/parameters/noteIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/notefileIDParam" + - $ref: "#/components/parameters/noteIDParam" - name: delete in: query description: Whether to delete the note from the DB notefile @@ -940,7 +940,7 @@ paths: schema: type: boolean responses: - '200': + "200": description: The requested note content: application/json: @@ -957,7 +957,7 @@ paths: description: The time the Note was added to the Notecard or Notehub type: integer default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -966,22 +966,22 @@ paths: operationId: AddDbNote description: Add a Note to a .db notefile. if noteID is '-' then payload is ignored and empty notefile is created parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' - - $ref: '#/components/parameters/notefileIDParam' - - $ref: '#/components/parameters/noteIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/notefileIDParam" + - $ref: "#/components/parameters/noteIDParam" requestBody: description: Body or payload of note to be added to the device required: true content: application/json: schema: - $ref: '#/components/schemas/NoteInput' + $ref: "#/components/schemas/NoteInput" responses: - '200': + "200": description: An empty object means success default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -990,49 +990,49 @@ paths: operationId: UpdateDbNote description: Update a note in a .db or .qi notefile parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' - - $ref: '#/components/parameters/notefileIDParam' - - $ref: '#/components/parameters/noteIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/notefileIDParam" + - $ref: "#/components/parameters/noteIDParam" requestBody: description: Body or payload of note to be added to the device required: true content: application/json: schema: - $ref: '#/components/schemas/NoteInput' + $ref: "#/components/schemas/NoteInput" responses: - '200': + "200": description: An empty object means success default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans': + "/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' + "200": + $ref: "#/components/responses/DevicePlansResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision': + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision": post: operationId: ProvisionDevice description: Provision Device for a Project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" requestBody: description: Provision a device to a specific ProductUID required: true @@ -1056,7 +1056,7 @@ paths: required: - product_uid responses: - '200': + "200": description: Successful operation content: application/json: @@ -1064,20 +1064,20 @@ paths: type: object default: {} default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key": get: operationId: GetDevicePublicKey description: Get Device Public Key parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" responses: - '200': + "200": description: Successful operation content: application/json: @@ -1092,47 +1092,47 @@ paths: - uid - key default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions": get: operationId: GetDeviceSessions description: Get Device Sessions parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' - - $ref: '#/components/parameters/pageSizeParam' - - $ref: '#/components/parameters/pageNumParam' - - $ref: '#/components/parameters/startDateParam' - - $ref: '#/components/parameters/endDateParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/pageSizeParam" + - $ref: "#/components/parameters/pageNumParam" + - $ref: "#/components/parameters/startDateParam" + - $ref: "#/components/parameters/endDateParam" responses: - '200': - $ref: '#/components/responses/SessionResponse' + "200": + $ref: "#/components/responses/SessionResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal': + "/v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal": post: operationId: SignalDevice description: Send a signal from Notehub to a Notecard. parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" requestBody: description: Body or payload of signal to be sent to the device required: true content: application/json: schema: - $ref: '#/components/schemas/Body' + $ref: "#/components/schemas/Body" responses: - '200': + "200": description: A status response. content: application/json: @@ -1143,21 +1143,21 @@ paths: description: true if the Notecard is connected to Notehub. type: boolean default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/devices/public-keys': + "/v1/projects/{projectOrProductUID}/devices/public-keys": get: operationId: GetDevicePublicKeys description: Get Device Public Keys of a Project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/pageSizeParam' - - $ref: '#/components/parameters/pageNumParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/pageSizeParam" + - $ref: "#/components/parameters/pageNumParam" responses: - '200': + "200": description: Successful operation content: application/json: @@ -1179,146 +1179,146 @@ paths: - device_public_keys - has_more default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}': + "/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}": post: operationId: PerformDfuAction description: Update/cancel host or notecard firmware updates parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/firmwareTypeParam' - - $ref: '#/components/parameters/dfuActionParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' - - $ref: '#/components/parameters/tagParam' - - $ref: '#/components/parameters/serialNumberParam' - - $ref: '#/components/parameters/fleetUIDQueryParam' - - $ref: '#/components/parameters/notecardFirmwareParam' - - $ref: '#/components/parameters/locationParam' - - $ref: '#/components/parameters/hostFirmwareParam' - - $ref: '#/components/parameters/productUIDQueryParam' - - $ref: '#/components/parameters/skuParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/firmwareTypeParam" + - $ref: "#/components/parameters/dfuActionParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/tagParam" + - $ref: "#/components/parameters/serialNumberParam" + - $ref: "#/components/parameters/fleetUIDQueryParam" + - $ref: "#/components/parameters/notecardFirmwareParam" + - $ref: "#/components/parameters/locationParam" + - $ref: "#/components/parameters/hostFirmwareParam" + - $ref: "#/components/parameters/productUIDQueryParam" + - $ref: "#/components/parameters/skuParam" requestBody: description: Which firmware in the case of an update action required: false content: application/json: schema: - $ref: '#/components/schemas/DfuActionRequest' + $ref: "#/components/schemas/DfuActionRequest" responses: - '200': + "200": description: Success default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history': + "/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history": get: operationId: GetDevicesDfuHistory description: Get host or Notecard DFU history for all devices that match the filter criteria parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/firmwareTypeParam' - - $ref: '#/components/parameters/pageSizeParam' - - $ref: '#/components/parameters/pageNumParam' - - $ref: '#/components/parameters/sortByParam' - - $ref: '#/components/parameters/sortOrderParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' - - $ref: '#/components/parameters/tagParam' - - $ref: '#/components/parameters/serialNumberParam' - - $ref: '#/components/parameters/fleetUIDQueryParam' - - $ref: '#/components/parameters/notecardFirmwareParam' - - $ref: '#/components/parameters/locationParam' - - $ref: '#/components/parameters/hostFirmwareParam' - - $ref: '#/components/parameters/productUIDQueryParam' - - $ref: '#/components/parameters/skuParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/firmwareTypeParam" + - $ref: "#/components/parameters/pageSizeParam" + - $ref: "#/components/parameters/pageNumParam" + - $ref: "#/components/parameters/sortByParam" + - $ref: "#/components/parameters/sortOrderParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/tagParam" + - $ref: "#/components/parameters/serialNumberParam" + - $ref: "#/components/parameters/fleetUIDQueryParam" + - $ref: "#/components/parameters/notecardFirmwareParam" + - $ref: "#/components/parameters/locationParam" + - $ref: "#/components/parameters/hostFirmwareParam" + - $ref: "#/components/parameters/productUIDQueryParam" + - $ref: "#/components/parameters/skuParam" responses: - '200': + "200": description: Success content: application/json: schema: - $ref: '#/components/schemas/DeviceDfuHistoryPage' + $ref: "#/components/schemas/DeviceDfuHistoryPage" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status': + "/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status": get: operationId: GetDevicesDfuStatus description: Get host or Notecard DFU history for all devices that match the filter criteria parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/firmwareTypeParam' - - $ref: '#/components/parameters/pageSizeParam' - - $ref: '#/components/parameters/pageNumParam' - - $ref: '#/components/parameters/sortByParam' - - $ref: '#/components/parameters/sortOrderParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' - - $ref: '#/components/parameters/tagParam' - - $ref: '#/components/parameters/serialNumberParam' - - $ref: '#/components/parameters/fleetUIDQueryParam' - - $ref: '#/components/parameters/notecardFirmwareParam' - - $ref: '#/components/parameters/locationParam' - - $ref: '#/components/parameters/hostFirmwareParam' - - $ref: '#/components/parameters/productUIDQueryParam' - - $ref: '#/components/parameters/skuParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/firmwareTypeParam" + - $ref: "#/components/parameters/pageSizeParam" + - $ref: "#/components/parameters/pageNumParam" + - $ref: "#/components/parameters/sortByParam" + - $ref: "#/components/parameters/sortOrderParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/tagParam" + - $ref: "#/components/parameters/serialNumberParam" + - $ref: "#/components/parameters/fleetUIDQueryParam" + - $ref: "#/components/parameters/notecardFirmwareParam" + - $ref: "#/components/parameters/locationParam" + - $ref: "#/components/parameters/hostFirmwareParam" + - $ref: "#/components/parameters/productUIDQueryParam" + - $ref: "#/components/parameters/skuParam" responses: - '200': + "200": description: Success content: application/json: schema: - $ref: '#/components/schemas/DeviceDfuStatusPage' + $ref: "#/components/schemas/DeviceDfuStatusPage" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/environment_hierarchy': + "/v1/projects/{projectOrProductUID}/environment_hierarchy": get: operationId: GetProjectEnvironmentHierarchy summary: Get environment variable hierarchy for a device parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" responses: - '200': + "200": description: Successfully retrieved project environment hierarchy content: application/json: schema: - $ref: '#/components/schemas/EnvTreeJsonNode' - '404': + $ref: "#/components/schemas/EnvTreeJsonNode" + "404": description: Project or device not found - '500': + "500": description: Server error security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/environment_variables': + "/v1/projects/{projectOrProductUID}/environment_variables": get: operationId: GetProjectEnvironmentVariables description: Get environment variables of a project responses: - '200': - $ref: '#/components/responses/EnvironmentVariablesResponse' + "200": + $ref: "#/components/responses/EnvironmentVariablesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" put: operationId: SetProjectEnvironmentVariables description: Set environment variables of a project @@ -1326,22 +1326,22 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/EnvironmentVariables' + $ref: "#/components/schemas/EnvironmentVariables" responses: - '200': - $ref: '#/components/responses/EnvironmentVariablesResponse' + "200": + $ref: "#/components/responses/EnvironmentVariablesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/environment_variables/{key}': + "/v1/projects/{projectOrProductUID}/environment_variables/{key}": delete: operationId: DeleteProjectEnvironmentVariable description: Delete an environment variable of a project by key parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" - name: key in: path description: The environment variable key to delete. @@ -1349,36 +1349,36 @@ paths: schema: type: string responses: - '200': - $ref: '#/components/responses/EnvironmentVariablesResponse' + "200": + $ref: "#/components/responses/EnvironmentVariablesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/events': + "/v1/projects/{projectOrProductUID}/events": get: operationId: GetEvents description: Get Events of a Project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/pageSizeParam' - - $ref: '#/components/parameters/pageNumParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' - - $ref: '#/components/parameters/sortByParam' - - $ref: '#/components/parameters/sortOrderParam' - - $ref: '#/components/parameters/startDateParam' - - $ref: '#/components/parameters/endDateParam' - - $ref: '#/components/parameters/dateTypeParam' - - $ref: '#/components/parameters/systemFilesOnlyParam' - - $ref: '#/components/parameters/filesQueryParam' - - $ref: '#/components/parameters/formatParam' - - $ref: '#/components/parameters/serialNumberFilterParam' - - $ref: '#/components/parameters/fleetUIDFilterQueryParam' - - $ref: '#/components/parameters/sessionUIDFilterParam' - - $ref: '#/components/parameters/eventUIDFilterQueryParam' - - $ref: '#/components/parameters/selectFieldsParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/pageSizeParam" + - $ref: "#/components/parameters/pageNumParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/sortByParam" + - $ref: "#/components/parameters/sortOrderParam" + - $ref: "#/components/parameters/startDateParam" + - $ref: "#/components/parameters/endDateParam" + - $ref: "#/components/parameters/dateTypeParam" + - $ref: "#/components/parameters/systemFilesOnlyParam" + - $ref: "#/components/parameters/filesQueryParam" + - $ref: "#/components/parameters/formatParam" + - $ref: "#/components/parameters/serialNumberFilterParam" + - $ref: "#/components/parameters/fleetUIDFilterQueryParam" + - $ref: "#/components/parameters/sessionUIDFilterParam" + - $ref: "#/components/parameters/eventUIDFilterQueryParam" + - $ref: "#/components/parameters/selectFieldsParam" - name: deviceUIDs in: query description: Deprecated. @@ -1396,95 +1396,120 @@ paths: type: string deprecated: true responses: - '200': - $ref: '#/components/responses/EventsResponse' + "200": + $ref: "#/components/responses/EventsResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - event - '/v1/projects/{projectOrProductUID}/events-cursor': + "/v1/projects/{projectOrProductUID}/events-cursor": get: operationId: GetEventsByCursor description: Get Events of a Project by cursor parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/limitParam' - - $ref: '#/components/parameters/cursorParam' - - $ref: '#/components/parameters/sortOrderParam' - - $ref: '#/components/parameters/systemFilesOnlyParam' - - $ref: '#/components/parameters/filesQueryParam' - - $ref: '#/components/parameters/fleetUIDQueryParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/limitParam" + - $ref: "#/components/parameters/cursorParam" + - $ref: "#/components/parameters/sortOrderParam" + - $ref: "#/components/parameters/systemFilesOnlyParam" + - $ref: "#/components/parameters/filesQueryParam" + - $ref: "#/components/parameters/fleetUIDQueryParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" responses: - '200': - $ref: '#/components/responses/EventsByCursorResponse' + "200": + $ref: "#/components/responses/EventsByCursorResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - event - '/v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs': + "/v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs": get: operationId: GetRouteLogsByEvent description: Get Route Logs by Event UID parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/eventUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/eventUIDParam" responses: - '200': + "200": description: Successful operation content: application/json: schema: type: array items: - $ref: '#/components/schemas/RouteLog' + $ref: "#/components/schemas/RouteLog" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - event - '/v1/projects/{projectOrProductUID}/firmware': + "/v1/projects/{projectOrProductUID}/firmware": get: operationId: GetFirmwareInfo description: Get Available Firmware Information parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/productQueryParam' - - $ref: '#/components/parameters/firmwareTypeQueryParam' - - $ref: '#/components/parameters/versionQueryParam' - - $ref: '#/components/parameters/targetQueryParam' - - $ref: '#/components/parameters/filenameQueryParam' - - $ref: '#/components/parameters/md5QueryParam' - - $ref: '#/components/parameters/unpublishedQueryParam' - - $ref: '#/components/parameters/firmwareSortByParam' - - $ref: '#/components/parameters/firmwareSortOrderParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/productQueryParam" + - $ref: "#/components/parameters/firmwareTypeQueryParam" + - $ref: "#/components/parameters/versionQueryParam" + - $ref: "#/components/parameters/targetQueryParam" + - $ref: "#/components/parameters/filenameQueryParam" + - $ref: "#/components/parameters/md5QueryParam" + - $ref: "#/components/parameters/unpublishedQueryParam" + - $ref: "#/components/parameters/firmwareSortByParam" + - $ref: "#/components/parameters/firmwareSortOrderParam" responses: - '200': + "200": description: Success content: application/json: schema: type: array items: - $ref: '#/components/schemas/FirmwareInfo' + $ref: "#/components/schemas/FirmwareInfo" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" + security: + - personalAccessToken: [] + tags: + - project + "/v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}": + get: + operationId: DownloadFirmware + description: Download firmware binary + parameters: + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/firmwareTypeParam" + - name: filename + in: path + required: true + schema: + type: string + responses: + "200": + description: Firmware binary + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}': put: operationId: UploadFirmware description: Upload firmware binary parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/firmwareTypeParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/firmwareTypeParam" - name: filename in: path required: true @@ -1492,7 +1517,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 @@ -1511,33 +1536,33 @@ paths: type: string format: binary responses: - '200': + "200": description: Upload successful content: application/json: schema: - $ref: '#/components/schemas/FirmwareInfo' + $ref: "#/components/schemas/FirmwareInfo" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/fleets': + "/v1/projects/{projectOrProductUID}/fleets": get: operationId: GetFleets description: Get Project Fleets responses: - '200': - $ref: '#/components/responses/FleetsResponse' + "200": + $ref: "#/components/responses/FleetsResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" post: operationId: CreateFleet description: Create Fleet @@ -1550,36 +1575,36 @@ paths: type: object properties: connectivity_assurance: - $ref: '#/components/schemas/FleetConnectivityAssurance' + $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' + $ref: "#/components/schemas/FleetRule" smart_rule_enabled: type: boolean responses: - '201': + "201": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Fleet' + $ref: "#/components/schemas/Fleet" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}': + "/v1/projects/{projectOrProductUID}/fleets/{fleetUID}": delete: operationId: DeleteFleet description: Delete Fleet responses: - '204': + "204": description: Successful operation default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -1588,19 +1613,19 @@ paths: operationId: GetFleet description: Get Fleet responses: - '200': + "200": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Fleet' + $ref: "#/components/schemas/Fleet" security: - personalAccessToken: [] tags: - project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/fleetUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/fleetUIDParam" put: operationId: UpdateFleet description: Update Fleet @@ -1618,7 +1643,7 @@ paths: items: type: string connectivity_assurance: - $ref: '#/components/schemas/FleetConnectivityAssurance' + $ref: "#/components/schemas/FleetConnectivityAssurance" label: description: The label for the Fleet. type: string @@ -1628,7 +1653,7 @@ paths: items: type: string smart_rule: - $ref: '#/components/schemas/FleetRule' + $ref: "#/components/schemas/FleetRule" smart_rule_enabled: type: boolean watchdog_mins: @@ -1636,82 +1661,82 @@ paths: type: integer format: int64 responses: - '200': + "200": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Fleet' + $ref: "#/components/schemas/Fleet" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices': + "/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices": get: operationId: GetFleetDevices description: Get Devices of a Fleet within a Project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/fleetUIDParam' - - $ref: '#/components/parameters/pageSizeParam' - - $ref: '#/components/parameters/pageNumParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' - - $ref: '#/components/parameters/tagParam' - - $ref: '#/components/parameters/serialNumberParam' - - $ref: '#/components/parameters/notecardFirmwareParam' - - $ref: '#/components/parameters/locationParam' - - $ref: '#/components/parameters/hostFirmwareParam' - - $ref: '#/components/parameters/productUIDQueryParam' - - $ref: '#/components/parameters/skuParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/fleetUIDParam" + - $ref: "#/components/parameters/pageSizeParam" + - $ref: "#/components/parameters/pageNumParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/tagParam" + - $ref: "#/components/parameters/serialNumberParam" + - $ref: "#/components/parameters/notecardFirmwareParam" + - $ref: "#/components/parameters/locationParam" + - $ref: "#/components/parameters/hostFirmwareParam" + - $ref: "#/components/parameters/productUIDQueryParam" + - $ref: "#/components/parameters/skuParam" responses: - '200': - $ref: '#/components/responses/DevicesResponse' + "200": + $ref: "#/components/responses/DevicesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - device - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy': + "/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy": get: operationId: GetFleetEnvironmentHierarchy summary: Get environment variable hierarchy for a device parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/fleetUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/fleetUIDParam" responses: - '200': + "200": description: Successfully retrieved fleet environment hierarchy content: application/json: schema: - $ref: '#/components/schemas/EnvTreeJsonNode' - '404': + $ref: "#/components/schemas/EnvTreeJsonNode" + "404": description: Project or device not found - '500': + "500": description: Server error security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables': + "/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables": get: operationId: GetFleetEnvironmentVariables description: Get environment variables of a fleet responses: - '200': - $ref: '#/components/responses/EnvironmentVariablesResponse' + "200": + $ref: "#/components/responses/EnvironmentVariablesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/fleetUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/fleetUIDParam" put: operationId: SetFleetEnvironmentVariables description: Set environment variables of a fleet @@ -1721,23 +1746,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/EnvironmentVariables' + $ref: "#/components/schemas/EnvironmentVariables" responses: - '200': - $ref: '#/components/responses/EnvironmentVariablesResponse' + "200": + $ref: "#/components/responses/EnvironmentVariablesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}': + "/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}": delete: operationId: DeleteFleetEnvironmentVariable description: Delete environment variables of a fleet parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/fleetUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/fleetUIDParam" - name: key in: path description: The environment variable key to delete. @@ -1745,36 +1770,36 @@ paths: schema: type: string responses: - '200': - $ref: '#/components/responses/EnvironmentVariablesResponse' + "200": + $ref: "#/components/responses/EnvironmentVariablesResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events': + "/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events": get: operationId: GetFleetEvents description: Get Events of a Fleet parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/fleetUIDParam' - - $ref: '#/components/parameters/pageSizeParam' - - $ref: '#/components/parameters/pageNumParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' - - $ref: '#/components/parameters/sortByParam' - - $ref: '#/components/parameters/sortOrderParam' - - $ref: '#/components/parameters/startDateParam' - - $ref: '#/components/parameters/endDateParam' - - $ref: '#/components/parameters/dateTypeParam' - - $ref: '#/components/parameters/systemFilesOnlyParam' - - $ref: '#/components/parameters/filesQueryParam' - - $ref: '#/components/parameters/formatParam' - - $ref: '#/components/parameters/serialNumberFilterParam' - - $ref: '#/components/parameters/sessionUIDFilterParam' - - $ref: '#/components/parameters/eventUIDFilterQueryParam' - - $ref: '#/components/parameters/selectFieldsParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/fleetUIDParam" + - $ref: "#/components/parameters/pageSizeParam" + - $ref: "#/components/parameters/pageNumParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/sortByParam" + - $ref: "#/components/parameters/sortOrderParam" + - $ref: "#/components/parameters/startDateParam" + - $ref: "#/components/parameters/endDateParam" + - $ref: "#/components/parameters/dateTypeParam" + - $ref: "#/components/parameters/systemFilesOnlyParam" + - $ref: "#/components/parameters/filesQueryParam" + - $ref: "#/components/parameters/formatParam" + - $ref: "#/components/parameters/serialNumberFilterParam" + - $ref: "#/components/parameters/sessionUIDFilterParam" + - $ref: "#/components/parameters/eventUIDFilterQueryParam" + - $ref: "#/components/parameters/selectFieldsParam" - name: deviceUIDs in: query description: Deprecated. @@ -1792,96 +1817,96 @@ paths: type: string deprecated: true responses: - '200': - $ref: '#/components/responses/EventsResponse' + "200": + $ref: "#/components/responses/EventsResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - event - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor': + "/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' + - $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' + "200": + $ref: "#/components/responses/EventsByCursorResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - event - '/v1/projects/{projectOrProductUID}/global-transformation': + "/v1/projects/{projectOrProductUID}/global-transformation": post: operationId: SetGlobalEventTransformation description: Set the project-level event JSONata transformation parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $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/schemas/JSONata" responses: - '200': + "200": description: Successful operation default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/global-transformation/disable': + "/v1/projects/{projectOrProductUID}/global-transformation/disable": post: operationId: DisableGlobalEventTransformation description: Disable the project-level event JSONata transformation parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" responses: - '200': + "200": description: Successful operation default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/global-transformation/enable': + "/v1/projects/{projectOrProductUID}/global-transformation/enable": post: operationId: EnableGlobalEventTransformation description: Enable the project-level event JSONata transformation parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" responses: - '200': + "200": description: Successful operation default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/members': + "/v1/projects/{projectOrProductUID}/members": get: operationId: GetProjectMembers description: Get Project Members responses: - '200': + "200": description: Successful operation content: application/json: @@ -1891,28 +1916,28 @@ paths: members: type: array items: - $ref: '#/components/schemas/ProjectMember' + $ref: "#/components/schemas/ProjectMember" required: - members default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - '/v1/projects/{projectOrProductUID}/monitors': + - $ref: "#/components/parameters/projectOrProductUIDParam" + "/v1/projects/{projectOrProductUID}/monitors": get: operationId: GetMonitors description: Get list of defined Monitors parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" responses: - '200': - $ref: '#/components/responses/MonitorsResponse' + "200": + $ref: "#/components/responses/MonitorsResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -1921,43 +1946,43 @@ paths: operationId: CreateMonitor description: Create a new Monitor parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" requestBody: description: Body or payload of monitor to be created required: true content: application/json: schema: - $ref: '#/components/schemas/CreateMonitor' + $ref: "#/components/schemas/CreateMonitor" responses: - '201': + "201": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Monitor' + $ref: "#/components/schemas/Monitor" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - monitor - '/v1/projects/{projectOrProductUID}/monitors/{monitorUID}': + "/v1/projects/{projectOrProductUID}/monitors/{monitorUID}": delete: operationId: DeleteMonitor description: Delete Monitor parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/monitorUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/monitorUIDParam" responses: - '200': + "200": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Monitor' + $ref: "#/components/schemas/Monitor" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -1966,17 +1991,17 @@ paths: operationId: GetMonitor description: Get Monitor parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/monitorUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/monitorUIDParam" responses: - '200': + "200": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Monitor' + $ref: "#/components/schemas/Monitor" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -1985,34 +2010,34 @@ paths: operationId: UpdateMonitor description: Update Monitor parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/monitorUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/monitorUIDParam" requestBody: description: Body or payload of monitor to be created required: true content: application/json: schema: - $ref: '#/components/schemas/Monitor' + $ref: "#/components/schemas/Monitor" responses: - '200': + "200": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Monitor' + $ref: "#/components/schemas/Monitor" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - monitor - '/v1/projects/{projectOrProductUID}/products': + "/v1/projects/{projectOrProductUID}/products": get: operationId: GetProducts description: Get Products within a Project responses: - '200': + "200": description: Successful operation content: application/json: @@ -2022,15 +2047,15 @@ paths: products: type: array items: - $ref: '#/components/schemas/Product' + $ref: "#/components/schemas/Product" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" post: operationId: CreateProduct description: Create Product within a Project @@ -2047,7 +2072,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. @@ -2059,83 +2084,83 @@ paths: - product_uid - label responses: - '201': + "201": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/Product' + $ref: "#/components/schemas/Product" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project - '/v1/projects/{projectOrProductUID}/products/{productUID}': + "/v1/projects/{projectOrProductUID}/products/{productUID}": delete: operationId: DeleteProduct description: Delete a product responses: - '204': + "204": description: Successful operation default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/productUIDParam' - '/v1/projects/{projectOrProductUID}/routes': + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/productUIDParam" + "/v1/projects/{projectOrProductUID}/routes": get: operationId: GetRoutes description: Get all Routes within a Project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" responses: - '200': + "200": description: Successful operation content: application/json: 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: - $ref: '#/components/schemas/NotehubRouteSummary' + $ref: "#/components/schemas/NotehubRouteSummary" minItems: 0 default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -2144,7 +2169,7 @@ paths: operationId: CreateRoute description: Create Route within a Project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" requestBody: description: Route to be created required: true @@ -2158,59 +2183,59 @@ 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' + $ref: "#/components/schemas/NotehubRoute" responses: - '201': + "201": description: Created content: application/json: example: - disabled: 'false' + disabled: "false" http: disable_http_headers: false filter: system_notefiles: false - type: '' + 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' + $ref: "#/components/schemas/NotehubRoute" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - route - '/v1/projects/{projectOrProductUID}/routes/{routeUID}': + "/v1/projects/{projectOrProductUID}/routes/{routeUID}": delete: operationId: DeleteRoute description: Delete single route within a project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/routeUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/routeUIDParam" responses: - '204': + "204": description: Successful operation default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -2219,35 +2244,35 @@ paths: operationId: GetRoute description: Get single route within a project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/routeUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/routeUIDParam" responses: - '200': + "200": description: Successful operation content: application/json: example: - disabled: 'false' + disabled: "false" http: disable_http_headers: false filter: system_notefiles: false - type: '' + 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' + $ref: "#/components/schemas/NotehubRoute" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -2256,8 +2281,8 @@ paths: operationId: UpdateRoute description: Update route by UID parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/routeUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/routeUIDParam" requestBody: description: Route settings to be updated required: true @@ -2276,9 +2301,9 @@ paths: }, } schema: - $ref: '#/components/schemas/NotehubRoute' + $ref: "#/components/schemas/NotehubRoute" responses: - '200': + "200": description: Successful operation content: application/json: @@ -2305,74 +2330,75 @@ paths: "timeout": 0 } schema: - $ref: '#/components/schemas/NotehubRoute' + $ref: "#/components/schemas/NotehubRoute" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - route - '/v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs': + "/v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs": get: operationId: GetRouteLogsByRoute description: Get Route Logs by Route UID parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/routeUIDParam' - - $ref: '#/components/parameters/pageSizeParam' - - $ref: '#/components/parameters/pageNumParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' - - $ref: '#/components/parameters/routeLogsSortByParam' - - $ref: '#/components/parameters/routeLogsSortOrderParam' - - $ref: '#/components/parameters/startDateParam' - - $ref: '#/components/parameters/endDateParam' - - $ref: '#/components/parameters/systemFilesOnlyParam' - - $ref: '#/components/parameters/mostRecentOnlyParam' - - $ref: '#/components/parameters/filesQueryParam' - - $ref: '#/components/parameters/routingStatusParam' - - $ref: '#/components/parameters/responseStatusParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/routeUIDParam" + - $ref: "#/components/parameters/pageSizeParam" + - $ref: "#/components/parameters/pageNumParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/routeLogsSortByParam" + - $ref: "#/components/parameters/routeLogsSortOrderParam" + - $ref: "#/components/parameters/startDateParam" + - $ref: "#/components/parameters/endDateParam" + - $ref: "#/components/parameters/systemFilesOnlyParam" + - $ref: "#/components/parameters/mostRecentOnlyParam" + - $ref: "#/components/parameters/filesQueryParam" + - $ref: "#/components/parameters/routingStatusParam" + - $ref: "#/components/parameters/responseStatusParam" responses: - '200': + "200": description: Successful operation content: application/json: schema: type: array items: - $ref: '#/components/schemas/RouteLog' + $ref: "#/components/schemas/RouteLog" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - route - '/v1/projects/{projectOrProductUID}/schemas': + "/v1/projects/{projectOrProductUID}/schemas": get: operationId: GetNotefileSchemas summary: Get variable format for a notefile parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" responses: - '200': + "200": description: List of notefile schema definitions content: application/json: schema: type: array items: - $ref: '#/components/schemas/NotefileSchema' + $ref: "#/components/schemas/NotefileSchema" tags: - project - '/v1/projects/{projectOrProductUID}/usage/data': + "/v1/projects/{projectOrProductUID}/usage/data": get: operationId: GetDataUsage description: Get data usage in bytes for a project with time range and period aggregation parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/startDateParam' - - $ref: '#/components/parameters/endDateParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' - - $ref: '#/components/parameters/fleetUIDFilterQueryParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/startDateParam" + - $ref: "#/components/parameters/endDateParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/fleetUIDFilterQueryParam" + - $ref: "#/components/parameters/usageLimitQueryParam" - name: period in: query description: Period type for aggregation @@ -2395,24 +2421,25 @@ paths: - fleet - project responses: - '200': - $ref: '#/components/responses/UsageDataResponse' + "200": + $ref: "#/components/responses/UsageDataResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - usage - '/v1/projects/{projectOrProductUID}/usage/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' - - $ref: '#/components/parameters/endDateParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' - - $ref: '#/components/parameters/fleetUIDFilterQueryParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/startDateParam" + - $ref: "#/components/parameters/endDateParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/fleetUIDFilterQueryParam" + - $ref: "#/components/parameters/usageLimitQueryParam" - name: period in: query description: Period type for aggregation @@ -2446,7 +2473,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 @@ -2459,27 +2486,28 @@ paths: type: boolean default: false responses: - '200': + "200": description: Successful operation content: application/json: schema: - $ref: '#/components/schemas/UsageEventsResponse' + $ref: "#/components/schemas/UsageEventsResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - usage - '/v1/projects/{projectOrProductUID}/usage/route-logs': + "/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' - - $ref: '#/components/parameters/endDateParam' - - $ref: '#/components/parameters/routeUIDParamQuery' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/startDateParam" + - $ref: "#/components/parameters/endDateParam" + - $ref: "#/components/parameters/routeUIDParamQuery" + - $ref: "#/components/parameters/usageLimitQueryParam" - name: period in: query description: Period type for aggregation @@ -2502,30 +2530,31 @@ 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 default: false responses: - '200': - $ref: '#/components/responses/UsageRouteLogsResponse' + "200": + $ref: "#/components/responses/UsageRouteLogsResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - usage - '/v1/projects/{projectOrProductUID}/usage/sessions': + "/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' - - $ref: '#/components/parameters/endDateParam' - - $ref: '#/components/parameters/deviceUIDParamQuery' - - $ref: '#/components/parameters/fleetUIDFilterQueryParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/startDateParam" + - $ref: "#/components/parameters/endDateParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/fleetUIDFilterQueryParam" + - $ref: "#/components/parameters/usageLimitQueryParam" - name: period in: query description: Period type for aggregation @@ -2549,28 +2578,28 @@ 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 default: false responses: - '200': - $ref: '#/components/responses/UsageSessionsResponse' + "200": + $ref: "#/components/responses/UsageSessionsResponse" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - usage - '/v1/projects/{projectOrProductUID}/webhooks': + "/v1/projects/{projectOrProductUID}/webhooks": get: operationId: GetWebhooks description: Retrieves all webhooks for the specified project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" responses: - '200': + "200": description: Webhooks retrieved successfully content: application/json: @@ -2580,25 +2609,25 @@ paths: webhooks: type: array items: - $ref: '#/components/schemas/WebhookSettings' + $ref: "#/components/schemas/WebhookSettings" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: - webhook - '/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}': + "/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}": delete: operationId: DeleteWebhook description: Deletes the specified webhook parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/webhookUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/webhookUIDParam" responses: - '200': + "200": description: Webhook deleted successfully default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -2607,17 +2636,17 @@ paths: operationId: GetWebhook description: Retrieves the configuration settings for the specified webhook parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/webhookUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/webhookUIDParam" responses: - '200': + "200": description: Webhook settings retrieved successfully content: application/json: schema: - $ref: '#/components/schemas/WebhookSettings' + $ref: "#/components/schemas/WebhookSettings" default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -2626,8 +2655,8 @@ paths: operationId: CreateWebhook description: Creates a webhook for the specified product with the given name. The name | must be unique within the project. parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/webhookUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/webhookUIDParam" requestBody: required: true content: @@ -2638,12 +2667,12 @@ paths: id: Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8 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' + $ref: "#/components/schemas/WebhookSettings" responses: - '200': + "200": description: Webhook created successfully default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -2652,8 +2681,8 @@ paths: 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. parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/webhookUIDParam' + - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: "#/components/parameters/webhookUIDParam" requestBody: required: true content: @@ -2662,12 +2691,12 @@ paths: 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' + $ref: "#/components/schemas/WebhookSettings" responses: - '200': + "200": description: Webhook updated successfully default: - $ref: '#/components/responses/ErrorResponse' + $ref: "#/components/responses/ErrorResponse" security: - personalAccessToken: [] tags: @@ -2683,7 +2712,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 @@ -2697,7 +2726,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 @@ -2711,15 +2740,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 @@ -2740,28 +2769,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 @@ -2781,7 +2810,7 @@ components: items: type: string deviceUIDParam: - example: 'dev:000000000000000' + example: "dev:000000000000000" in: path name: deviceUID required: true @@ -2817,7 +2846,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 @@ -2851,7 +2880,7 @@ components: schema: type: string filesQueryParam: - example: '_health.qo, data.qo' + example: "_health.qo, data.qo" in: query name: files required: false @@ -2871,7 +2900,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 @@ -2983,7 +3012,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 @@ -3050,7 +3079,7 @@ components: schema: type: string productUIDParam: - example: 'com.blues.bridge:sensors' + example: "com.blues.bridge:sensors" in: path name: productUID required: true @@ -3067,7 +3096,7 @@ 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 @@ -3086,7 +3115,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 @@ -3117,7 +3146,7 @@ components: - asc - desc routeUIDParam: - example: 'route:cbd20093cba58392c9f9bbdd0cdeb1a0' + example: "route:cbd20093cba58392c9f9bbdd0cdeb1a0" in: path name: routeUID required: true @@ -3225,7 +3254,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 @@ -3262,6 +3291,16 @@ components: required: false schema: type: boolean + usageLimitQueryParam: + description: Limit the number of data points returned + in: query + name: limit + required: false + schema: + type: integer + default: 200000 + maximum: 400000 + minimum: 1 versionQueryParam: in: query name: version @@ -3361,7 +3400,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 @@ -3392,7 +3431,7 @@ components: disable_http_headers: type: boolean filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -3412,7 +3451,7 @@ components: timeout: type: integer transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" url: type: string format: uri @@ -3421,7 +3460,7 @@ components: type: object properties: filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -3437,7 +3476,7 @@ components: timeout: type: integer transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" url: type: string format: uri @@ -3448,7 +3487,7 @@ components: name: type: string role: - $ref: '#/components/schemas/BillingAccountRole' + $ref: "#/components/schemas/BillingAccountRole" uid: type: string required: @@ -3466,7 +3505,7 @@ components: type: object properties: filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -3478,7 +3517,7 @@ components: timeout: type: integer transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" additionalProperties: false Body: type: object @@ -3494,18 +3533,18 @@ components: format: int64 example: 1656010061 data_usage: - $ref: '#/components/schemas/DataUsage' + $ref: "#/components/schemas/DataUsage" expires_at: type: integer format: int64 iccid: description: The Integrated Circuit Card Identifier of the SIM card type: string - example: '345678432765434567890765746354465786' + example: "345678432765434567890765746354465786" imsi: description: IMSI of the SIM card type: string - example: '310170830688975' + example: "310170830688975" last_updated: description: Time this plan information was last updated type: integer @@ -3516,13 +3555,13 @@ 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: - $ref: '#/components/schemas/SimUsage' + $ref: "#/components/schemas/SimUsage" properties: {} Contact: type: object @@ -3537,10 +3576,10 @@ components: type: string nullable: true CreateMonitor: - type: '' + type: "" properties: {} allOf: - - $ref: '#/components/schemas/Monitor' + - $ref: "#/components/schemas/Monitor" - required: - name - description @@ -3551,25 +3590,25 @@ components: type: object properties: fleet_uids: - $ref: '#/components/schemas/FleetsUIDList' + $ref: "#/components/schemas/FleetsUIDList" name: type: string project_uids: - $ref: '#/components/schemas/AppUIDList' + $ref: "#/components/schemas/AppUIDList" CurrentFirmware: type: object properties: metadata: - $ref: '#/components/schemas/Firmware' + $ref: "#/components/schemas/Firmware" version: type: string DFUEnv: type: object properties: card: - $ref: '#/components/schemas/DFUState' + $ref: "#/components/schemas/DFUState" user: - $ref: '#/components/schemas/DFUState' + $ref: "#/components/schemas/DFUState" nullable: true DFUState: type: object @@ -3630,7 +3669,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: @@ -3640,12 +3679,12 @@ components: description: The name of the field type: string DataSet: - type: '' + type: "" properties: fields: type: array items: - $ref: '#/components/schemas/DataSetField' + $ref: "#/components/schemas/DataSetField" lat: description: JSONata expression resulting in the latitude field type: string @@ -3702,7 +3741,7 @@ components: disable_http_headers: type: boolean filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -3716,7 +3755,7 @@ components: timeout: type: integer transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" url: type: string format: uri @@ -3725,13 +3764,13 @@ components: type: object properties: best_location: - $ref: '#/components/schemas/Location' + $ref: "#/components/schemas/Location" cellular_usage: - $ref: '#/components/schemas/CellularUsage' + $ref: "#/components/schemas/CellularUsage" contact: - $ref: '#/components/schemas/Contact' + $ref: "#/components/schemas/Contact" dfu: - $ref: '#/components/schemas/DFUEnv' + $ref: "#/components/schemas/DFUEnv" disabled: type: boolean firmware_host: @@ -3743,7 +3782,7 @@ components: items: type: string gps_location: - $ref: '#/components/schemas/Location' + $ref: "#/components/schemas/Location" last_activity: type: string format: date-time @@ -3773,9 +3812,9 @@ components: mnc: type: integer tower_location: - $ref: '#/components/schemas/Location' + $ref: "#/components/schemas/Location" triangulated_location: - $ref: '#/components/schemas/Location' + $ref: "#/components/schemas/Location" uid: type: string voltage: @@ -3819,14 +3858,14 @@ components: history: type: array items: - $ref: '#/components/schemas/DeviceDfuStateMachine' + $ref: "#/components/schemas/DeviceDfuStateMachine" DeviceDfuHistoryPage: type: object properties: devices: type: array items: - $ref: '#/components/schemas/DeviceDfuHistory' + $ref: "#/components/schemas/DeviceDfuHistory" has_more: type: boolean default: false @@ -3846,7 +3885,7 @@ components: updates: type: array items: - $ref: '#/components/schemas/DeviceDfuStateMachineNode' + $ref: "#/components/schemas/DeviceDfuStateMachineNode" DeviceDfuStateMachineNode: description: Represents a single request to update the host or Notecard firmware type: object @@ -3895,14 +3934,14 @@ components: description: true if there is a DFU currently in progress type: boolean status: - $ref: '#/components/schemas/DeviceDfuStateMachine' + $ref: "#/components/schemas/DeviceDfuStateMachine" DeviceDfuStatusPage: type: object properties: devices: type: array items: - $ref: '#/components/schemas/DeviceDfuStatus' + $ref: "#/components/schemas/DeviceDfuStatus" has_more: type: boolean default: false @@ -3973,7 +4012,7 @@ components: type: integer format: int64 period: - $ref: '#/components/schemas/DeviceUsage' + $ref: "#/components/schemas/DeviceUsage" power_charging: type: boolean power_mah: @@ -4026,12 +4065,12 @@ components: description: Was TLS used? type: boolean tower: - $ref: '#/components/schemas/TowerLocation' + $ref: "#/components/schemas/TowerLocation" transport: description: Type of network transport type: string tri: - $ref: '#/components/schemas/TowerLocation' + $ref: "#/components/schemas/TowerLocation" triangulate: type: object usage_actual: @@ -4133,7 +4172,7 @@ components: children: type: array items: - $ref: '#/components/schemas/EnvTreeJsonNode' + $ref: "#/components/schemas/EnvTreeJsonNode" device_uid: type: string fleet_label: @@ -4152,7 +4191,7 @@ components: variables: type: array items: - $ref: '#/components/schemas/EnvVar' + $ref: "#/components/schemas/EnvVar" required: - var_count - inherited_var_count @@ -4216,7 +4255,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 @@ -4486,7 +4525,7 @@ components: type: object properties: connectivity_assurance: - $ref: '#/components/schemas/FleetConnectivityAssurance' + $ref: "#/components/schemas/FleetConnectivityAssurance" created: description: RFC3339 timestamp in UTC type: string @@ -4500,7 +4539,7 @@ components: description: Fleet label type: string smart_rule: - $ref: '#/components/schemas/FleetRule' + $ref: "#/components/schemas/FleetRule" smart_rule_enabled: type: boolean uid: @@ -4525,7 +4564,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: @@ -4537,7 +4576,7 @@ components: type: object properties: filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -4549,7 +4588,7 @@ components: token: type: string transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" url: type: string format: uri @@ -4560,9 +4599,9 @@ components: disable_http_headers: type: boolean filter: - $ref: '#/components/schemas/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 @@ -4575,7 +4614,7 @@ components: timeout: type: integer transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" url: type: string format: uri @@ -4612,7 +4651,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 @@ -4624,19 +4663,19 @@ 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 items: oneOf: - - $ref: '#/components/schemas/SlackWebHookNotification' - - $ref: '#/components/schemas/SlackBearerNotification' - - $ref: '#/components/schemas/EmailNotification' + - $ref: "#/components/schemas/SlackWebHookNotification" + - $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 @@ -4648,7 +4687,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 @@ -4664,18 +4703,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: @@ -4699,7 +4738,7 @@ components: certificate_name: type: string filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -4720,7 +4759,7 @@ components: topic: type: string transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" username: type: string additionalProperties: false @@ -4775,7 +4814,7 @@ components: notes: type: array items: - $ref: '#/components/schemas/Note' + $ref: "#/components/schemas/Note" minItems: 0 template: type: string @@ -4783,10 +4822,10 @@ 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' + $ref: "#/components/schemas/Notefile" properties: {} NotefileSchema: type: object @@ -4796,7 +4835,7 @@ components: properties: type: array items: - $ref: '#/components/schemas/SchemaProperty' + $ref: "#/components/schemas/SchemaProperty" required: - notefile - properties @@ -4805,20 +4844,20 @@ components: type: object properties: aws: - $ref: '#/components/schemas/AwsRoute' + $ref: "#/components/schemas/AwsRoute" azure: - $ref: '#/components/schemas/AzureRoute' + $ref: "#/components/schemas/AzureRoute" blynk: - $ref: '#/components/schemas/BlynkRoute' + $ref: "#/components/schemas/BlynkRoute" datacake: - $ref: '#/components/schemas/DatacakeRoute' + $ref: "#/components/schemas/DatacakeRoute" disabled: type: boolean default: false google: - $ref: '#/components/schemas/GoogleRoute' + $ref: "#/components/schemas/GoogleRoute" http: - $ref: '#/components/schemas/HttpRoute' + $ref: "#/components/schemas/HttpRoute" label: type: string modified: @@ -4826,25 +4865,25 @@ components: format: date-time readOnly: true mqtt: - $ref: '#/components/schemas/MqttRoute' + $ref: "#/components/schemas/MqttRoute" proxy: - $ref: '#/components/schemas/ProxyRoute' + $ref: "#/components/schemas/ProxyRoute" qubitro: - $ref: '#/components/schemas/QubitroRoute' + $ref: "#/components/schemas/QubitroRoute" radnote: - $ref: '#/components/schemas/RadRoute' + $ref: "#/components/schemas/RadRoute" s3archive: - $ref: '#/components/schemas/S3ArchiveRoute' + $ref: "#/components/schemas/S3ArchiveRoute" slack: - $ref: '#/components/schemas/SlackRoute' + $ref: "#/components/schemas/SlackRoute" snowflake: - $ref: '#/components/schemas/SnowflakeRoute' + $ref: "#/components/schemas/SnowflakeRoute" snowpipe_streaming: - $ref: '#/components/schemas/SnowpipeStreamingRoute' + $ref: "#/components/schemas/SnowpipeStreamingRoute" thingworx: - $ref: '#/components/schemas/ThingworxRoute' + $ref: "#/components/schemas/ThingworxRoute" twilio: - $ref: '#/components/schemas/TwilioRoute' + $ref: "#/components/schemas/TwilioRoute" type: description: Mirrors hublib.RouteType. type: string @@ -4870,7 +4909,7 @@ components: default: http uid: type: string - default: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + default: "route:8d65a087d5d290ce5bdf03aeff2becc0" OAuth2Error: type: object properties: @@ -4937,7 +4976,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 @@ -4945,7 +4984,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 @@ -4963,7 +5002,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 @@ -4998,16 +5037,16 @@ components: type: object properties: administrative_contact: - $ref: '#/components/schemas/Contact' + $ref: "#/components/schemas/Contact" created: type: string format: date-time label: type: string role: - $ref: '#/components/schemas/Role' + $ref: "#/components/schemas/Role" technical_contact: - $ref: '#/components/schemas/Contact' + $ref: "#/components/schemas/Contact" uid: type: string required: @@ -5025,7 +5064,7 @@ components: name: type: string role: - $ref: '#/components/schemas/Role' + $ref: "#/components/schemas/Role" required: - name - email @@ -5046,7 +5085,7 @@ components: timeout: type: integer transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" url: type: string format: uri @@ -5055,7 +5094,7 @@ components: type: object properties: filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -5067,7 +5106,7 @@ components: timeout: type: integer transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" webhook_signing_key: type: string additionalProperties: false @@ -5096,12 +5135,12 @@ components: type: object properties: fleet_uids: - $ref: '#/components/schemas/FleetsUIDList' + $ref: "#/components/schemas/FleetsUIDList" name: description: repository name type: string project_uids: - $ref: '#/components/schemas/AppUIDList' + $ref: "#/components/schemas/AppUIDList" uid: description: The unique identifier for the data repository type: string @@ -5119,7 +5158,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. @@ -5182,7 +5221,7 @@ components: file_format: type: string filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -5196,7 +5235,7 @@ components: timeout: type: integer transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" url: type: string format: uri @@ -5254,9 +5293,9 @@ 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' + $ref: "#/components/schemas/SatelliteDataUsage" nullable: true required: - ntn_provider @@ -5270,7 +5309,7 @@ components: description: Used if type is array type: array items: - $ref: '#/components/schemas/SchemaProperty' + $ref: "#/components/schemas/SchemaProperty" name: description: Name of the field (optional for array/object children) type: string @@ -5278,7 +5317,7 @@ components: description: Used if type is object type: array items: - $ref: '#/components/schemas/SchemaProperty' + $ref: "#/components/schemas/SchemaProperty" type: type: string enum: @@ -5328,7 +5367,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. @@ -5343,7 +5382,7 @@ components: channel: type: string filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -5355,7 +5394,7 @@ components: timeout: type: integer transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" webhook_url: type: string format: uri @@ -5370,7 +5409,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. @@ -5381,7 +5420,7 @@ components: account_name: type: string filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -5395,7 +5434,7 @@ components: timeout: type: integer transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" user_name: type: string additionalProperties: false @@ -5407,7 +5446,7 @@ components: database_name: type: string filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -5425,7 +5464,7 @@ components: timeout: type: integer transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" user_name: type: string additionalProperties: false @@ -5435,7 +5474,7 @@ components: app_key: type: string filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -5445,7 +5484,7 @@ components: timeout: type: integer transform: - $ref: '#/components/schemas/RouteTransformSettings' + $ref: "#/components/schemas/RouteTransformSettings" url: type: string format: uri @@ -5479,7 +5518,7 @@ components: mnc: description: Mobile Network Code type: integer - 'n': + "n": description: Name of the location type: string source: @@ -5507,7 +5546,7 @@ components: type: string format: password filter: - $ref: '#/components/schemas/Filter' + $ref: "#/components/schemas/Filter" fleets: type: array items: @@ -5533,7 +5572,7 @@ components: created: type: integer firmware: - $ref: '#/components/schemas/Firmware' + $ref: "#/components/schemas/Firmware" found: type: string length: @@ -5558,54 +5597,59 @@ components: UsageData: type: object properties: - billable_bytes_received: - description: Billable bytes received (only for packet-based protocols) - type: integer - format: int64 - billable_bytes_sent: - description: Billable bytes sent (only for packet-based protocols) - type: integer - format: int64 billable_bytes_total: description: Total billable bytes (only for packet-based protocols) type: integer format: int64 - bytes_received: + downlink_bytes: type: integer format: int64 example: 524288 - bytes_sent: + downlink_bytes_billable: + description: Billable downlink bytes (only for packet-based protocols) type: integer format: int64 - example: 524288 - packets_received: - description: Packets received (only for packet-based protocols) - type: integer - format: int64 - packets_sent: - description: Packets sent (only for packet-based protocols) + downlink_packets: + description: Downlink packets (only for packet-based protocols) type: integer format: int64 period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: "2025-07-23T00:00:00Z" total_bytes: type: integer format: int64 example: 1048576 + uplink_bytes: + type: integer + format: int64 + example: 524288 + uplink_bytes_billable: + description: Billable uplink bytes (only for packet-based protocols) + type: integer + format: int64 + uplink_packets: + description: Uplink packets (only for packet-based protocols) + type: integer + format: int64 required: - period - total_bytes UsageEventsData: type: object properties: + billable_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 @@ -5619,23 +5663,27 @@ 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." + type: integer + format: int32 total_devices: description: Total devices represented in this count 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 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 @@ -5651,7 +5699,9 @@ components: data: type: array items: - $ref: '#/components/schemas/UsageEventsData' + $ref: "#/components/schemas/UsageEventsData" + truncated: + $ref: "#/components/schemas/UsageTruncatedField" required: - data UsageRouteLogsData: @@ -5664,11 +5714,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 @@ -5687,14 +5737,14 @@ components: properties: 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" period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: "2025-07-23T00:00:00Z" sessions: type: integer format: int64 @@ -5712,6 +5762,10 @@ components: - sessions - 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" + type: boolean + properties: {} UserDfuStateMachine: type: object properties: @@ -5722,9 +5776,9 @@ components: from_version: type: string metadata: - $ref: '#/components/schemas/UploadMetadata' + $ref: "#/components/schemas/UploadMetadata" status: - $ref: '#/components/schemas/UserDfuStateMachineStatus' + $ref: "#/components/schemas/UserDfuStateMachineStatus" UserDfuStateMachineStatus: type: object properties: @@ -5742,9 +5796,9 @@ components: type: object properties: current_firmware: - $ref: '#/components/schemas/CurrentFirmware' + $ref: "#/components/schemas/CurrentFirmware" firmware_update: - $ref: '#/components/schemas/UserDfuStateMachine' + $ref: "#/components/schemas/UserDfuStateMachine" nullable: true WebhookSettings: type: object @@ -5770,7 +5824,7 @@ components: description: The list of alerts type: array items: - $ref: '#/components/schemas/Alert' + $ref: "#/components/schemas/Alert" has_more: description: True if there are more alerts type: boolean @@ -5787,7 +5841,7 @@ components: cellular_plans: type: array items: - $ref: '#/components/schemas/CellularPlan' + $ref: "#/components/schemas/CellularPlan" nullable: true DevicesResponse: description: List of Devices @@ -5799,7 +5853,7 @@ components: devices: type: array items: - $ref: '#/components/schemas/Device' + $ref: "#/components/schemas/Device" has_more: type: boolean required: @@ -5810,17 +5864,17 @@ components: content: application/json: schema: - type: '' + type: "" properties: {} - $ref: '#/components/schemas/EnvironmentVariables' + $ref: "#/components/schemas/EnvironmentVariables" ErrorResponse: description: The response body in case of an API error. content: application/json: schema: - type: '' + type: "" properties: {} - $ref: '#/components/schemas/Error' + $ref: "#/components/schemas/Error" EventsByCursorResponse: description: The response body from a GET events by cursor request. content: @@ -5831,7 +5885,7 @@ components: events: type: array items: - $ref: '#/components/schemas/Event' + $ref: "#/components/schemas/Event" has_more: description: True if there are more events type: boolean @@ -5845,7 +5899,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 @@ -5859,15 +5913,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 @@ -5878,7 +5932,7 @@ components: updates: 1 when: 1656010061 has_more: false - next_cursor: '' + next_cursor: "" EventsResponse: description: The response body from a GET events request. headers: @@ -5894,7 +5948,7 @@ components: events: type: array items: - $ref: '#/components/schemas/Event' + $ref: "#/components/schemas/Event" has_more: description: True if there are more events type: boolean @@ -5906,7 +5960,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 @@ -5920,15 +5974,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 @@ -5959,7 +6013,7 @@ components: fleets: type: array items: - $ref: '#/components/schemas/Fleet' + $ref: "#/components/schemas/Fleet" required: - fleets GetDeviceEnvironmentVariablesResponse: @@ -5975,7 +6029,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 @@ -5998,62 +6052,62 @@ components: description: The set of latest events. Will always include the current "session.begin" event. type: array items: - $ref: '#/components/schemas/Event' + $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 @@ -6067,7 +6121,7 @@ components: schema: type: array items: - $ref: '#/components/schemas/Monitor' + $ref: "#/components/schemas/Monitor" properties: {} required: - monitors @@ -6096,7 +6150,7 @@ components: sessions: type: array items: - $ref: '#/components/schemas/DeviceSession' + $ref: "#/components/schemas/DeviceSession" required: - sessions - has_more @@ -6106,17 +6160,17 @@ 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 hp_secs_total: 7659 - iccid: '89011704278500000000' + iccid: "89011704278500000000" ip: 10.68.56.193 moved: 1667250807 orientation: face-up @@ -6127,7 +6181,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 @@ -6146,7 +6200,7 @@ components: lon: -89.44239062499999 mcc: 310 mnc: 410 - 'n': Shorewood Hills WI + "n": Shorewood Hills WI time: 1667250835 towers: 1 zone: America/Chicago @@ -6169,26 +6223,26 @@ components: data: type: array items: - $ref: '#/components/schemas/UsageData' + $ref: "#/components/schemas/UsageData" 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 - example: '12345678901234567890' + example: "12345678901234567890" 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 @@ -6199,6 +6253,8 @@ components: - type - data type: object + truncated: + $ref: "#/components/schemas/UsageTruncatedField" UsageRouteLogsResponse: description: Response body for Route Log Usage content: @@ -6209,7 +6265,9 @@ components: route_logs: type: array items: - $ref: '#/components/schemas/UsageRouteLogsData' + $ref: "#/components/schemas/UsageRouteLogsData" + truncated: + $ref: "#/components/schemas/UsageTruncatedField" required: - route_logs UsageSessionsResponse: @@ -6222,9 +6280,12 @@ components: sessions: type: array items: - $ref: '#/components/schemas/UsageSessionsData' + $ref: "#/components/schemas/UsageSessionsData" + truncated: + $ref: "#/components/schemas/UsageTruncatedField" required: - sessions + - truncated securitySchemes: personalAccessToken: description: | @@ -6250,8 +6311,8 @@ 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 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 83a182e..f5c529e 100644 --- a/openapi_filtered.yaml +++ b/openapi_filtered.yaml @@ -1501,6 +1501,31 @@ paths: tags: - project /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}: + get: + operationId: DownloadFirmware + description: Download firmware binary + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/firmwareTypeParam' + - name: filename + in: path + required: true + schema: + type: string + responses: + '200': + description: Firmware binary + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project put: operationId: UploadFirmware description: Upload firmware binary @@ -2372,6 +2397,7 @@ paths: - $ref: '#/components/parameters/endDateParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/fleetUIDFilterQueryParam' + - $ref: '#/components/parameters/usageLimitQueryParam' - name: period in: query description: Period type for aggregation @@ -2413,6 +2439,7 @@ paths: - $ref: '#/components/parameters/endDateParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/fleetUIDFilterQueryParam' + - $ref: '#/components/parameters/usageLimitQueryParam' - name: period in: query description: Period type for aggregation @@ -2483,6 +2510,7 @@ paths: - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' - $ref: '#/components/parameters/routeUIDParamQuery' + - $ref: '#/components/parameters/usageLimitQueryParam' - name: period in: query description: Period type for aggregation @@ -2532,6 +2560,7 @@ paths: - $ref: '#/components/parameters/endDateParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/fleetUIDFilterQueryParam' + - $ref: '#/components/parameters/usageLimitQueryParam' - name: period in: query description: Period type for aggregation @@ -3289,6 +3318,16 @@ components: required: false schema: type: boolean + usageLimitQueryParam: + description: Limit the number of data points returned + in: query + name: limit + required: false + schema: + type: integer + default: 200000 + maximum: 400000 + minimum: 1 versionQueryParam: in: query name: version @@ -5632,32 +5671,20 @@ components: UsageData: type: object properties: - billable_bytes_received: - description: Billable bytes received (only for packet-based protocols) - type: integer - format: int64 - billable_bytes_sent: - description: Billable bytes sent (only for packet-based protocols) - type: integer - format: int64 billable_bytes_total: description: Total billable bytes (only for packet-based protocols) type: integer format: int64 - bytes_received: - type: integer - format: int64 - example: 524288 - bytes_sent: + downlink_bytes: type: integer format: int64 example: 524288 - packets_received: - description: Packets received (only for packet-based protocols) + downlink_bytes_billable: + description: Billable downlink bytes (only for packet-based protocols) type: integer format: int64 - packets_sent: - description: Packets sent (only for packet-based protocols) + downlink_packets: + description: Downlink packets (only for packet-based protocols) type: integer format: int64 period: @@ -5668,12 +5695,30 @@ components: type: integer format: int64 example: 1048576 + uplink_bytes: + type: integer + format: int64 + example: 524288 + uplink_bytes_billable: + description: Billable uplink bytes (only for packet-based protocols) + type: integer + format: int64 + uplink_packets: + description: Uplink packets (only for packet-based protocols) + type: integer + format: int64 required: - period - total_bytes UsageEventsData: type: object properties: + billable_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 @@ -5702,6 +5747,13 @@ components: 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. + type: integer + format: int32 total_devices: description: Total devices represented in this count type: integer @@ -5733,6 +5785,8 @@ components: type: array items: $ref: '#/components/schemas/UsageEventsData' + truncated: + $ref: '#/components/schemas/UsageTruncatedField' required: - data UsageRouteLogsData: @@ -5793,6 +5847,12 @@ components: - sessions - 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 + type: boolean + properties: {} UserDfuStateMachine: type: object properties: @@ -6298,6 +6358,8 @@ components: - type - data type: object + truncated: + $ref: '#/components/schemas/UsageTruncatedField' UsageRouteLogsResponse: description: Response body for Route Log Usage content: @@ -6309,6 +6371,8 @@ components: type: array items: $ref: '#/components/schemas/UsageRouteLogsData' + truncated: + $ref: '#/components/schemas/UsageTruncatedField' required: - route_logs UsageSessionsResponse: @@ -6322,8 +6386,11 @@ components: type: array items: $ref: '#/components/schemas/UsageSessionsData' + truncated: + $ref: '#/components/schemas/UsageTruncatedField' required: - sessions + - truncated securitySchemes: personalAccessToken: description: 'Use a personal access token from notehub.io/api-access diff --git a/src/README.md b/src/README.md index 5be1ae3..6d12a55 100644 --- a/src/README.md +++ b/src/README.md @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.2.0 -- Package version: 6.0.1 +- Package version: 6.0.2 - Generator version: 7.5.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://dev.blues.io/support/](https://dev.blues.io/support/) @@ -162,6 +162,7 @@ Class | Method | HTTP request | Description *ProjectApi* | [**delete_project**](docs/ProjectApi.md#delete_project) | **DELETE** /v1/projects/{projectOrProductUID} | *ProjectApi* | [**delete_project_environment_variable**](docs/ProjectApi.md#delete_project_environment_variable) | **DELETE** /v1/projects/{projectOrProductUID}/environment_variables/{key} | *ProjectApi* | [**disable_global_event_transformation**](docs/ProjectApi.md#disable_global_event_transformation) | **POST** /v1/projects/{projectOrProductUID}/global-transformation/disable | +*ProjectApi* | [**download_firmware**](docs/ProjectApi.md#download_firmware) | **GET** /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename} | *ProjectApi* | [**enable_global_event_transformation**](docs/ProjectApi.md#enable_global_event_transformation) | **POST** /v1/projects/{projectOrProductUID}/global-transformation/enable | *ProjectApi* | [**get_device_dfu_history**](docs/ProjectApi.md#get_device_dfu_history) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history | *ProjectApi* | [**get_device_dfu_status**](docs/ProjectApi.md#get_device_dfu_status) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status | diff --git a/src/docs/GetDataUsage200Response.md b/src/docs/GetDataUsage200Response.md index 429e3ba..245bf93 100644 --- a/src/docs/GetDataUsage200Response.md +++ b/src/docs/GetDataUsage200Response.md @@ -2,9 +2,10 @@ ## Properties -| Name | Type | Description | Notes | -| -------- | --------------------------------------------------------------------------------- | ----------- | ---------- | -| **data** | [**List[GetDataUsage200ResponseDataInner]**](GetDataUsage200ResponseDataInner.md) | | [optional] | +| Name | Type | Description | Notes | +| ------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ---------- | +| **data** | [**List[GetDataUsage200ResponseDataInner]**](GetDataUsage200ResponseDataInner.md) | | [optional] | +| **truncated** | **bool** | 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 | [optional] | ## Example diff --git a/src/docs/GetRouteLogsUsage200Response.md b/src/docs/GetRouteLogsUsage200Response.md index 0415e48..4796572 100644 --- a/src/docs/GetRouteLogsUsage200Response.md +++ b/src/docs/GetRouteLogsUsage200Response.md @@ -2,9 +2,10 @@ ## Properties -| Name | Type | Description | Notes | -| -------------- | ----------------------------------------------------- | ----------- | ----- | -| **route_logs** | [**List[UsageRouteLogsData]**](UsageRouteLogsData.md) | | +| Name | Type | Description | Notes | +| -------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ---------- | +| **route_logs** | [**List[UsageRouteLogsData]**](UsageRouteLogsData.md) | | +| **truncated** | **bool** | 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 | [optional] | ## Example diff --git a/src/docs/GetSessionsUsage200Response.md b/src/docs/GetSessionsUsage200Response.md index fae1552..8fc4632 100644 --- a/src/docs/GetSessionsUsage200Response.md +++ b/src/docs/GetSessionsUsage200Response.md @@ -2,9 +2,10 @@ ## Properties -| Name | Type | Description | Notes | -| ------------ | --------------------------------------------------- | ----------- | ----- | -| **sessions** | [**List[UsageSessionsData]**](UsageSessionsData.md) | | +| Name | Type | Description | Notes | +| ------------- | --------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| **sessions** | [**List[UsageSessionsData]**](UsageSessionsData.md) | | +| **truncated** | **bool** | 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 | ## Example diff --git a/src/docs/ProjectApi.md b/src/docs/ProjectApi.md index 304073c..0a55570 100644 --- a/src/docs/ProjectApi.md +++ b/src/docs/ProjectApi.md @@ -16,6 +16,7 @@ All URIs are relative to *https://api.notefile.net* | [**delete_project**](ProjectApi.md#delete_project) | **DELETE** /v1/projects/{projectOrProductUID} | | [**delete_project_environment_variable**](ProjectApi.md#delete_project_environment_variable) | **DELETE** /v1/projects/{projectOrProductUID}/environment_variables/{key} | | [**disable_global_event_transformation**](ProjectApi.md#disable_global_event_transformation) | **POST** /v1/projects/{projectOrProductUID}/global-transformation/disable | +| [**download_firmware**](ProjectApi.md#download_firmware) | **GET** /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename} | | [**enable_global_event_transformation**](ProjectApi.md#enable_global_event_transformation) | **POST** /v1/projects/{projectOrProductUID}/global-transformation/enable | | [**get_device_dfu_history**](ProjectApi.md#get_device_dfu_history) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history | | [**get_device_dfu_status**](ProjectApi.md#get_device_dfu_status) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status | @@ -948,6 +949,83 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **download_firmware** + +> bytearray download_firmware(project_or_product_uid, firmware_type, filename) + +Download firmware binary + +### Example + +- Bearer Authentication (personalAccessToken): + +```python +import notehub_py +from notehub_py.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.notefile.net +# See configuration.py for a list of all supported configuration parameters. +configuration = notehub_py.Configuration( + host = "https://api.notefile.net" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: personalAccessToken +configuration = notehub_py.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with notehub_py.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = notehub_py.ProjectApi(api_client) + project_or_product_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | + firmware_type = 'firmware_type_example' # str | + filename = 'filename_example' # str | + + try: + api_response = api_instance.download_firmware(project_or_product_uid, firmware_type, filename) + print("The response of ProjectApi->download_firmware:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectApi->download_firmware: %s\n" % e) +``` + +### Parameters + +| Name | Type | Description | Notes | +| -------------------------- | ------- | ----------- | ----- | +| **project_or_product_uid** | **str** | | +| **firmware_type** | **str** | | +| **filename** | **str** | | + +### Return type + +**bytearray** + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/octet-stream, application/json + +### HTTP response details + +| Status code | Description | Response headers | +| ----------- | ------------------------------------------ | ---------------- | +| **200** | Firmware binary | - | +| **0** | The response body in case of an API error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **enable_global_event_transformation** > enable_global_event_transformation(project_or_product_uid) diff --git a/src/docs/UsageApi.md b/src/docs/UsageApi.md index c83148b..c974a39 100644 --- a/src/docs/UsageApi.md +++ b/src/docs/UsageApi.md @@ -11,7 +11,7 @@ All URIs are relative to *https://api.notefile.net* # **get_data_usage** -> GetDataUsage200Response get_data_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, aggregate=aggregate) +> GetDataUsage200Response get_data_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, limit=limit, aggregate=aggregate) Get data usage in bytes for a project with time range and period aggregation @@ -51,10 +51,11 @@ with notehub_py.ApiClient(configuration) as api_client: end_date = 1657894210 # int | End date for filtering results, specified as a Unix timestamp (optional) device_uid = ['device_uid_example'] # List[str] | A Device UID. (optional) fleet_uid = ['fleet_uid_example'] # List[str] | Filter by Fleet UID (optional) + limit = 200000 # int | Limit the number of data points returned (optional) (default to 200000) aggregate = 'device' # str | Aggregation level for results (optional) (default to 'device') try: - api_response = api_instance.get_data_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, aggregate=aggregate) + api_response = api_instance.get_data_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, limit=limit, aggregate=aggregate) print("The response of UsageApi->get_data_usage:\n") pprint(api_response) except Exception as e: @@ -71,6 +72,7 @@ with notehub_py.ApiClient(configuration) as api_client: | **end_date** | **int** | End date for filtering results, specified as a Unix timestamp | [optional] | | **device_uid** | [**List[str]**](str.md) | A Device UID. | [optional] | | **fleet_uid** | [**List[str]**](str.md) | Filter by Fleet UID | [optional] | +| **limit** | **int** | Limit the number of data points returned | [optional] [default to 200000] | | **aggregate** | **str** | Aggregation level for results | [optional] [default to 'device'] | ### Return type @@ -97,7 +99,7 @@ with notehub_py.ApiClient(configuration) as api_client: # **get_events_usage** -> UsageEventsResponse get_events_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, aggregate=aggregate, notefile=notefile, skip_recent_data=skip_recent_data, include_notefiles=include_notefiles) +> UsageEventsResponse get_events_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, limit=limit, aggregate=aggregate, notefile=notefile, skip_recent_data=skip_recent_data, include_notefiles=include_notefiles) Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied @@ -137,13 +139,14 @@ with notehub_py.ApiClient(configuration) as api_client: end_date = 1657894210 # int | End date for filtering results, specified as a Unix timestamp (optional) device_uid = ['device_uid_example'] # List[str] | A Device UID. (optional) fleet_uid = ['fleet_uid_example'] # List[str] | Filter by Fleet UID (optional) + limit = 200000 # int | Limit the number of data points returned (optional) (default to 200000) aggregate = 'device' # str | Aggregation level for results (optional) (default to 'device') notefile = ['notefile_example'] # List[str] | Filter to specific notefiles (optional) skip_recent_data = False # bool | 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. (optional) (default to False) include_notefiles = False # bool | Include per-notefile event counts in the response (optional) (default to False) try: - api_response = api_instance.get_events_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, aggregate=aggregate, notefile=notefile, skip_recent_data=skip_recent_data, include_notefiles=include_notefiles) + api_response = api_instance.get_events_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, limit=limit, aggregate=aggregate, notefile=notefile, skip_recent_data=skip_recent_data, include_notefiles=include_notefiles) print("The response of UsageApi->get_events_usage:\n") pprint(api_response) except Exception as e: @@ -160,6 +163,7 @@ with notehub_py.ApiClient(configuration) as api_client: | **end_date** | **int** | End date for filtering results, specified as a Unix timestamp | [optional] | | **device_uid** | [**List[str]**](str.md) | A Device UID. | [optional] | | **fleet_uid** | [**List[str]**](str.md) | Filter by Fleet UID | [optional] | +| **limit** | **int** | Limit the number of data points returned | [optional] [default to 200000] | | **aggregate** | **str** | Aggregation level for results | [optional] [default to 'device'] | | **notefile** | [**List[str]**](str.md) | Filter to specific notefiles | [optional] | | **skip_recent_data** | **bool** | 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. | [optional] [default to False] | @@ -189,7 +193,7 @@ with notehub_py.ApiClient(configuration) as api_client: # **get_route_logs_usage** -> GetRouteLogsUsage200Response get_route_logs_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, route_uid=route_uid, aggregate=aggregate, skip_recent_data=skip_recent_data) +> GetRouteLogsUsage200Response get_route_logs_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, route_uid=route_uid, limit=limit, aggregate=aggregate, skip_recent_data=skip_recent_data) Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied @@ -228,11 +232,12 @@ with notehub_py.ApiClient(configuration) as api_client: start_date = 1628631763 # int | Start date for filtering results, specified as a Unix timestamp (optional) end_date = 1657894210 # int | End date for filtering results, specified as a Unix timestamp (optional) route_uid = ['route_uid_example'] # List[str] | A Route UID. (optional) + limit = 200000 # int | Limit the number of data points returned (optional) (default to 200000) aggregate = 'route' # str | Aggregation level for results (optional) (default to 'route') skip_recent_data = False # bool | 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. (optional) (default to False) try: - api_response = api_instance.get_route_logs_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, route_uid=route_uid, aggregate=aggregate, skip_recent_data=skip_recent_data) + api_response = api_instance.get_route_logs_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, route_uid=route_uid, limit=limit, aggregate=aggregate, skip_recent_data=skip_recent_data) print("The response of UsageApi->get_route_logs_usage:\n") pprint(api_response) except Exception as e: @@ -248,6 +253,7 @@ with notehub_py.ApiClient(configuration) as api_client: | **start_date** | **int** | Start date for filtering results, specified as a Unix timestamp | [optional] | | **end_date** | **int** | End date for filtering results, specified as a Unix timestamp | [optional] | | **route_uid** | [**List[str]**](str.md) | A Route UID. | [optional] | +| **limit** | **int** | Limit the number of data points returned | [optional] [default to 200000] | | **aggregate** | **str** | Aggregation level for results | [optional] [default to 'route'] | | **skip_recent_data** | **bool** | 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. | [optional] [default to False] | @@ -275,7 +281,7 @@ with notehub_py.ApiClient(configuration) as api_client: # **get_sessions_usage** -> GetSessionsUsage200Response get_sessions_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, aggregate=aggregate, skip_recent_data=skip_recent_data) +> GetSessionsUsage200Response get_sessions_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, limit=limit, aggregate=aggregate, skip_recent_data=skip_recent_data) Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied @@ -315,11 +321,12 @@ with notehub_py.ApiClient(configuration) as api_client: end_date = 1657894210 # int | End date for filtering results, specified as a Unix timestamp (optional) device_uid = ['device_uid_example'] # List[str] | A Device UID. (optional) fleet_uid = ['fleet_uid_example'] # List[str] | Filter by Fleet UID (optional) + limit = 200000 # int | Limit the number of data points returned (optional) (default to 200000) aggregate = 'device' # str | Aggregation level for results (optional) (default to 'device') skip_recent_data = False # bool | 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. (optional) (default to False) try: - api_response = api_instance.get_sessions_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, aggregate=aggregate, skip_recent_data=skip_recent_data) + api_response = api_instance.get_sessions_usage(project_or_product_uid, period, start_date=start_date, end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, limit=limit, aggregate=aggregate, skip_recent_data=skip_recent_data) print("The response of UsageApi->get_sessions_usage:\n") pprint(api_response) except Exception as e: @@ -336,6 +343,7 @@ with notehub_py.ApiClient(configuration) as api_client: | **end_date** | **int** | End date for filtering results, specified as a Unix timestamp | [optional] | | **device_uid** | [**List[str]**](str.md) | A Device UID. | [optional] | | **fleet_uid** | [**List[str]**](str.md) | Filter by Fleet UID | [optional] | +| **limit** | **int** | Limit the number of data points returned | [optional] [default to 200000] | | **aggregate** | **str** | Aggregation level for results | [optional] [default to 'device'] | | **skip_recent_data** | **bool** | 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. | [optional] [default to False] | diff --git a/src/docs/UsageData.md b/src/docs/UsageData.md index 35e3b95..abba8ce 100644 --- a/src/docs/UsageData.md +++ b/src/docs/UsageData.md @@ -4,15 +4,15 @@ | Name | Type | Description | Notes | | --------------------------- | ------------ | --------------------------------------------------------- | ---------- | -| **billable_bytes_received** | **int** | Billable bytes received (only for packet-based protocols) | [optional] | -| **billable_bytes_sent** | **int** | Billable bytes sent (only for packet-based protocols) | [optional] | | **billable_bytes_total** | **int** | Total billable bytes (only for packet-based protocols) | [optional] | -| **bytes_received** | **int** | | [optional] | -| **bytes_sent** | **int** | | [optional] | -| **packets_received** | **int** | Packets received (only for packet-based protocols) | [optional] | -| **packets_sent** | **int** | Packets sent (only for packet-based protocols) | [optional] | +| **downlink_bytes** | **int** | | [optional] | +| **downlink_bytes_billable** | **int** | Billable downlink bytes (only for packet-based protocols) | [optional] | +| **downlink_packets** | **int** | Downlink packets (only for packet-based protocols) | [optional] | | **period** | **datetime** | | | **total_bytes** | **int** | | +| **uplink_bytes** | **int** | | [optional] | +| **uplink_bytes_billable** | **int** | Billable uplink bytes (only for packet-based protocols) | [optional] | +| **uplink_packets** | **int** | Uplink packets (only for packet-based protocols) | [optional] | ## Example diff --git a/src/docs/UsageEventsData.md b/src/docs/UsageEventsData.md index 26c398e..f7f8e8a 100644 --- a/src/docs/UsageEventsData.md +++ b/src/docs/UsageEventsData.md @@ -2,16 +2,18 @@ ## Properties -| Name | Type | Description | Notes | -| ------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **device** | **str** | | [optional] | -| **fleet** | **str** | | [optional] | -| **notefiles** | **Dict[str, int]** | Count of events per notefile. Only present when includeNotefiles=true is specified. | [optional] | -| **period** | **datetime** | | -| **platform_events** | **int** | 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. | -| **total_devices** | **int** | Total devices represented in this count | -| **total_events** | **int** | Total events the device sent to notehub, including associated notehub generated events | -| **watchdog_events** | **int** | 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. | +| Name | Type | Description | Notes | +| ------------------------ | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | +| **billable_events** | **int** | Events that are billable, this include all events except platform events | [optional] | +| **device** | **str** | | [optional] | +| **fleet** | **str** | | [optional] | +| **notefiles** | **Dict[str, int]** | Count of events per notefile. Only present when includeNotefiles=true is specified. | [optional] | +| **period** | **datetime** | | +| **platform_events** | **int** | 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. | +| **total_days_in_period** | **int** | 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] | +| **total_devices** | **int** | Total devices represented in this count | +| **total_events** | **int** | Total events the device sent to notehub, including associated notehub generated events | +| **watchdog_events** | **int** | 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. | ## Example diff --git a/src/docs/UsageEventsResponse.md b/src/docs/UsageEventsResponse.md index d957068..b259666 100644 --- a/src/docs/UsageEventsResponse.md +++ b/src/docs/UsageEventsResponse.md @@ -2,9 +2,10 @@ ## Properties -| Name | Type | Description | Notes | -| -------- | ----------------------------------------------- | ----------- | ----- | -| **data** | [**List[UsageEventsData]**](UsageEventsData.md) | | +| Name | Type | Description | Notes | +| ------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ---------- | +| **data** | [**List[UsageEventsData]**](UsageEventsData.md) | | +| **truncated** | **bool** | 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 | [optional] | ## Example diff --git a/src/notehub_py/__init__.py b/src/notehub_py/__init__.py index c4c485e..aa4522d 100644 --- a/src/notehub_py/__init__.py +++ b/src/notehub_py/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "6.0.1" +__version__ = "6.0.2" # import apis into sdk package from notehub_py.api.alert_api import AlertApi diff --git a/src/notehub_py/api/project_api.py b/src/notehub_py/api/project_api.py index 19144b3..424116f 100644 --- a/src/notehub_py/api/project_api.py +++ b/src/notehub_py/api/project_api.py @@ -3239,6 +3239,275 @@ def _disable_global_event_transformation_serialize( _request_auth=_request_auth, ) + @validate_call + def download_firmware( + self, + project_or_product_uid: StrictStr, + firmware_type: StrictStr, + filename: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """download_firmware + + Download firmware binary + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param firmware_type: (required) + :type firmware_type: str + :param filename: (required) + :type filename: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._download_firmware_serialize( + project_or_product_uid=project_or_product_uid, + firmware_type=firmware_type, + filename=filename, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "bytearray", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def download_firmware_with_http_info( + self, + project_or_product_uid: StrictStr, + firmware_type: StrictStr, + filename: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """download_firmware + + Download firmware binary + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param firmware_type: (required) + :type firmware_type: str + :param filename: (required) + :type filename: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._download_firmware_serialize( + project_or_product_uid=project_or_product_uid, + firmware_type=firmware_type, + filename=filename, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "bytearray", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def download_firmware_without_preload_content( + self, + project_or_product_uid: StrictStr, + firmware_type: StrictStr, + filename: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """download_firmware + + Download firmware binary + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param firmware_type: (required) + :type firmware_type: str + :param filename: (required) + :type filename: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._download_firmware_serialize( + project_or_product_uid=project_or_product_uid, + firmware_type=firmware_type, + filename=filename, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "bytearray", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _download_firmware_serialize( + self, + project_or_product_uid, + firmware_type, + filename, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_or_product_uid is not None: + _path_params["projectOrProductUID"] = project_or_product_uid + if firmware_type is not None: + _path_params["firmwareType"] = firmware_type + if filename is not None: + _path_params["filename"] = filename + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/octet-stream", "application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call def enable_global_event_transformation( self, diff --git a/src/notehub_py/api/usage_api.py b/src/notehub_py/api/usage_api.py index 19c02ae..cd77f50 100644 --- a/src/notehub_py/api/usage_api.py +++ b/src/notehub_py/api/usage_api.py @@ -67,6 +67,10 @@ def get_data_usage( fleet_uid: Annotated[ Optional[List[StrictStr]], Field(description="Filter by Fleet UID") ] = None, + limit: Annotated[ + Optional[Annotated[int, Field(le=400000, strict=True, ge=1)]], + Field(description="Limit the number of data points returned"), + ] = None, aggregate: Annotated[ Optional[StrictStr], Field(description="Aggregation level for results") ] = None, @@ -98,6 +102,8 @@ def get_data_usage( :type device_uid: List[str] :param fleet_uid: Filter by Fleet UID :type fleet_uid: List[str] + :param limit: Limit the number of data points returned + :type limit: int :param aggregate: Aggregation level for results :type aggregate: str :param _request_timeout: timeout setting for this request. If one @@ -129,6 +135,7 @@ def get_data_usage( end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, + limit=limit, aggregate=aggregate, _request_auth=_request_auth, _content_type=_content_type, @@ -171,6 +178,10 @@ def get_data_usage_with_http_info( fleet_uid: Annotated[ Optional[List[StrictStr]], Field(description="Filter by Fleet UID") ] = None, + limit: Annotated[ + Optional[Annotated[int, Field(le=400000, strict=True, ge=1)]], + Field(description="Limit the number of data points returned"), + ] = None, aggregate: Annotated[ Optional[StrictStr], Field(description="Aggregation level for results") ] = None, @@ -202,6 +213,8 @@ def get_data_usage_with_http_info( :type device_uid: List[str] :param fleet_uid: Filter by Fleet UID :type fleet_uid: List[str] + :param limit: Limit the number of data points returned + :type limit: int :param aggregate: Aggregation level for results :type aggregate: str :param _request_timeout: timeout setting for this request. If one @@ -233,6 +246,7 @@ def get_data_usage_with_http_info( end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, + limit=limit, aggregate=aggregate, _request_auth=_request_auth, _content_type=_content_type, @@ -275,6 +289,10 @@ def get_data_usage_without_preload_content( fleet_uid: Annotated[ Optional[List[StrictStr]], Field(description="Filter by Fleet UID") ] = None, + limit: Annotated[ + Optional[Annotated[int, Field(le=400000, strict=True, ge=1)]], + Field(description="Limit the number of data points returned"), + ] = None, aggregate: Annotated[ Optional[StrictStr], Field(description="Aggregation level for results") ] = None, @@ -306,6 +324,8 @@ def get_data_usage_without_preload_content( :type device_uid: List[str] :param fleet_uid: Filter by Fleet UID :type fleet_uid: List[str] + :param limit: Limit the number of data points returned + :type limit: int :param aggregate: Aggregation level for results :type aggregate: str :param _request_timeout: timeout setting for this request. If one @@ -337,6 +357,7 @@ def get_data_usage_without_preload_content( end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, + limit=limit, aggregate=aggregate, _request_auth=_request_auth, _content_type=_content_type, @@ -360,6 +381,7 @@ def _get_data_usage_serialize( end_date, device_uid, fleet_uid, + limit, aggregate, _request_auth, _content_type, @@ -401,6 +423,10 @@ def _get_data_usage_serialize( _query_params.append(("fleetUID", fleet_uid)) + if limit is not None: + + _query_params.append(("limit", limit)) + if period is not None: _query_params.append(("period", period)) @@ -459,6 +485,10 @@ def get_events_usage( fleet_uid: Annotated[ Optional[List[StrictStr]], Field(description="Filter by Fleet UID") ] = None, + limit: Annotated[ + Optional[Annotated[int, Field(le=400000, strict=True, ge=1)]], + Field(description="Limit the number of data points returned"), + ] = None, aggregate: Annotated[ Optional[StrictStr], Field(description="Aggregation level for results") ] = None, @@ -503,6 +533,8 @@ def get_events_usage( :type device_uid: List[str] :param fleet_uid: Filter by Fleet UID :type fleet_uid: List[str] + :param limit: Limit the number of data points returned + :type limit: int :param aggregate: Aggregation level for results :type aggregate: str :param notefile: Filter to specific notefiles @@ -540,6 +572,7 @@ def get_events_usage( end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, + limit=limit, aggregate=aggregate, notefile=notefile, skip_recent_data=skip_recent_data, @@ -585,6 +618,10 @@ def get_events_usage_with_http_info( fleet_uid: Annotated[ Optional[List[StrictStr]], Field(description="Filter by Fleet UID") ] = None, + limit: Annotated[ + Optional[Annotated[int, Field(le=400000, strict=True, ge=1)]], + Field(description="Limit the number of data points returned"), + ] = None, aggregate: Annotated[ Optional[StrictStr], Field(description="Aggregation level for results") ] = None, @@ -629,6 +666,8 @@ def get_events_usage_with_http_info( :type device_uid: List[str] :param fleet_uid: Filter by Fleet UID :type fleet_uid: List[str] + :param limit: Limit the number of data points returned + :type limit: int :param aggregate: Aggregation level for results :type aggregate: str :param notefile: Filter to specific notefiles @@ -666,6 +705,7 @@ def get_events_usage_with_http_info( end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, + limit=limit, aggregate=aggregate, notefile=notefile, skip_recent_data=skip_recent_data, @@ -711,6 +751,10 @@ def get_events_usage_without_preload_content( fleet_uid: Annotated[ Optional[List[StrictStr]], Field(description="Filter by Fleet UID") ] = None, + limit: Annotated[ + Optional[Annotated[int, Field(le=400000, strict=True, ge=1)]], + Field(description="Limit the number of data points returned"), + ] = None, aggregate: Annotated[ Optional[StrictStr], Field(description="Aggregation level for results") ] = None, @@ -755,6 +799,8 @@ def get_events_usage_without_preload_content( :type device_uid: List[str] :param fleet_uid: Filter by Fleet UID :type fleet_uid: List[str] + :param limit: Limit the number of data points returned + :type limit: int :param aggregate: Aggregation level for results :type aggregate: str :param notefile: Filter to specific notefiles @@ -792,6 +838,7 @@ def get_events_usage_without_preload_content( end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, + limit=limit, aggregate=aggregate, notefile=notefile, skip_recent_data=skip_recent_data, @@ -818,6 +865,7 @@ def _get_events_usage_serialize( end_date, device_uid, fleet_uid, + limit, aggregate, notefile, skip_recent_data, @@ -863,6 +911,10 @@ def _get_events_usage_serialize( _query_params.append(("fleetUID", fleet_uid)) + if limit is not None: + + _query_params.append(("limit", limit)) + if period is not None: _query_params.append(("period", period)) @@ -930,6 +982,10 @@ def get_route_logs_usage( route_uid: Annotated[ Optional[List[StrictStr]], Field(description="A Route UID.") ] = None, + limit: Annotated[ + Optional[Annotated[int, Field(le=400000, strict=True, ge=1)]], + Field(description="Limit the number of data points returned"), + ] = None, aggregate: Annotated[ Optional[StrictStr], Field(description="Aggregation level for results") ] = None, @@ -965,6 +1021,8 @@ def get_route_logs_usage( :type end_date: int :param route_uid: A Route UID. :type route_uid: List[str] + :param limit: Limit the number of data points returned + :type limit: int :param aggregate: Aggregation level for results :type aggregate: str :param skip_recent_data: 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. @@ -997,6 +1055,7 @@ def get_route_logs_usage( start_date=start_date, end_date=end_date, route_uid=route_uid, + limit=limit, aggregate=aggregate, skip_recent_data=skip_recent_data, _request_auth=_request_auth, @@ -1037,6 +1096,10 @@ def get_route_logs_usage_with_http_info( route_uid: Annotated[ Optional[List[StrictStr]], Field(description="A Route UID.") ] = None, + limit: Annotated[ + Optional[Annotated[int, Field(le=400000, strict=True, ge=1)]], + Field(description="Limit the number of data points returned"), + ] = None, aggregate: Annotated[ Optional[StrictStr], Field(description="Aggregation level for results") ] = None, @@ -1072,6 +1135,8 @@ def get_route_logs_usage_with_http_info( :type end_date: int :param route_uid: A Route UID. :type route_uid: List[str] + :param limit: Limit the number of data points returned + :type limit: int :param aggregate: Aggregation level for results :type aggregate: str :param skip_recent_data: 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. @@ -1104,6 +1169,7 @@ def get_route_logs_usage_with_http_info( start_date=start_date, end_date=end_date, route_uid=route_uid, + limit=limit, aggregate=aggregate, skip_recent_data=skip_recent_data, _request_auth=_request_auth, @@ -1144,6 +1210,10 @@ def get_route_logs_usage_without_preload_content( route_uid: Annotated[ Optional[List[StrictStr]], Field(description="A Route UID.") ] = None, + limit: Annotated[ + Optional[Annotated[int, Field(le=400000, strict=True, ge=1)]], + Field(description="Limit the number of data points returned"), + ] = None, aggregate: Annotated[ Optional[StrictStr], Field(description="Aggregation level for results") ] = None, @@ -1179,6 +1249,8 @@ def get_route_logs_usage_without_preload_content( :type end_date: int :param route_uid: A Route UID. :type route_uid: List[str] + :param limit: Limit the number of data points returned + :type limit: int :param aggregate: Aggregation level for results :type aggregate: str :param skip_recent_data: 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. @@ -1211,6 +1283,7 @@ def get_route_logs_usage_without_preload_content( start_date=start_date, end_date=end_date, route_uid=route_uid, + limit=limit, aggregate=aggregate, skip_recent_data=skip_recent_data, _request_auth=_request_auth, @@ -1234,6 +1307,7 @@ def _get_route_logs_usage_serialize( start_date, end_date, route_uid, + limit, aggregate, skip_recent_data, _request_auth, @@ -1271,6 +1345,10 @@ def _get_route_logs_usage_serialize( _query_params.append(("routeUID", route_uid)) + if limit is not None: + + _query_params.append(("limit", limit)) + if period is not None: _query_params.append(("period", period)) @@ -1333,6 +1411,10 @@ def get_sessions_usage( fleet_uid: Annotated[ Optional[List[StrictStr]], Field(description="Filter by Fleet UID") ] = None, + limit: Annotated[ + Optional[Annotated[int, Field(le=400000, strict=True, ge=1)]], + Field(description="Limit the number of data points returned"), + ] = None, aggregate: Annotated[ Optional[StrictStr], Field(description="Aggregation level for results") ] = None, @@ -1370,6 +1452,8 @@ def get_sessions_usage( :type device_uid: List[str] :param fleet_uid: Filter by Fleet UID :type fleet_uid: List[str] + :param limit: Limit the number of data points returned + :type limit: int :param aggregate: Aggregation level for results :type aggregate: str :param skip_recent_data: 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. @@ -1403,6 +1487,7 @@ def get_sessions_usage( end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, + limit=limit, aggregate=aggregate, skip_recent_data=skip_recent_data, _request_auth=_request_auth, @@ -1446,6 +1531,10 @@ def get_sessions_usage_with_http_info( fleet_uid: Annotated[ Optional[List[StrictStr]], Field(description="Filter by Fleet UID") ] = None, + limit: Annotated[ + Optional[Annotated[int, Field(le=400000, strict=True, ge=1)]], + Field(description="Limit the number of data points returned"), + ] = None, aggregate: Annotated[ Optional[StrictStr], Field(description="Aggregation level for results") ] = None, @@ -1483,6 +1572,8 @@ def get_sessions_usage_with_http_info( :type device_uid: List[str] :param fleet_uid: Filter by Fleet UID :type fleet_uid: List[str] + :param limit: Limit the number of data points returned + :type limit: int :param aggregate: Aggregation level for results :type aggregate: str :param skip_recent_data: 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. @@ -1516,6 +1607,7 @@ def get_sessions_usage_with_http_info( end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, + limit=limit, aggregate=aggregate, skip_recent_data=skip_recent_data, _request_auth=_request_auth, @@ -1559,6 +1651,10 @@ def get_sessions_usage_without_preload_content( fleet_uid: Annotated[ Optional[List[StrictStr]], Field(description="Filter by Fleet UID") ] = None, + limit: Annotated[ + Optional[Annotated[int, Field(le=400000, strict=True, ge=1)]], + Field(description="Limit the number of data points returned"), + ] = None, aggregate: Annotated[ Optional[StrictStr], Field(description="Aggregation level for results") ] = None, @@ -1596,6 +1692,8 @@ def get_sessions_usage_without_preload_content( :type device_uid: List[str] :param fleet_uid: Filter by Fleet UID :type fleet_uid: List[str] + :param limit: Limit the number of data points returned + :type limit: int :param aggregate: Aggregation level for results :type aggregate: str :param skip_recent_data: 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. @@ -1629,6 +1727,7 @@ def get_sessions_usage_without_preload_content( end_date=end_date, device_uid=device_uid, fleet_uid=fleet_uid, + limit=limit, aggregate=aggregate, skip_recent_data=skip_recent_data, _request_auth=_request_auth, @@ -1653,6 +1752,7 @@ def _get_sessions_usage_serialize( end_date, device_uid, fleet_uid, + limit, aggregate, skip_recent_data, _request_auth, @@ -1695,6 +1795,10 @@ def _get_sessions_usage_serialize( _query_params.append(("fleetUID", fleet_uid)) + if limit is not None: + + _query_params.append(("limit", limit)) + if period is not None: _query_params.append(("period", period)) diff --git a/src/notehub_py/api_client.py b/src/notehub_py/api_client.py index 99a41b7..c3e90a8 100644 --- a/src/notehub_py/api_client.py +++ b/src/notehub_py/api_client.py @@ -86,7 +86,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/6.0.1/python" + self.user_agent = "OpenAPI-Generator/6.0.2/python" self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/src/notehub_py/configuration.py b/src/notehub_py/configuration.py index 9331975..ad14cf8 100644 --- a/src/notehub_py/configuration.py +++ b/src/notehub_py/configuration.py @@ -395,7 +395,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.2.0\n" - "SDK Package Version: 6.0.1".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 6.0.2".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self): diff --git a/src/notehub_py/models/get_data_usage200_response.py b/src/notehub_py/models/get_data_usage200_response.py index dd98ae6..3a2f694 100644 --- a/src/notehub_py/models/get_data_usage200_response.py +++ b/src/notehub_py/models/get_data_usage200_response.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional from notehub_py.models.get_data_usage200_response_data_inner import ( GetDataUsage200ResponseDataInner, @@ -33,7 +33,11 @@ class GetDataUsage200Response(BaseModel): """ # noqa: E501 data: Optional[List[GetDataUsage200ResponseDataInner]] = None - __properties: ClassVar[List[str]] = ["data"] + truncated: Optional[StrictBool] = Field( + default=None, + 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", + ) + __properties: ClassVar[List[str]] = ["data", "truncated"] model_config = ConfigDict( populate_by_name=True, @@ -99,7 +103,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: ] if obj.get("data") is not None else None - ) + ), + "truncated": obj.get("truncated"), } ) return _obj diff --git a/src/notehub_py/models/get_route_logs_usage200_response.py b/src/notehub_py/models/get_route_logs_usage200_response.py index 83a336e..5c86fee 100644 --- a/src/notehub_py/models/get_route_logs_usage200_response.py +++ b/src/notehub_py/models/get_route_logs_usage200_response.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional from notehub_py.models.usage_route_logs_data import UsageRouteLogsData from typing import Optional, Set from typing_extensions import Self @@ -31,7 +31,11 @@ class GetRouteLogsUsage200Response(BaseModel): """ # noqa: E501 route_logs: List[UsageRouteLogsData] - __properties: ClassVar[List[str]] = ["route_logs"] + truncated: Optional[StrictBool] = Field( + default=None, + 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", + ) + __properties: ClassVar[List[str]] = ["route_logs", "truncated"] model_config = ConfigDict( populate_by_name=True, @@ -94,7 +98,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: [UsageRouteLogsData.from_dict(_item) for _item in obj["route_logs"]] if obj.get("route_logs") is not None else None - ) + ), + "truncated": obj.get("truncated"), } ) return _obj diff --git a/src/notehub_py/models/get_sessions_usage200_response.py b/src/notehub_py/models/get_sessions_usage200_response.py index 023693c..9a01e67 100644 --- a/src/notehub_py/models/get_sessions_usage200_response.py +++ b/src/notehub_py/models/get_sessions_usage200_response.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List from notehub_py.models.usage_sessions_data import UsageSessionsData from typing import Optional, Set @@ -31,7 +31,10 @@ class GetSessionsUsage200Response(BaseModel): """ # noqa: E501 sessions: List[UsageSessionsData] - __properties: ClassVar[List[str]] = ["sessions"] + truncated: StrictBool = Field( + 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" + ) + __properties: ClassVar[List[str]] = ["sessions", "truncated"] model_config = ConfigDict( populate_by_name=True, @@ -94,7 +97,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: [UsageSessionsData.from_dict(_item) for _item in obj["sessions"]] if obj.get("sessions") is not None else None - ) + ), + "truncated": obj.get("truncated"), } ) return _obj diff --git a/src/notehub_py/models/usage_data.py b/src/notehub_py/models/usage_data.py index be1733b..0785817 100644 --- a/src/notehub_py/models/usage_data.py +++ b/src/notehub_py/models/usage_data.py @@ -30,38 +30,38 @@ class UsageData(BaseModel): UsageData """ # noqa: E501 - billable_bytes_received: Optional[StrictInt] = Field( - default=None, - description="Billable bytes received (only for packet-based protocols)", - ) - billable_bytes_sent: Optional[StrictInt] = Field( - default=None, - description="Billable bytes sent (only for packet-based protocols)", - ) billable_bytes_total: Optional[StrictInt] = Field( default=None, description="Total billable bytes (only for packet-based protocols)", ) - bytes_received: Optional[StrictInt] = None - bytes_sent: Optional[StrictInt] = None - packets_received: Optional[StrictInt] = Field( - default=None, description="Packets received (only for packet-based protocols)" + downlink_bytes: Optional[StrictInt] = None + downlink_bytes_billable: Optional[StrictInt] = Field( + default=None, + description="Billable downlink bytes (only for packet-based protocols)", ) - packets_sent: Optional[StrictInt] = Field( - default=None, description="Packets sent (only for packet-based protocols)" + downlink_packets: Optional[StrictInt] = Field( + default=None, description="Downlink packets (only for packet-based protocols)" ) period: datetime total_bytes: StrictInt + uplink_bytes: Optional[StrictInt] = None + uplink_bytes_billable: Optional[StrictInt] = Field( + default=None, + description="Billable uplink bytes (only for packet-based protocols)", + ) + uplink_packets: Optional[StrictInt] = Field( + default=None, description="Uplink packets (only for packet-based protocols)" + ) __properties: ClassVar[List[str]] = [ - "billable_bytes_received", - "billable_bytes_sent", "billable_bytes_total", - "bytes_received", - "bytes_sent", - "packets_received", - "packets_sent", + "downlink_bytes", + "downlink_bytes_billable", + "downlink_packets", "period", "total_bytes", + "uplink_bytes", + "uplink_bytes_billable", + "uplink_packets", ] model_config = ConfigDict( @@ -114,15 +114,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "billable_bytes_received": obj.get("billable_bytes_received"), - "billable_bytes_sent": obj.get("billable_bytes_sent"), "billable_bytes_total": obj.get("billable_bytes_total"), - "bytes_received": obj.get("bytes_received"), - "bytes_sent": obj.get("bytes_sent"), - "packets_received": obj.get("packets_received"), - "packets_sent": obj.get("packets_sent"), + "downlink_bytes": obj.get("downlink_bytes"), + "downlink_bytes_billable": obj.get("downlink_bytes_billable"), + "downlink_packets": obj.get("downlink_packets"), "period": obj.get("period"), "total_bytes": obj.get("total_bytes"), + "uplink_bytes": obj.get("uplink_bytes"), + "uplink_bytes_billable": obj.get("uplink_bytes_billable"), + "uplink_packets": obj.get("uplink_packets"), } ) return _obj diff --git a/src/notehub_py/models/usage_events_data.py b/src/notehub_py/models/usage_events_data.py index 9601b6a..73f5760 100644 --- a/src/notehub_py/models/usage_events_data.py +++ b/src/notehub_py/models/usage_events_data.py @@ -30,6 +30,10 @@ class UsageEventsData(BaseModel): UsageEventsData """ # noqa: E501 + billable_events: Optional[StrictInt] = Field( + default=None, + description="Events that are billable, this include all events except platform events", + ) device: Optional[StrictStr] = None fleet: Optional[StrictStr] = None notefiles: Optional[Dict[str, StrictInt]] = Field( @@ -40,6 +44,10 @@ class UsageEventsData(BaseModel): platform_events: StrictInt = Field( 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." ) + total_days_in_period: Optional[StrictInt] = Field( + default=None, + 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.", + ) total_devices: StrictInt = Field( description="Total devices represented in this count" ) @@ -50,11 +58,13 @@ class UsageEventsData(BaseModel): 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." ) __properties: ClassVar[List[str]] = [ + "billable_events", "device", "fleet", "notefiles", "period", "platform_events", + "total_days_in_period", "total_devices", "total_events", "watchdog_events", @@ -110,11 +120,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { + "billable_events": obj.get("billable_events"), "device": obj.get("device"), "fleet": obj.get("fleet"), "notefiles": obj.get("notefiles"), "period": obj.get("period"), "platform_events": obj.get("platform_events"), + "total_days_in_period": obj.get("total_days_in_period"), "total_devices": obj.get("total_devices"), "total_events": obj.get("total_events"), "watchdog_events": obj.get("watchdog_events"), diff --git a/src/notehub_py/models/usage_events_response.py b/src/notehub_py/models/usage_events_response.py index 3e9ffac..d263eaa 100644 --- a/src/notehub_py/models/usage_events_response.py +++ b/src/notehub_py/models/usage_events_response.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional from notehub_py.models.usage_events_data import UsageEventsData from typing import Optional, Set from typing_extensions import Self @@ -31,7 +31,11 @@ class UsageEventsResponse(BaseModel): """ # noqa: E501 data: List[UsageEventsData] - __properties: ClassVar[List[str]] = ["data"] + truncated: Optional[StrictBool] = Field( + default=None, + 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", + ) + __properties: ClassVar[List[str]] = ["data", "truncated"] model_config = ConfigDict( populate_by_name=True, @@ -94,7 +98,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: [UsageEventsData.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None - ) + ), + "truncated": obj.get("truncated"), } ) return _obj diff --git a/src/pyproject.toml b/src/pyproject.toml index 2246e90..f95c219 100644 --- a/src/pyproject.toml +++ b/src/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "notehub_py" -version = "6.0.1" +version = "6.0.2" description = "Notehub API" authors = ["Blues Engineering "] license = "MIT" diff --git a/src/setup.py b/src/setup.py index c8bbcc8..72711b1 100644 --- a/src/setup.py +++ b/src/setup.py @@ -25,7 +25,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "notehub-py" -VERSION = "6.0.1" +VERSION = "6.0.2" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 2.5.0",