From 21d80328d894c0a9a5c123f05a61e4594c4b55bb Mon Sep 17 00:00:00 2001 From: "blues-hub-automation[bot]" Date: Mon, 4 May 2026 16:06:23 +0000 Subject: [PATCH 01/12] feat: Update OpenAPI file replicated from Notehub commit f226c16 --- openapi.yaml | 510 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 508 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index aed060c..3f8b442 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -46,6 +46,8 @@ paths: description: Internal Server Error tags: - authorization + x-custom-attributes: + permission: create /oauth2/token: post: operationId: OAuth2ClientCredentials @@ -143,6 +145,8 @@ paths: - personalAccessToken: [] tags: - billing_account + x-custom-attributes: + permission: read '/v1/billing-accounts/{billingAccountUID}': get: operationId: GetBillingAccount @@ -191,6 +195,8 @@ paths: - personalAccessToken: [] tags: - billing_account + x-custom-attributes: + permission: read '/v1/billing-accounts/{billingAccountUID}/balance-history': get: operationId: GetBillingAccountBalanceHistory @@ -231,6 +237,8 @@ paths: - personalAccessToken: [] tags: - billing_account + x-custom-attributes: + permission: read '/v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin': get: operationId: GetDeviceEnvironmentVariablesByPin @@ -240,8 +248,12 @@ paths: $ref: '#/components/responses/GetDeviceEnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -261,8 +273,82 @@ paths: $ref: '#/components/responses/EnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: update + '/v1/products/{productUID}/devices/{deviceUID}/webhook-event': + post: + operationId: CreateLegacyWebhookEvent + description: 'Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload.' + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + requestBody: + description: 'A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload.' + required: true + content: + application/json: + example: + body: + key: value + file: data.qo + payload: SGVsbG8sIFdvcmxkIQ== + schema: + type: object + properties: + body: + description: Arbitrary JSON event body. + type: object + additionalProperties: true + file: + description: The notefile to which the event should be written. + type: string + payload: + description: Optional base64-encoded binary payload. + type: string + additionalProperties: true + responses: + '200': + description: Event created successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/devices/{deviceUID}/webhook-session': + put: + operationId: UpdateLegacyWebhookSession + description: Legacy endpoint for opening or updating a webhook session for the given device (provisioning the device if necessary). Used by external services that need to maintain a callable session against a device behind a webhook. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + requestBody: + description: Optional session metadata. + required: false + content: + application/json: + schema: + type: object + additionalProperties: true + responses: + '200': + description: Webhook session updated successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:notes' '/v1/products/{productUID}/ext-devices/{deviceUID}/event': post: operationId: CreateEventExtDevice @@ -286,6 +372,9 @@ paths: - personalAccessToken: [] tags: - external devices + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:notes' '/v1/products/{productUID}/ext-devices/{deviceUID}/session/close': post: operationId: ExtDeviceSessionClose @@ -309,6 +398,9 @@ paths: - personalAccessToken: [] tags: - external devices + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:notes' '/v1/products/{productUID}/ext-devices/{deviceUID}/session/open': post: operationId: ExtDeviceSessionOpen @@ -332,6 +424,9 @@ paths: - personalAccessToken: [] tags: - external devices + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:notes' '/v1/products/{productUID}/project': get: operationId: GetProjectByProduct @@ -356,6 +451,114 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event': + post: + operationId: CreateWebhookDeviceEventByProduct + description: 'Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook''s configured JSONata transform, if any, is applied before routing.' + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + requestBody: + description: The event body (arbitrary JSON) + required: true + content: + application/json: + schema: + type: object + additionalProperties: true + responses: + '200': + description: Event created successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/webhooks/{webhookUID}/event': + post: + operationId: CreateWebhookEventByProduct + description: 'Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook''s configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device.' + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' + requestBody: + description: The event body (arbitrary JSON) + required: true + content: + application/json: + schema: + type: object + additionalProperties: true + responses: + '200': + description: Event created successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/webhooks/{webhookUID}/settings': + get: + operationId: GetWebhookSettingsByProduct + description: 'Retrieves the configuration settings for the specified webhook, addressed by productUID.' + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' + responses: + '200': + description: Webhook settings retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookSettings' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:settings' + put: + operationId: UpdateWebhookSettingsByProduct + description: 'Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings.' + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' + requestBody: + required: true + content: + application/json: + example: + disabled: false + transform: '{"device":body.end_device_ids.dev_eui,"sn":body.end_device_ids.device_id,"body":body.uplink_message.decoded_payload,"details":body}' + schema: + $ref: '#/components/schemas/WebhookSettings' + responses: + '200': + description: Webhook settings updated successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:settings' /v1/projects: get: operationId: GetProjects @@ -378,6 +581,8 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read post: operationId: CreateProject description: Create a Project @@ -412,6 +617,8 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: create '/v1/projects/{projectOrProductUID}': delete: operationId: DeleteProject @@ -427,6 +634,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: GetProject description: Get a Project by ProjectUID @@ -445,6 +655,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/alerts': get: operationId: GetAlerts @@ -463,6 +676,9 @@ paths: - personalAccessToken: [] tags: - alert + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/aws-role-config': get: operationId: GetAWSRoleConfig @@ -485,6 +701,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/clone': post: operationId: CloneProject @@ -527,6 +746,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/devices': get: operationId: GetDevices @@ -553,6 +775,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}': delete: operationId: DeleteDevice @@ -566,6 +791,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:devices' get: operationId: GetDevice description: Get Device @@ -582,6 +810,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -606,6 +837,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status': get: operationId: GetDeviceDfuStatus @@ -627,6 +861,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable': post: operationId: DisableDevice @@ -643,6 +880,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable': post: operationId: EnableDevice @@ -659,6 +899,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy': get: operationId: GetDeviceEnvironmentHierarchy @@ -681,6 +924,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables': get: operationId: GetDeviceEnvironmentVariables @@ -694,6 +940,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -716,6 +965,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}': delete: operationId: DeleteDeviceEnvironmentVariable @@ -738,6 +990,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files': delete: operationId: DeleteNotefiles @@ -766,6 +1021,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:notefiles' get: operationId: ListNotefiles description: Lists .qi and .db files for the device @@ -799,6 +1057,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:notefiles' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets': delete: operationId: DeleteDeviceFromFleets @@ -828,6 +1089,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:devices' get: operationId: GetDeviceFleets description: Get Device Fleets @@ -840,6 +1104,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -871,6 +1138,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log': get: operationId: GetDeviceHealthLog @@ -923,6 +1193,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest': get: operationId: GetDeviceLatestEvents @@ -939,6 +1212,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}': post: operationId: CreateNotefile @@ -956,6 +1232,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:notefiles' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}': get: operationId: GetNotefile @@ -1005,6 +1284,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:notefiles' post: operationId: AddQiNote description: 'Adds a Note to a Notefile, creating the Notefile if it doesn''t yet exist.' @@ -1028,6 +1310,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:notes' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}': delete: operationId: DeleteNote @@ -1046,6 +1331,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:notes' get: operationId: GetDbNote description: Get a note from a .db or .qi notefile @@ -1089,6 +1377,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:notes' post: operationId: AddDbNote description: Add a Note to a .db notefile. if noteID is '-' then payload is ignored and empty notefile is created @@ -1113,6 +1404,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:notes' put: operationId: UpdateDbNote description: Update a note in a .db or .qi notefile @@ -1137,6 +1431,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:notes' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans': get: operationId: GetDevicePlans @@ -1150,6 +1447,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1196,6 +1496,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key': get: operationId: GetDevicePublicKey @@ -1224,6 +1527,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions': get: operationId: GetDeviceSessions @@ -1245,6 +1551,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal': post: operationId: SignalDevice @@ -1276,6 +1585,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/public-keys': get: operationId: GetDevicePublicKeys @@ -1312,6 +1624,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}': post: operationId: PerformDfuAction @@ -1345,6 +1660,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history': get: operationId: GetDevicesDfuHistory @@ -1378,6 +1696,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status': get: operationId: GetDevicesDfuStatus @@ -1411,6 +1732,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/environment_hierarchy': get: operationId: GetProjectEnvironmentHierarchy @@ -1432,6 +1756,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/environment_variables': get: operationId: GetProjectEnvironmentVariables @@ -1445,6 +1772,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' put: @@ -1464,6 +1794,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/environment_variables/{key}': delete: operationId: DeleteProjectEnvironmentVariable @@ -1485,6 +1818,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/events': get: operationId: GetEvents @@ -1532,6 +1868,9 @@ paths: - personalAccessToken: [] tags: - event + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/events-cursor': get: operationId: GetEventsByCursor @@ -1554,6 +1893,9 @@ paths: - personalAccessToken: [] tags: - event + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs': get: operationId: GetRouteLogsByEvent @@ -1576,6 +1918,9 @@ paths: - personalAccessToken: [] tags: - event + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/firmware': get: operationId: GetFirmwareInfo @@ -1606,6 +1951,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}': delete: operationId: DeleteFirmware @@ -1634,6 +1982,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: DownloadFirmware description: Download firmware binary @@ -1659,6 +2010,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' post: operationId: UpdateFirmware description: | @@ -1697,6 +2051,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:settings' put: operationId: UploadFirmware description: Upload firmware binary @@ -1741,6 +2098,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/fleets': get: operationId: GetFleets @@ -1754,6 +2114,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:fleets' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -1789,6 +2152,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:fleets' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}': delete: operationId: DeleteFleet @@ -1802,6 +2168,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:fleets' get: operationId: GetFleet description: Get Fleet @@ -1816,6 +2185,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:fleets' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -1866,6 +2238,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:fleets' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices': get: operationId: GetFleetDevices @@ -1892,6 +2267,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy': get: operationId: GetFleetEnvironmentHierarchy @@ -1914,6 +2292,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:fleets' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables': get: operationId: GetFleetEnvironmentVariables @@ -1927,6 +2308,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:fleets' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -1949,6 +2333,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:fleets' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}': delete: operationId: DeleteFleetEnvironmentVariable @@ -1971,6 +2358,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:fleets' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events': get: operationId: GetFleetEvents @@ -2018,6 +2408,9 @@ paths: - personalAccessToken: [] tags: - event + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor': get: operationId: GetFleetEventsByCursor @@ -2042,6 +2435,9 @@ paths: - personalAccessToken: [] tags: - event + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/global-transformation': post: operationId: SetGlobalEventTransformation @@ -2052,9 +2448,9 @@ paths: description: JSONata expression which will be applied to each event before it is persisted and routed required: true content: - application/json: + text/plain: schema: - $ref: '#/components/schemas/JSONata' + type: string responses: '200': description: Successful operation @@ -2064,6 +2460,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/global-transformation/disable': post: operationId: DisableGlobalEventTransformation @@ -2079,6 +2478,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/global-transformation/enable': post: operationId: EnableGlobalEventTransformation @@ -2094,6 +2496,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/jobs': get: operationId: GetJobs @@ -2109,6 +2514,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' post: operationId: CreateJob description: Create a new batch job with an optional name @@ -2139,6 +2547,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/jobs/{jobUID}': delete: operationId: DeleteJob @@ -2157,6 +2568,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: GetJob description: Get a specific batch job definition @@ -2174,6 +2588,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/jobs/{jobUID}/run': post: operationId: RunJob @@ -2199,6 +2616,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs': get: operationId: GetJobRuns @@ -2230,6 +2650,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}': get: operationId: GetJobRun @@ -2248,6 +2671,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel': post: operationId: CancelJobRun @@ -2266,6 +2692,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/members': get: operationId: GetProjectMembers @@ -2290,6 +2719,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:accounts' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' '/v1/projects/{projectOrProductUID}/monitors': @@ -2307,6 +2739,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' post: operationId: CreateMonitor description: Create a new Monitor @@ -2332,6 +2767,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/monitors/{monitorUID}': delete: operationId: DeleteMonitor @@ -2352,6 +2790,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:devices' get: operationId: GetMonitor description: Get Monitor @@ -2371,6 +2812,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' put: operationId: UpdateMonitor description: Update Monitor @@ -2397,6 +2841,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/products': get: operationId: GetProducts @@ -2419,6 +2866,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:products' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -2461,6 +2911,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/products/{productUID}': delete: operationId: DeleteProduct @@ -2474,6 +2927,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:settings' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/productUIDParam' @@ -2530,6 +2986,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:routes' post: operationId: CreateRoute description: Create Route within a Project @@ -2589,6 +3048,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: create + resource: 'blues:resources:app:APPSERIAL:routes' '/v1/projects/{projectOrProductUID}/routes/{routeUID}': delete: operationId: DeleteRoute @@ -2605,6 +3067,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: delete + resource: 'blues:resources:app:APPSERIAL:routes' get: operationId: GetRoute description: Get single route within a project @@ -2642,6 +3107,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:routes' put: operationId: UpdateRoute description: Update route by UID @@ -2702,6 +3170,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:routes' '/v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs': get: operationId: GetRouteLogsByRoute @@ -2736,6 +3207,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:routes' '/v1/projects/{projectOrProductUID}/schemas': get: operationId: GetNotefileSchemas @@ -2751,8 +3225,13 @@ paths: type: array items: $ref: '#/components/schemas/NotefileSchema' + security: + - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/usage/data': get: operationId: GetDataUsage @@ -2794,6 +3273,9 @@ paths: - personalAccessToken: [] tags: - usage + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/usage/events': get: operationId: GetEventsUsage @@ -2863,6 +3345,9 @@ paths: - personalAccessToken: [] tags: - usage + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/usage/route-logs': get: operationId: GetRouteLogsUsage @@ -2909,6 +3394,9 @@ paths: - personalAccessToken: [] tags: - usage + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/usage/sessions': get: operationId: GetSessionsUsage @@ -2957,6 +3445,9 @@ paths: - personalAccessToken: [] tags: - usage + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/webhooks': get: operationId: GetWebhooks @@ -2981,6 +3472,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}': delete: operationId: DeleteWebhook @@ -2997,6 +3491,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: GetWebhook description: Retrieves the configuration settings for the specified webhook @@ -3016,6 +3513,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:settings' post: operationId: CreateWebhook description: Creates a webhook for the specified product with the given name. The name | must be unique within the project. @@ -3042,6 +3542,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:settings' put: operationId: UpdateWebhook description: Updates the configuration settings for the specified webhook. | Webhook will be created if it does not exist. Update body will completely replace the existing settings. @@ -3066,6 +3569,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: 'blues:resources:app:APPSERIAL:settings' components: parameters: billingAccountUIDParam: From 6b400670baf3d3722ac18664dd8f53f458d9f798 Mon Sep 17 00:00:00 2001 From: "blues-hub-automation[bot]" Date: Wed, 6 May 2026 21:32:42 +0000 Subject: [PATCH 02/12] feat: Update OpenAPI file replicated from Notehub commit 944e5c4 --- openapi.yaml | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 3f8b442..0df2233 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1196,6 +1196,125 @@ paths: x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys': + get: + operationId: GetDeviceJourneys + description: | + Get the list of journeys for a device, derived from `_track.qo` events. Returns journey metadata only (no event payloads). Capped at 100 most recent journeys; `has_more` is true when the cap is hit. + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/startDateParam' + - $ref: '#/components/parameters/endDateParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + has_more: + type: boolean + journeys: + type: array + items: + properties: + end_date: + description: Latest event time within the journey. + type: string + format: date-time + journey_id: + description: | + Identifier of the journey, taken from the `journey` field on `_track.qo` events. This value is itself a Unix timestamp marking the start of the journey. + type: integer + format: int64 + start_date: + description: Earliest event time within the journey. + type: string + format: date-time + required: + - journey_id + - start_date + - end_date + type: object + required: + - journeys + - has_more + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys/{journeyID}': + get: + operationId: GetDeviceJourney + description: | + Get a single journey for a device along with its `_track.qo` events. The events array is paginated via `pageSize` / `pageNum`; use `journey.has_more` to detect additional pages. + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - name: journeyID + in: path + description: | + Identifier of the journey, taken from the `journey` field on `_track.qo` events (a Unix timestamp marking the start of the journey). + required: true + schema: + type: integer + format: int64 + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + end_date: + description: Latest event time within the journey. + type: string + format: date-time + journey: + description: Paginated `_track.qo` events for the journey. + type: object + properties: + events: + type: array + items: + $ref: '#/components/schemas/Event' + has_more: + type: boolean + required: + - events + - has_more + journey_id: + description: Identifier of the journey. + type: integer + format: int64 + start_date: + description: Earliest event time within the journey. + type: string + format: date-time + required: + - journey_id + - start_date + - end_date + - journey + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - device + x-custom-attributes: + permission: read + resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest': get: operationId: GetDeviceLatestEvents From b393fbb43c014994b6a35013ecf0f2cbe59fc905 Mon Sep 17 00:00:00 2001 From: "blues-hub-automation[bot]" Date: Thu, 7 May 2026 19:40:50 +0000 Subject: [PATCH 03/12] feat: Update OpenAPI file replicated from Notehub commit a245776 --- openapi.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 0df2233..76644b4 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5850,6 +5850,16 @@ components: type: integer uid: type: string + usage_scope: + description: 'For usage monitors: the scope of aggregation. Supported values are "device" and "fleet".' + type: string + usage_type: + description: 'For usage monitors: the type of data usage to monitor. Supported values are "cellular" and "satellite".' + type: string + usage_window: + description: 'For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days).' + type: integer + format: int32 MqttRoute: type: object properties: From abbf00a6b327ce9a9ac261005878522b348ce981 Mon Sep 17 00:00:00 2001 From: "blues-hub-automation[bot]" Date: Fri, 8 May 2026 19:44:22 +0000 Subject: [PATCH 04/12] feat: Update OpenAPI file replicated from Notehub commit 1923a44 --- openapi.yaml | 725 ++++++++++++++++++++++++++++----------------------- 1 file changed, 393 insertions(+), 332 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 76644b4..7f1d82f 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: @@ -147,7 +147,7 @@ paths: - billing_account x-custom-attributes: permission: read - '/v1/billing-accounts/{billingAccountUID}': + /v1/billing-accounts/{billingAccountUID}: get: operationId: GetBillingAccount description: Get Billing Account Information @@ -197,7 +197,7 @@ paths: - billing_account x-custom-attributes: permission: read - '/v1/billing-accounts/{billingAccountUID}/balance-history': + /v1/billing-accounts/{billingAccountUID}/balance-history: get: operationId: GetBillingAccountBalanceHistory description: Get Billing Account Balance history @@ -239,7 +239,7 @@ paths: - billing_account x-custom-attributes: permission: read - '/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 @@ -279,15 +279,15 @@ paths: - device x-custom-attributes: permission: update - '/v1/products/{productUID}/devices/{deviceUID}/webhook-event': + /v1/products/{productUID}/devices/{deviceUID}/webhook-event: post: operationId: CreateLegacyWebhookEvent - description: 'Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload.' + description: Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload. parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/deviceUIDParam' requestBody: - description: 'A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload.' + description: A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload. required: true content: application/json: @@ -321,8 +321,8 @@ paths: - webhook x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/devices/{deviceUID}/webhook-session': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/devices/{deviceUID}/webhook-session: put: operationId: UpdateLegacyWebhookSession description: Legacy endpoint for opening or updating a webhook session for the given device (provisioning the device if necessary). Used by external services that need to maintain a callable session against a device behind a webhook. @@ -348,8 +348,8 @@ paths: - webhook x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/ext-devices/{deviceUID}/event': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/ext-devices/{deviceUID}/event: post: operationId: CreateEventExtDevice description: Creates an event using specified webhook @@ -374,8 +374,8 @@ paths: - external devices x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/ext-devices/{deviceUID}/session/close': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/ext-devices/{deviceUID}/session/close: post: operationId: ExtDeviceSessionClose description: Closes the session for the specified device if open @@ -400,8 +400,8 @@ paths: - external devices x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/ext-devices/{deviceUID}/session/open': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/ext-devices/{deviceUID}/session/open: post: operationId: ExtDeviceSessionOpen description: Create a Session for the specified device. | If a session is currently open it will be closed and a new one opened. @@ -426,8 +426,8 @@ paths: - external devices x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/project': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/project: get: operationId: GetProjectByProduct description: Get a Project by ProductUID @@ -453,11 +453,11 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event': + resource: blues:resources:app:APPSERIAL:settings + /v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event: post: operationId: CreateWebhookDeviceEventByProduct - description: 'Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook''s configured JSONata transform, if any, is applied before routing.' + description: Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -481,11 +481,11 @@ paths: - webhook x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/webhooks/{webhookUID}/event': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/webhooks/{webhookUID}/event: post: operationId: CreateWebhookEventByProduct - description: 'Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook''s configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device.' + description: Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device. parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -508,11 +508,11 @@ paths: - webhook x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/webhooks/{webhookUID}/settings': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/webhooks/{webhookUID}/settings: get: operationId: GetWebhookSettingsByProduct - description: 'Retrieves the configuration settings for the specified webhook, addressed by productUID.' + description: Retrieves the configuration settings for the specified webhook, addressed by productUID. parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -531,10 +531,10 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings put: operationId: UpdateWebhookSettingsByProduct - description: 'Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings.' + description: Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings. parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -558,7 +558,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings /v1/projects: get: operationId: GetProjects @@ -619,7 +619,7 @@ paths: - project x-custom-attributes: permission: create - '/v1/projects/{projectOrProductUID}': + /v1/projects/{projectOrProductUID}: delete: operationId: DeleteProject description: Delete a Project by ProjectUID @@ -636,7 +636,7 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings get: operationId: GetProject description: Get a Project by ProjectUID @@ -657,8 +657,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/alerts': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/alerts: get: operationId: GetAlerts description: Get list of defined Alerts @@ -678,8 +678,8 @@ paths: - alert x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/aws-role-config': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/aws-role-config: get: operationId: GetAWSRoleConfig summary: Get AWS role configuration for role-based authentication @@ -703,8 +703,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/clone': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/clone: post: operationId: CloneProject description: Clone a Project @@ -719,7 +719,7 @@ paths: type: object properties: billing_account_uid: - description: 'The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned.' + description: The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned. type: string disable_clone_fleets: description: Whether to disallow the cloning of the fleets from the parent project. Default is false if not specified. @@ -748,8 +748,8 @@ paths: - project x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/devices': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/devices: get: operationId: GetDevices description: Get Devices of a Project @@ -777,8 +777,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}: delete: operationId: DeleteDevice description: Delete Device @@ -793,7 +793,7 @@ paths: - device x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices get: operationId: GetDevice description: Get Device @@ -812,11 +812,11 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history': + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history: get: operationId: GetDeviceDfuHistory description: Get device DFU history for host or Notecard firmware @@ -839,8 +839,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status: get: operationId: GetDeviceDfuStatus description: Get device DFU history for host or Notecard firmware @@ -863,8 +863,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable: post: operationId: DisableDevice description: Disable Device @@ -882,8 +882,8 @@ paths: - device x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable: post: operationId: EnableDevice description: Enable Device @@ -901,8 +901,8 @@ paths: - device x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy: get: operationId: GetDeviceEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -926,8 +926,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables: get: operationId: GetDeviceEnvironmentVariables description: Get environment variables of a device @@ -942,7 +942,7 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -967,8 +967,8 @@ paths: - device x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}: delete: operationId: DeleteDeviceEnvironmentVariable description: Delete environment variable of a device @@ -992,8 +992,8 @@ paths: - device x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files: delete: operationId: DeleteNotefiles description: Deletes Notefiles and the Notes they contain. @@ -1023,7 +1023,7 @@ paths: - device x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:notefiles' + resource: blues:resources:app:APPSERIAL:notefiles get: operationId: ListNotefiles description: Lists .qi and .db files for the device @@ -1059,8 +1059,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:notefiles' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets': + resource: blues:resources:app:APPSERIAL:notefiles + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets: delete: operationId: DeleteDeviceFromFleets description: Remove Device from Fleets @@ -1091,7 +1091,7 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices get: operationId: GetDeviceFleets description: Get Device Fleets @@ -1106,7 +1106,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1140,8 +1140,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log: get: operationId: GetDeviceHealthLog description: Get Device Health Log @@ -1333,8 +1333,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}: post: operationId: CreateNotefile description: Creates an empty Notefile on the device. @@ -1353,11 +1353,11 @@ paths: - device x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notefiles' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}': + resource: blues:resources:app:APPSERIAL:notefiles + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}: get: operationId: GetNotefile - description: 'For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile' + description: For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1405,10 +1405,10 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:notefiles' + resource: blues:resources:app:APPSERIAL:notefiles post: operationId: AddQiNote - description: 'Adds a Note to a Notefile, creating the Notefile if it doesn''t yet exist.' + description: Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist. parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1431,8 +1431,8 @@ paths: - device x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}': + resource: blues:resources:app:APPSERIAL:notes + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}: delete: operationId: DeleteNote description: Delete a note from a .db or .qi notefile @@ -1452,7 +1452,7 @@ paths: - device x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:notes' + resource: blues:resources:app:APPSERIAL:notes get: operationId: GetDbNote description: Get a note from a .db or .qi notefile @@ -1498,7 +1498,7 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:notes' + resource: blues:resources:app:APPSERIAL:notes post: operationId: AddDbNote description: Add a Note to a .db notefile. if noteID is '-' then payload is ignored and empty notefile is created @@ -1525,7 +1525,7 @@ paths: - device x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' + resource: blues:resources:app:APPSERIAL:notes put: operationId: UpdateDbNote description: Update a note in a .db or .qi notefile @@ -1552,11 +1552,11 @@ paths: - device x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans': + resource: blues:resources:app:APPSERIAL:notes + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans: get: operationId: GetDevicePlans - description: 'Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections.' + description: Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections. responses: '200': $ref: '#/components/responses/DevicePlansResponse' @@ -1568,11 +1568,11 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision': + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision: post: operationId: ProvisionDevice description: Provision Device for a Project @@ -1617,8 +1617,8 @@ paths: - device x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key: get: operationId: GetDevicePublicKey description: Get Device Public Key @@ -1648,8 +1648,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions: get: operationId: GetDeviceSessions description: Get Device Sessions @@ -1672,8 +1672,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal: post: operationId: SignalDevice description: Send a signal from Notehub to a Notecard. @@ -1706,8 +1706,8 @@ paths: - device x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/public-keys': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/public-keys: get: operationId: GetDevicePublicKeys description: Get Device Public Keys of a Project @@ -1745,8 +1745,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}: post: operationId: PerformDfuAction description: Update/cancel host or notecard firmware updates @@ -1781,8 +1781,8 @@ paths: - project x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history: get: operationId: GetDevicesDfuHistory description: Get host or Notecard DFU history for all devices that match the filter criteria @@ -1817,8 +1817,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status: get: operationId: GetDevicesDfuStatus description: Get host or Notecard DFU history for all devices that match the filter criteria @@ -1853,8 +1853,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/environment_hierarchy': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/environment_hierarchy: get: operationId: GetProjectEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -1877,8 +1877,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/environment_variables': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/environment_variables: get: operationId: GetProjectEnvironmentVariables description: Get environment variables of a project @@ -1893,7 +1893,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' put: @@ -1915,8 +1915,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/environment_variables/{key}': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/environment_variables/{key}: delete: operationId: DeleteProjectEnvironmentVariable description: Delete an environment variable of a project by key @@ -1939,8 +1939,8 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/events': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/events: get: operationId: GetEvents description: Get Events of a Project @@ -1989,8 +1989,8 @@ paths: - event x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/events-cursor': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/events-cursor: get: operationId: GetEventsByCursor description: Get Events of a Project by cursor @@ -2014,8 +2014,8 @@ paths: - event x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs: get: operationId: GetRouteLogsByEvent description: Get Route Logs by Event UID @@ -2039,8 +2039,8 @@ paths: - event x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/firmware': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/firmware: get: operationId: GetFirmwareInfo description: Get Available Firmware Information @@ -2072,8 +2072,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}: delete: operationId: DeleteFirmware description: | @@ -2103,7 +2103,7 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings get: operationId: DownloadFirmware description: Download firmware binary @@ -2131,7 +2131,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings post: operationId: UpdateFirmware description: | @@ -2172,7 +2172,7 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings put: operationId: UploadFirmware description: Upload firmware binary @@ -2186,7 +2186,7 @@ paths: type: string - name: version in: query - description: 'Firmware version (optional). If not provided, the version will be extracted from firmware binary if available, otherwise left empty' + description: Firmware version (optional). If not provided, the version will be extracted from firmware binary if available, otherwise left empty required: false schema: type: string @@ -2219,8 +2219,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/fleets': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/fleets: get: operationId: GetFleets description: Get Project Fleets @@ -2235,7 +2235,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:fleets' + resource: blues:resources:app:APPSERIAL:fleets parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -2252,7 +2252,7 @@ paths: connectivity_assurance: $ref: '#/components/schemas/FleetConnectivityAssurance' label: - description: 'The label, or name, for the Fleet.' + description: The label, or name, for the Fleet. type: string smart_rule: $ref: '#/components/schemas/FleetRule' @@ -2273,8 +2273,8 @@ paths: - project x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:fleets' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}': + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}: delete: operationId: DeleteFleet description: Delete Fleet @@ -2289,7 +2289,7 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:fleets' + resource: blues:resources:app:APPSERIAL:fleets get: operationId: GetFleet description: Get Fleet @@ -2306,7 +2306,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:fleets' + resource: blues:resources:app:APPSERIAL:fleets parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -2359,8 +2359,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:fleets' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices': + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices: get: operationId: GetFleetDevices description: Get Devices of a Fleet within a Project @@ -2388,8 +2388,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy: get: operationId: GetFleetEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -2413,8 +2413,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:fleets' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables': + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables: get: operationId: GetFleetEnvironmentVariables description: Get environment variables of a fleet @@ -2429,7 +2429,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:fleets' + resource: blues:resources:app:APPSERIAL:fleets parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -2454,8 +2454,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:fleets' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}': + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}: delete: operationId: DeleteFleetEnvironmentVariable description: Delete environment variables of a fleet @@ -2479,8 +2479,8 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:fleets' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events': + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events: get: operationId: GetFleetEvents description: Get Events of a Fleet @@ -2529,8 +2529,8 @@ paths: - event x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor: get: operationId: GetFleetEventsByCursor description: Get Events of a Fleet by cursor @@ -2556,8 +2556,8 @@ paths: - event x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/global-transformation': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/global-transformation: post: operationId: SetGlobalEventTransformation description: Set the project-level event JSONata transformation @@ -2581,8 +2581,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/global-transformation/disable': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/global-transformation/disable: post: operationId: DisableGlobalEventTransformation description: Disable the project-level event JSONata transformation @@ -2599,8 +2599,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/global-transformation/enable': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/global-transformation/enable: post: operationId: EnableGlobalEventTransformation description: Enable the project-level event JSONata transformation @@ -2617,8 +2617,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/jobs': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs: get: operationId: GetJobs description: List all batch jobs for a project @@ -2635,7 +2635,7 @@ paths: - jobs x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings post: operationId: CreateJob description: Create a new batch job with an optional name @@ -2668,8 +2668,8 @@ paths: - jobs x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/jobs/{jobUID}': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/{jobUID}: delete: operationId: DeleteJob description: Delete a batch job @@ -2689,7 +2689,7 @@ paths: - jobs x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings get: operationId: GetJob description: Get a specific batch job definition @@ -2709,8 +2709,8 @@ paths: - jobs x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/jobs/{jobUID}/run': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/{jobUID}/run: post: operationId: RunJob description: Execute a batch job @@ -2737,8 +2737,8 @@ paths: - jobs x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs: get: operationId: GetJobRuns description: List all runs for a specific job @@ -2771,8 +2771,8 @@ paths: - jobs x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}: get: operationId: GetJobRun description: Get the result of a job execution @@ -2792,8 +2792,8 @@ paths: - jobs x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel: post: operationId: CancelJobRun description: Cancel a running job execution @@ -2813,8 +2813,8 @@ paths: - jobs x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/members': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/members: get: operationId: GetProjectMembers description: Get Project Members @@ -2840,10 +2840,10 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:accounts' + resource: blues:resources:app:APPSERIAL:accounts parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - '/v1/projects/{projectOrProductUID}/monitors': + /v1/projects/{projectOrProductUID}/monitors: get: operationId: GetMonitors description: Get list of defined Monitors @@ -2860,7 +2860,7 @@ paths: - monitor x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices post: operationId: CreateMonitor description: Create a new Monitor @@ -2888,8 +2888,8 @@ paths: - monitor x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/monitors/{monitorUID}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/monitors/{monitorUID}: delete: operationId: DeleteMonitor description: Delete Monitor @@ -2911,7 +2911,7 @@ paths: - monitor x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices get: operationId: GetMonitor description: Get Monitor @@ -2933,7 +2933,7 @@ paths: - monitor x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices put: operationId: UpdateMonitor description: Update Monitor @@ -2962,8 +2962,8 @@ paths: - monitor x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/products': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/products: get: operationId: GetProducts description: Get Products within a Project @@ -2987,7 +2987,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:products' + resource: blues:resources:app:APPSERIAL:products parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -3006,7 +3006,7 @@ paths: items: type: string disable_devices_by_default: - description: 'If `true`, devices provisioned to this product will be automatically disabled by default.' + description: If `true`, devices provisioned to this product will be automatically disabled by default. type: boolean label: description: The label for the Product. @@ -3032,8 +3032,8 @@ paths: - project x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/products/{productUID}': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/products/{productUID}: delete: operationId: DeleteProduct description: Delete a product @@ -3048,11 +3048,11 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/productUIDParam' - '/v1/projects/{projectOrProductUID}/routes': + /v1/projects/{projectOrProductUID}/routes: get: operationId: GetRoutes description: Get all Routes within a Project @@ -3066,34 +3066,34 @@ paths: example: - disabled: false label: success route - modified: '2020-03-09T17:58:37Z' + modified: 2020-03-09T17:58:37Z type: http - uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + uid: route:8d65a087d5d290ce5bdf03aeff2becc0 - disabled: false label: failing route - modified: '2020-03-09T17:59:15Z' + modified: 2020-03-09T17:59:15Z type: http - uid: 'route:a9eaad31d5cee8d01a42762f71fb777a' + uid: route:a9eaad31d5cee8d01a42762f71fb777a - disabled: true label: disabled route - modified: '2020-03-09T17:59:44Z' + modified: 2020-03-09T17:59:44Z type: http - uid: 'route:02ddc0e6e236c2a7e482da62047229ad' + uid: route:02ddc0e6e236c2a7e482da62047229ad - disabled: false label: Proxy Route - modified: '2020-03-09T17:58:36Z' + modified: 2020-03-09T17:58:36Z type: proxy - uid: 'route:0ac565deb7b478a250bb82348b9cfdd4' + uid: route:0ac565deb7b478a250bb82348b9cfdd4 - disabled: false label: Myjsonlive Webtest - modified: '2020-03-09T17:58:35Z' + modified: 2020-03-09T17:58:35Z type: proxy - uid: 'route:fb1b9e0aba1bf030311ba2c3c1e3efd7' + uid: route:fb1b9e0aba1bf030311ba2c3c1e3efd7 - disabled: false label: Myjsonlive Echo - modified: '2020-03-09T17:58:34Z' + modified: 2020-03-09T17:58:34Z type: proxy - uid: 'route:7804818f84a3be6193e14d804fe7fca7' + uid: route:7804818f84a3be6193e14d804fe7fca7 schema: type: array items: @@ -3107,7 +3107,7 @@ paths: - route x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:routes' + resource: blues:resources:app:APPSERIAL:routes post: operationId: CreateRoute description: Create Route within a Project @@ -3126,13 +3126,13 @@ paths: disable_http_headers: false filter: {} fleets: - - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d http_headers: X-My-Header: value throttle_ms: 100 timeout: 5000 transform: {} - url: 'https://example.com/ingest' + url: https://example.com/ingest label: Route Label schema: $ref: '#/components/schemas/NotehubRoute' @@ -3149,16 +3149,16 @@ paths: system_notefiles: false type: '' fleets: - - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d http_headers: null throttle_ms: 100 timeout: 0 transform: {} - url: 'http://route.url' + url: http://route.url label: Route Label - modified: '2020-03-09T17:59:44Z' + modified: 2020-03-09T17:59:44Z type: http - uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + uid: route:8d65a087d5d290ce5bdf03aeff2becc0 schema: $ref: '#/components/schemas/NotehubRoute' default: @@ -3169,8 +3169,8 @@ paths: - route x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:routes' - '/v1/projects/{projectOrProductUID}/routes/{routeUID}': + resource: blues:resources:app:APPSERIAL:routes + /v1/projects/{projectOrProductUID}/routes/{routeUID}: delete: operationId: DeleteRoute description: Delete single route within a project @@ -3188,7 +3188,7 @@ paths: - route x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:routes' + resource: blues:resources:app:APPSERIAL:routes get: operationId: GetRoute description: Get single route within a project @@ -3208,16 +3208,16 @@ paths: system_notefiles: false type: '' fleets: - - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d http_headers: null throttle_ms: 100 timeout: 0 transform: {} - url: 'http://route.url' + url: http://route.url label: Route Label - modified: '2020-03-09T17:59:44Z' + modified: 2020-03-09T17:59:44Z type: http - uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + uid: route:8d65a087d5d290ce5bdf03aeff2becc0 schema: $ref: '#/components/schemas/NotehubRoute' default: @@ -3228,7 +3228,7 @@ paths: - route x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:routes' + resource: blues:resources:app:APPSERIAL:routes put: operationId: UpdateRoute description: Update route by UID @@ -3291,8 +3291,8 @@ paths: - route x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:routes' - '/v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs': + resource: blues:resources:app:APPSERIAL:routes + /v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs: get: operationId: GetRouteLogsByRoute description: Get Route Logs by Route UID @@ -3328,8 +3328,8 @@ paths: - route x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:routes' - '/v1/projects/{projectOrProductUID}/schemas': + resource: blues:resources:app:APPSERIAL:routes + /v1/projects/{projectOrProductUID}/schemas: get: operationId: GetNotefileSchemas summary: Get variable format for a notefile @@ -3350,8 +3350,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/usage/data': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/usage/data: get: operationId: GetDataUsage description: Get data usage in bytes for a project with time range and period aggregation @@ -3394,11 +3394,11 @@ paths: - usage x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/usage/events': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/usage/events: get: operationId: GetEventsUsage - description: 'Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' + description: Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -3439,7 +3439,7 @@ paths: style: form - name: skipRecentData in: query - description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' + description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. required: false schema: type: boolean @@ -3466,11 +3466,11 @@ paths: - usage x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/usage/route-logs': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/usage/route-logs: get: operationId: GetRouteLogsUsage - description: 'Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' + description: Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -3499,7 +3499,7 @@ paths: - project - name: skipRecentData in: query - description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' + description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. required: false schema: type: boolean @@ -3515,11 +3515,11 @@ paths: - usage x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/usage/sessions': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/usage/sessions: get: operationId: GetSessionsUsage - description: 'Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' + description: Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -3550,7 +3550,7 @@ paths: - project - name: skipRecentData in: query - description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' + description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. required: false schema: type: boolean @@ -3566,8 +3566,8 @@ paths: - usage x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/webhooks': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/webhooks: get: operationId: GetWebhooks description: Retrieves all webhooks for the specified project @@ -3593,8 +3593,8 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/webhooks/{webhookUID}: delete: operationId: DeleteWebhook description: Deletes the specified webhook @@ -3612,7 +3612,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings get: operationId: GetWebhook description: Retrieves the configuration settings for the specified webhook @@ -3634,7 +3634,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings post: operationId: CreateWebhook description: Creates a webhook for the specified product with the given name. The name | must be unique within the project. @@ -3663,7 +3663,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings put: operationId: UpdateWebhook description: Updates the configuration settings for the specified webhook. | Webhook will be created if it does not exist. Update body will completely replace the existing settings. @@ -3690,7 +3690,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings components: parameters: billingAccountUIDParam: @@ -3709,7 +3709,7 @@ components: schema: type: string datasetAggregateWindowQueryParam: - description: 'Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format' + description: Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format in: query name: aggregate_window required: false @@ -3723,7 +3723,7 @@ components: schema: type: boolean datasetEndQueryParam: - description: 'End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used.' + description: End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. in: query name: end required: false @@ -3737,15 +3737,15 @@ components: schema: type: integer datasetLocationNearQueryParam: - description: 'Latitude and Longitude for location-based filtering, location_near_radius must also be provided' + description: Latitude and Longitude for location-based filtering, location_near_radius must also be provided in: query name: location_near required: false schema: type: string - example: '42.393125,-71.185015' + example: 42.393125,-71.185015 datasetLocationRadiusQueryParam: - description: 'Distance from location_near in meters, location_near must also be provided' + description: Distance from location_near in meters, location_near must also be provided in: query name: location_near_radius required: false @@ -3766,28 +3766,28 @@ components: schema: type: string datasetSelectQueryParam: - description: 'Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent).' + description: Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent). in: query name: select required: false schema: type: string datasetStartQueryParam: - description: 'Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format.' + description: Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. in: query name: start required: true schema: type: string datasetWhereQueryParam: - description: 'Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100))' + description: Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100)) in: query name: where required: false schema: type: string dateTypeParam: - description: 'Which date to filter on, either ''captured'' or ''uploaded''. This will apply to the startDate and endDate parameters' + description: Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters example: uploaded in: query name: dateType @@ -3807,7 +3807,7 @@ components: items: type: string deviceUIDParam: - example: 'dev:000000000000000' + example: dev:000000000000000 in: path name: deviceUID required: true @@ -3843,7 +3843,7 @@ components: - update - cancel endDateParam: - description: 'End date for filtering results, specified as a Unix timestamp' + description: End date for filtering results, specified as a Unix timestamp example: 1657894210 in: query name: endDate @@ -3877,7 +3877,7 @@ components: schema: type: string filesQueryParam: - example: '_health.qo, data.qo' + example: _health.qo, data.qo in: query name: files required: false @@ -3897,7 +3897,7 @@ components: - version - length firmwareSortOrderParam: - description: 'Sort order (asc for ascending, desc for descending)' + description: Sort order (asc for ascending, desc for descending) in: query name: sortOrder required: false @@ -3923,7 +3923,7 @@ components: schema: type: string firstSyncParam: - description: 'When true, filters results to only show first sync sessions' + description: When true, filters results to only show first sync sessions in: query name: firstSync required: false @@ -4025,7 +4025,7 @@ components: schema: type: string monitorUIDParam: - example: 'monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad' + example: monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad in: path name: monitorUID required: true @@ -4092,7 +4092,7 @@ components: schema: type: string productUIDParam: - example: 'com.blues.bridge:sensors' + example: com.blues.bridge:sensors in: path name: productUID required: true @@ -4109,7 +4109,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 @@ -4136,7 +4136,7 @@ components: required: true schema: type: string - example: 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' + example: rid:2606f411-dea6-44a0-9743-1130f57d77d8 responseStatusParam: example: 500 in: query @@ -4167,7 +4167,7 @@ components: - asc - desc routeUIDParam: - example: 'route:cbd20093cba58392c9f9bbdd0cdeb1a0' + example: route:cbd20093cba58392c9f9bbdd0cdeb1a0 in: path name: routeUID required: true @@ -4197,7 +4197,7 @@ components: - failure type: string selectFieldsParam: - description: 'Comma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output.' + description: Comma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output. in: query name: selectFields required: false @@ -4275,7 +4275,7 @@ components: - asc - desc startDateParam: - description: 'Start date for filtering results, specified as a Unix timestamp' + description: Start date for filtering results, specified as a Unix timestamp example: 1628631763 in: query name: startDate @@ -4434,7 +4434,7 @@ components: type: number type: object resolved: - description: 'If true, the alert has been resolved' + description: If true, the alert has been resolved type: boolean source: description: The UID of the source of the alert @@ -4592,9 +4592,9 @@ components: type: integer format: int64 plan_type: - description: 'Description of the SIM plan type including data allowance, region, and validity period' + description: Description of the SIM plan type including data allowance, region, and validity period type: string - example: '500MB, North America, 10-year lifetime' + example: 500MB, North America, 10-year lifetime CellularUsage: type: array items: @@ -4706,7 +4706,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: @@ -4995,7 +4995,7 @@ components: bssid: type: string cell: - description: 'Cell ID where the session originated and quality ("mcc,mnc,lac,cellid")' + description: Cell ID where the session originated and quality ("mcc,mnc,lac,cellid") type: string continuous: description: Was this a continuous connection? @@ -5292,7 +5292,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 @@ -5302,7 +5302,7 @@ components: description: Location type: string best_location_type: - description: 'One of "gps", "triangulated", or "tower"' + description: One of "gps", "triangulated", or "tower" type: string best_location_when: description: Unix timestamp @@ -5415,7 +5415,7 @@ components: description: Unix timestamp type: number transport: - description: 'The transport used for this event, e.g., "cellular", "wifi", ", etc.' + description: The transport used for this event, e.g., "cellular", "wifi", ", etc. type: string tri_country: description: Country @@ -5607,7 +5607,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: @@ -5644,7 +5644,7 @@ components: filter: $ref: '#/components/schemas/Filter' fleets: - description: 'If non-empty, applies only to the listed fleets.' + description: If non-empty, applies only to the listed fleets. type: array items: type: string @@ -5721,7 +5721,7 @@ components: type: integer format: int64 status: - description: 'Current status (submitted, running, completed, cancelled, failed)' + description: Current status (submitted, running, completed, cancelled, failed) type: string submitted: description: Unix timestamp when submitted @@ -5772,7 +5772,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 @@ -5784,9 +5784,9 @@ components: description: The time window to aggregate the selected values. It follows the format of a number followed by a time unit type: string example: 10m or 5h30m40s - pattern: '^[0-9]+[smh]$' + pattern: ^[0-9]+[smh]$ alert: - description: 'If true, the monitor is in alert state.' + description: If true, the monitor is in alert state. type: boolean alert_routes: type: array @@ -5796,7 +5796,7 @@ components: - $ref: '#/components/schemas/SlackBearerNotification' - $ref: '#/components/schemas/EmailNotification' condition_type: - description: 'A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]' + description: A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to] type: string enum: - greater_than @@ -5809,7 +5809,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 @@ -5825,18 +5825,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: @@ -5906,7 +5906,7 @@ components: description: True if originated from an edge source. type: boolean id: - description: 'Note name/identifier (e.g., "1:435", "my_note").' + description: Note name/identifier (e.g., "1:435", "my_note"). type: string payload: description: Optional base64-encoded payload. @@ -5941,7 +5941,7 @@ components: type: object properties: id: - description: 'Notefile id (e.g., "test.qi", "config.db").' + description: Notefile id (e.g., "test.qi", "config.db"). type: string notes: type: array @@ -5954,7 +5954,7 @@ components: - id - notes NotefileList: - description: 'Array of notefiles, each containing its notes.' + description: Array of notefiles, each containing its notes. type: array items: $ref: '#/components/schemas/Notefile' @@ -6041,7 +6041,7 @@ components: default: http uid: type: string - default: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + default: route:8d65a087d5d290ce5bdf03aeff2becc0 OAuth2Error: type: object properties: @@ -6108,7 +6108,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 @@ -6116,7 +6116,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 @@ -6134,7 +6134,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 @@ -6276,6 +6276,67 @@ components: uid: description: The unique identifier for the data repository type: string + RepositoryListResponse: + type: object + properties: + repositories: + type: array + items: + $ref: '#/components/schemas/Repository' + required: + - repositories + RepositoryTokenRequest: + type: object + properties: + intent: + description: | + Access intent for the vended credentials. Only `read` is + supported today; `write` and `admin` are reserved for future use. + type: string + default: read + enum: + - read + ttl_seconds: + description: | + Requested credential lifetime in seconds. Clamped server-side to + [60, 3600]. Defaults to 900 (15 minutes) if omitted. + type: integer + default: 900 + maximum: 3600 + minimum: 60 + RepositoryTokenResponse: + type: object + properties: + database: + description: Storage service database name scoped to this repository + type: string + expires_at: + description: | + Absolute expiration time of the ephemeral user. The storage + service will reject connections and queries after this instant. + type: string + format: date-time + host: + description: Storage service hostname the caller should connect to + type: string + password: + description: | + Ephemeral password. Returned once; not stored by Notehub. Hold + this in memory only and discard after `expires_at`. + type: string + port: + description: Storage service port + type: integer + username: + description: Ephemeral storage service username (prefixed with `u_`) + type: string + required: + - host + - port + - username + - password + - database + - expires_at Role: type: string properties: {} @@ -6290,7 +6351,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. @@ -6320,7 +6381,7 @@ components: type: object properties: format: - description: 'Output format for transformed data (e.g., "json", "xml", "text").' + description: Output format for transformed data (e.g., "json", "xml", "text"). type: string example: json jsonata: @@ -6425,7 +6486,7 @@ components: psid: description: Provider-specific identifier for the satellite subscription type: string - example: 'skylo:5746354465786' + example: skylo:5746354465786 satellite_data_usage: $ref: '#/components/schemas/SatelliteDataUsage' nullable: true @@ -6499,7 +6560,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. @@ -6541,7 +6602,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. @@ -6650,7 +6711,7 @@ components: mnc: description: Mobile Network Code type: integer - 'n': + n: description: Name of the location type: string source: @@ -6763,7 +6824,7 @@ components: period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: 2025-07-23T00:00:00Z total_bytes: type: integer format: int64 @@ -6787,16 +6848,16 @@ components: type: object properties: billable_events: - description: 'Events that are billable, this include all events except platform events' + description: Events that are billable, this include all events except platform events type: integer format: int64 example: 10 device: type: string - example: 'dev:123456789012345' + example: dev:123456789012345 fleet: type: string - example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d notefiles: description: Count of events per notefile. Only present when includeNotefiles=true is specified. type: object @@ -6810,14 +6871,14 @@ components: period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: 2025-07-23T00:00:00Z platform_events: - description: 'Total platform events. Platform events are _log, _session, _health, and _geolocate events some of which are send from the device, some generated by notehub. These events are not billed.' + description: Total platform events. Platform events are _log, _session, _health, and _geolocate events some of which are send from the device, some generated by notehub. These events are not billed. type: integer format: int64 example: 15 total_days_in_period: - description: 'The total number of days in this period. Useful for calculating daily averages for month period. Note that the current period will be the total number of days in the current period, including days in the future.' + description: The total number of days in this period. Useful for calculating daily averages for month period. Note that the current period will be the total number of days in the current period, including days in the future. type: integer format: int32 total_devices: @@ -6825,7 +6886,7 @@ components: type: integer format: int64 total_events: - description: 'Total events the device sent to notehub, including associated notehub generated events' + description: Total events the device sent to notehub, including associated notehub generated events type: integer format: int64 example: 42 @@ -6842,7 +6903,7 @@ components: example: 2 nullable: true watchdog_events: - description: 'Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time.' + description: Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time. type: integer format: int64 example: 10 @@ -6879,11 +6940,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 @@ -6902,7 +6963,7 @@ components: properties: device: type: string - example: 'dev:123456789012345' + example: dev:123456789012345 first_sync_sessions: description: Number of first sync sessions in this period type: integer @@ -6910,17 +6971,17 @@ components: example: 2 fleet: type: string - example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: 2025-07-23T00:00:00Z sessions: type: integer format: int64 example: 12 sessions_by_transport: - description: 'Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan)' + description: Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan) type: object example: cell: 8 @@ -6950,7 +7011,7 @@ components: - total_bytes - total_devices UsageTruncatedField: - description: 'If the data is truncated that means that the parameters selected resulted in a response of over | the requested limit of data points, in order to ensure' + description: If the data is truncated that means that the parameters selected resulted in a response of over | the requested limit of data points, in order to ensure type: boolean properties: {} UserDfuStateMachine: @@ -7122,7 +7183,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 @@ -7136,15 +7197,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 @@ -7183,7 +7244,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 @@ -7197,15 +7258,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 @@ -7252,7 +7313,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 @@ -7320,59 +7381,59 @@ components: $ref: '#/components/schemas/Event' example: latest_events: - - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' + - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 body: why: sensors.qo requested sync (sensors.qo) (TLS) - device: 'dev:864475040523995' + device: dev:864475040523995 event: 81bd2bf1-0399-4978-bc46-8f779b4af350 file: _session.qo - product: 'product:com.blues.app:myapp' + product: product:com.blues.app:myapp received: 1669667707.564694 req: session.begin session: ed18884b-f2a6-419f-b856-d28dc8f0892b tls: true tower_country: US - tower_id: '310,410,20483,184692495' + tower_id: 310,410,20483,184692495 tower_lat: 43.769062500000004 tower_location: Waverly MI tower_lon: -83.657359375 tower_timezone: America/Detroit tower_when: 1669667691 when: 1669667707 - - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' + - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 body: humid: 56.23 temp: 35.5 - device: 'dev:864475040523995' + device: dev:864475040523995 event: 916d4c81-06ae-4263-9b55-7a3a0f73cb5a file: data.qo - product: 'product:com.blues.app:myapp' + product: product:com.blues.app:myapp received: 1669667713.221659 req: note.add session: 28cdc39f-9f62-4789-b0a3-2f35f9448ced sn: tj-1 tower_country: US - tower_id: '310,410,20483,184692495' + tower_id: 310,410,20483,184692495 tower_lat: 43.769062500000004 tower_location: Waverly MI tower_lon: -83.657359375 tower_timezone: America/Detroit tower_when: 1669667677 when: 1669667689 - - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' + - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 body: humidity: 69.88647200683693 pressure: 993.6294496104914 temp: 21.273027181770885 - device: 'dev:864475040523995' + device: dev:864475040523995 event: e98c2c3b-edbe-4fe7-af57-2196cc843eb7 file: sensors.qo - product: 'product:com.blues.app:myapp' + product: product:com.blues.app:myapp received: 1669667711.85316 req: note.add session: 7211392c-6895-43f8-9256-790655348be5 tower_country: US - tower_id: '310,410,20483,184692496' + tower_id: 310,410,20483,184692496 tower_lat: 43.747037500000005 tower_location: Waverly MI tower_lon: -83.665859375 @@ -7437,12 +7498,12 @@ components: - apn: a-notehub.com.attz bars: 2 bearer: LTE FDD - cell: '310,410,17169,77315594' + cell: 310,410,17169,77315594 continuous: true - device: 'dev:000000000000000' + device: dev:000000000000000 events: 14 fleets: - - 'fleet:46be9834-5te6-42c1-0000-b5ea05e248d7' + - fleet:46be9834-5te6-42c1-0000-b5ea05e248d7 hp_cycles_data: 3 hp_cycles_total: 3 hp_secs_data: 7659 @@ -7458,7 +7519,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 @@ -7477,7 +7538,7 @@ components: lon: -89.44239062499999 mcc: 310 mnc: 410 - 'n': Shorewood Hills WI + n: Shorewood Hills WI time: 1667250835 towers: 1 zone: America/Chicago @@ -7504,14 +7565,14 @@ components: device: description: The device UID this usage data belongs to (only present when aggregate is 'device') type: string - example: 'dev:123456789012345' + example: dev:123456789012345 device_count: description: the number of devices represented by this data point type: integer fleet: description: The fleet UID this usage data belongs to (only present when aggregate is 'fleet') type: string - example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d iccid: description: The ICCID of the cellular SIM card (only present when type is 'cellular') type: string @@ -7519,7 +7580,7 @@ components: psid: description: The PSID (Packet Service ID) of the satellite (or other packet-based device) type: string - example: 'skylo:5746354465786' + example: skylo:5746354465786 type: description: The type of connectivity type: string @@ -7588,10 +7649,10 @@ tags: name: webhook - description: APIs for events and sessions for external devices name: external devices - - description: 'Project Usage information related to events, route logs, sessions, and data usage' + - description: Project Usage information related to events, route logs, sessions, and data usage name: usage - description: Batch job operations name: jobs externalDocs: description: Find out more about Blues - url: 'https://blues.io' + url: https://blues.io From 2acae1ceb1b0cbf9cbf7f0ad6965e6ac43517ebd Mon Sep 17 00:00:00 2001 From: "blues-hub-automation[bot]" Date: Wed, 13 May 2026 15:51:38 +0000 Subject: [PATCH 05/12] feat: Update OpenAPI file replicated from Notehub commit d85a90b --- openapi.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 7f1d82f..c5987b7 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1195,8 +1195,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys: get: operationId: GetDeviceJourneys description: | @@ -1249,8 +1249,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys/{journeyID}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys/{journeyID}: get: operationId: GetDeviceJourney description: | @@ -1314,8 +1314,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest: get: operationId: GetDeviceLatestEvents description: Get Device Latest Events @@ -4538,6 +4538,7 @@ components: - billing_admin - billing_manager - project_creator + - billing_member BlynkRoute: type: object properties: From 92928d8bf25f9234592d1e91a96b0d0bdbf2f328 Mon Sep 17 00:00:00 2001 From: "blues-hub-automation[bot]" Date: Wed, 13 May 2026 16:50:37 +0000 Subject: [PATCH 06/12] feat: Update OpenAPI file replicated from Notehub commit dd5d44d --- openapi.yaml | 664 +++++++++++++++++++++++++-------------------------- 1 file changed, 332 insertions(+), 332 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index c5987b7..0b9ce19 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: @@ -147,7 +147,7 @@ paths: - billing_account x-custom-attributes: permission: read - /v1/billing-accounts/{billingAccountUID}: + '/v1/billing-accounts/{billingAccountUID}': get: operationId: GetBillingAccount description: Get Billing Account Information @@ -197,7 +197,7 @@ paths: - billing_account x-custom-attributes: permission: read - /v1/billing-accounts/{billingAccountUID}/balance-history: + '/v1/billing-accounts/{billingAccountUID}/balance-history': get: operationId: GetBillingAccountBalanceHistory description: Get Billing Account Balance history @@ -239,7 +239,7 @@ paths: - billing_account x-custom-attributes: permission: read - /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 @@ -279,15 +279,15 @@ paths: - device x-custom-attributes: permission: update - /v1/products/{productUID}/devices/{deviceUID}/webhook-event: + '/v1/products/{productUID}/devices/{deviceUID}/webhook-event': post: operationId: CreateLegacyWebhookEvent - description: Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload. + description: 'Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload.' parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/deviceUIDParam' requestBody: - description: A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload. + description: 'A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload.' required: true content: application/json: @@ -321,8 +321,8 @@ paths: - webhook x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/devices/{deviceUID}/webhook-session: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/devices/{deviceUID}/webhook-session': put: operationId: UpdateLegacyWebhookSession description: Legacy endpoint for opening or updating a webhook session for the given device (provisioning the device if necessary). Used by external services that need to maintain a callable session against a device behind a webhook. @@ -348,8 +348,8 @@ paths: - webhook x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/ext-devices/{deviceUID}/event: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/ext-devices/{deviceUID}/event': post: operationId: CreateEventExtDevice description: Creates an event using specified webhook @@ -374,8 +374,8 @@ paths: - external devices x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/ext-devices/{deviceUID}/session/close: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/ext-devices/{deviceUID}/session/close': post: operationId: ExtDeviceSessionClose description: Closes the session for the specified device if open @@ -400,8 +400,8 @@ paths: - external devices x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/ext-devices/{deviceUID}/session/open: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/ext-devices/{deviceUID}/session/open': post: operationId: ExtDeviceSessionOpen description: Create a Session for the specified device. | If a session is currently open it will be closed and a new one opened. @@ -426,8 +426,8 @@ paths: - external devices x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/project: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/project': get: operationId: GetProjectByProduct description: Get a Project by ProductUID @@ -453,11 +453,11 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event': post: operationId: CreateWebhookDeviceEventByProduct - description: Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. + description: 'Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook''s configured JSONata transform, if any, is applied before routing.' parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -481,11 +481,11 @@ paths: - webhook x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/webhooks/{webhookUID}/event: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/webhooks/{webhookUID}/event': post: operationId: CreateWebhookEventByProduct - description: Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device. + description: 'Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook''s configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device.' parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -508,11 +508,11 @@ paths: - webhook x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/webhooks/{webhookUID}/settings: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/webhooks/{webhookUID}/settings': get: operationId: GetWebhookSettingsByProduct - description: Retrieves the configuration settings for the specified webhook, addressed by productUID. + description: 'Retrieves the configuration settings for the specified webhook, addressed by productUID.' parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -531,10 +531,10 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' put: operationId: UpdateWebhookSettingsByProduct - description: Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings. + description: 'Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings.' parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -558,7 +558,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' /v1/projects: get: operationId: GetProjects @@ -619,7 +619,7 @@ paths: - project x-custom-attributes: permission: create - /v1/projects/{projectOrProductUID}: + '/v1/projects/{projectOrProductUID}': delete: operationId: DeleteProject description: Delete a Project by ProjectUID @@ -636,7 +636,7 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: GetProject description: Get a Project by ProjectUID @@ -657,8 +657,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/alerts: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/alerts': get: operationId: GetAlerts description: Get list of defined Alerts @@ -678,8 +678,8 @@ paths: - alert x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/aws-role-config: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/aws-role-config': get: operationId: GetAWSRoleConfig summary: Get AWS role configuration for role-based authentication @@ -703,8 +703,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/clone: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/clone': post: operationId: CloneProject description: Clone a Project @@ -719,7 +719,7 @@ paths: type: object properties: billing_account_uid: - description: The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned. + description: 'The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned.' type: string disable_clone_fleets: description: Whether to disallow the cloning of the fleets from the parent project. Default is false if not specified. @@ -748,8 +748,8 @@ paths: - project x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/devices: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/devices': get: operationId: GetDevices description: Get Devices of a Project @@ -777,8 +777,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}': delete: operationId: DeleteDevice description: Delete Device @@ -793,7 +793,7 @@ paths: - device x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' get: operationId: GetDevice description: Get Device @@ -812,11 +812,11 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history: + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history': get: operationId: GetDeviceDfuHistory description: Get device DFU history for host or Notecard firmware @@ -839,8 +839,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status': get: operationId: GetDeviceDfuStatus description: Get device DFU history for host or Notecard firmware @@ -863,8 +863,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable': post: operationId: DisableDevice description: Disable Device @@ -882,8 +882,8 @@ paths: - device x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable': post: operationId: EnableDevice description: Enable Device @@ -901,8 +901,8 @@ paths: - device x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy': get: operationId: GetDeviceEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -926,8 +926,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables': get: operationId: GetDeviceEnvironmentVariables description: Get environment variables of a device @@ -942,7 +942,7 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -967,8 +967,8 @@ paths: - device x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}': delete: operationId: DeleteDeviceEnvironmentVariable description: Delete environment variable of a device @@ -992,8 +992,8 @@ paths: - device x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files': delete: operationId: DeleteNotefiles description: Deletes Notefiles and the Notes they contain. @@ -1023,7 +1023,7 @@ paths: - device x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:notefiles + resource: 'blues:resources:app:APPSERIAL:notefiles' get: operationId: ListNotefiles description: Lists .qi and .db files for the device @@ -1059,8 +1059,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:notefiles - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets: + resource: 'blues:resources:app:APPSERIAL:notefiles' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets': delete: operationId: DeleteDeviceFromFleets description: Remove Device from Fleets @@ -1091,7 +1091,7 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' get: operationId: GetDeviceFleets description: Get Device Fleets @@ -1106,7 +1106,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1140,8 +1140,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log': get: operationId: GetDeviceHealthLog description: Get Device Health Log @@ -1333,8 +1333,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}': post: operationId: CreateNotefile description: Creates an empty Notefile on the device. @@ -1353,11 +1353,11 @@ paths: - device x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notefiles - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}: + resource: 'blues:resources:app:APPSERIAL:notefiles' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}': get: operationId: GetNotefile - description: For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile + description: 'For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1405,10 +1405,10 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:notefiles + resource: 'blues:resources:app:APPSERIAL:notefiles' post: operationId: AddQiNote - description: Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist. + description: 'Adds a Note to a Notefile, creating the Notefile if it doesn''t yet exist.' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1431,8 +1431,8 @@ paths: - device x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}': delete: operationId: DeleteNote description: Delete a note from a .db or .qi notefile @@ -1452,7 +1452,7 @@ paths: - device x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:notes + resource: 'blues:resources:app:APPSERIAL:notes' get: operationId: GetDbNote description: Get a note from a .db or .qi notefile @@ -1498,7 +1498,7 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:notes + resource: 'blues:resources:app:APPSERIAL:notes' post: operationId: AddDbNote description: Add a Note to a .db notefile. if noteID is '-' then payload is ignored and empty notefile is created @@ -1525,7 +1525,7 @@ paths: - device x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes + resource: 'blues:resources:app:APPSERIAL:notes' put: operationId: UpdateDbNote description: Update a note in a .db or .qi notefile @@ -1552,11 +1552,11 @@ paths: - device x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:notes - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans': get: operationId: GetDevicePlans - description: Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections. + description: 'Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections.' responses: '200': $ref: '#/components/responses/DevicePlansResponse' @@ -1568,11 +1568,11 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision: + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision': post: operationId: ProvisionDevice description: Provision Device for a Project @@ -1617,8 +1617,8 @@ paths: - device x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key': get: operationId: GetDevicePublicKey description: Get Device Public Key @@ -1648,8 +1648,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions': get: operationId: GetDeviceSessions description: Get Device Sessions @@ -1672,8 +1672,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal': post: operationId: SignalDevice description: Send a signal from Notehub to a Notecard. @@ -1706,8 +1706,8 @@ paths: - device x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/public-keys: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/public-keys': get: operationId: GetDevicePublicKeys description: Get Device Public Keys of a Project @@ -1745,8 +1745,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}': post: operationId: PerformDfuAction description: Update/cancel host or notecard firmware updates @@ -1781,8 +1781,8 @@ paths: - project x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history': get: operationId: GetDevicesDfuHistory description: Get host or Notecard DFU history for all devices that match the filter criteria @@ -1817,8 +1817,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status': get: operationId: GetDevicesDfuStatus description: Get host or Notecard DFU history for all devices that match the filter criteria @@ -1853,8 +1853,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/environment_hierarchy: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/environment_hierarchy': get: operationId: GetProjectEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -1877,8 +1877,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/environment_variables: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/environment_variables': get: operationId: GetProjectEnvironmentVariables description: Get environment variables of a project @@ -1893,7 +1893,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' put: @@ -1915,8 +1915,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/environment_variables/{key}: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/environment_variables/{key}': delete: operationId: DeleteProjectEnvironmentVariable description: Delete an environment variable of a project by key @@ -1939,8 +1939,8 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/events: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/events': get: operationId: GetEvents description: Get Events of a Project @@ -1989,8 +1989,8 @@ paths: - event x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/events-cursor: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/events-cursor': get: operationId: GetEventsByCursor description: Get Events of a Project by cursor @@ -2014,8 +2014,8 @@ paths: - event x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs': get: operationId: GetRouteLogsByEvent description: Get Route Logs by Event UID @@ -2039,8 +2039,8 @@ paths: - event x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/firmware: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/firmware': get: operationId: GetFirmwareInfo description: Get Available Firmware Information @@ -2072,8 +2072,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}': delete: operationId: DeleteFirmware description: | @@ -2103,7 +2103,7 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: DownloadFirmware description: Download firmware binary @@ -2131,7 +2131,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' post: operationId: UpdateFirmware description: | @@ -2172,7 +2172,7 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' put: operationId: UploadFirmware description: Upload firmware binary @@ -2186,7 +2186,7 @@ paths: type: string - name: version in: query - description: Firmware version (optional). If not provided, the version will be extracted from firmware binary if available, otherwise left empty + description: 'Firmware version (optional). If not provided, the version will be extracted from firmware binary if available, otherwise left empty' required: false schema: type: string @@ -2219,8 +2219,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/fleets: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/fleets': get: operationId: GetFleets description: Get Project Fleets @@ -2235,7 +2235,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:fleets + resource: 'blues:resources:app:APPSERIAL:fleets' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -2252,7 +2252,7 @@ paths: connectivity_assurance: $ref: '#/components/schemas/FleetConnectivityAssurance' label: - description: The label, or name, for the Fleet. + description: 'The label, or name, for the Fleet.' type: string smart_rule: $ref: '#/components/schemas/FleetRule' @@ -2273,8 +2273,8 @@ paths: - project x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:fleets - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}: + resource: 'blues:resources:app:APPSERIAL:fleets' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}': delete: operationId: DeleteFleet description: Delete Fleet @@ -2289,7 +2289,7 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:fleets + resource: 'blues:resources:app:APPSERIAL:fleets' get: operationId: GetFleet description: Get Fleet @@ -2306,7 +2306,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:fleets + resource: 'blues:resources:app:APPSERIAL:fleets' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -2359,8 +2359,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:fleets - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices: + resource: 'blues:resources:app:APPSERIAL:fleets' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices': get: operationId: GetFleetDevices description: Get Devices of a Fleet within a Project @@ -2388,8 +2388,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy': get: operationId: GetFleetEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -2413,8 +2413,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:fleets - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables: + resource: 'blues:resources:app:APPSERIAL:fleets' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables': get: operationId: GetFleetEnvironmentVariables description: Get environment variables of a fleet @@ -2429,7 +2429,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:fleets + resource: 'blues:resources:app:APPSERIAL:fleets' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -2454,8 +2454,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:fleets - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}: + resource: 'blues:resources:app:APPSERIAL:fleets' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}': delete: operationId: DeleteFleetEnvironmentVariable description: Delete environment variables of a fleet @@ -2479,8 +2479,8 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:fleets - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events: + resource: 'blues:resources:app:APPSERIAL:fleets' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events': get: operationId: GetFleetEvents description: Get Events of a Fleet @@ -2529,8 +2529,8 @@ paths: - event x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor': get: operationId: GetFleetEventsByCursor description: Get Events of a Fleet by cursor @@ -2556,8 +2556,8 @@ paths: - event x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/global-transformation: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/global-transformation': post: operationId: SetGlobalEventTransformation description: Set the project-level event JSONata transformation @@ -2581,8 +2581,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/global-transformation/disable: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/global-transformation/disable': post: operationId: DisableGlobalEventTransformation description: Disable the project-level event JSONata transformation @@ -2599,8 +2599,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/global-transformation/enable: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/global-transformation/enable': post: operationId: EnableGlobalEventTransformation description: Enable the project-level event JSONata transformation @@ -2617,8 +2617,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/jobs: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/jobs': get: operationId: GetJobs description: List all batch jobs for a project @@ -2635,7 +2635,7 @@ paths: - jobs x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' post: operationId: CreateJob description: Create a new batch job with an optional name @@ -2668,8 +2668,8 @@ paths: - jobs x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/jobs/{jobUID}: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/jobs/{jobUID}': delete: operationId: DeleteJob description: Delete a batch job @@ -2689,7 +2689,7 @@ paths: - jobs x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: GetJob description: Get a specific batch job definition @@ -2709,8 +2709,8 @@ paths: - jobs x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/jobs/{jobUID}/run: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/jobs/{jobUID}/run': post: operationId: RunJob description: Execute a batch job @@ -2737,8 +2737,8 @@ paths: - jobs x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs': get: operationId: GetJobRuns description: List all runs for a specific job @@ -2771,8 +2771,8 @@ paths: - jobs x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}': get: operationId: GetJobRun description: Get the result of a job execution @@ -2792,8 +2792,8 @@ paths: - jobs x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel': post: operationId: CancelJobRun description: Cancel a running job execution @@ -2813,8 +2813,8 @@ paths: - jobs x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/members: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/members': get: operationId: GetProjectMembers description: Get Project Members @@ -2840,10 +2840,10 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:accounts + resource: 'blues:resources:app:APPSERIAL:accounts' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - /v1/projects/{projectOrProductUID}/monitors: + '/v1/projects/{projectOrProductUID}/monitors': get: operationId: GetMonitors description: Get list of defined Monitors @@ -2860,7 +2860,7 @@ paths: - monitor x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' post: operationId: CreateMonitor description: Create a new Monitor @@ -2888,8 +2888,8 @@ paths: - monitor x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/monitors/{monitorUID}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/monitors/{monitorUID}': delete: operationId: DeleteMonitor description: Delete Monitor @@ -2911,7 +2911,7 @@ paths: - monitor x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' get: operationId: GetMonitor description: Get Monitor @@ -2933,7 +2933,7 @@ paths: - monitor x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' put: operationId: UpdateMonitor description: Update Monitor @@ -2962,8 +2962,8 @@ paths: - monitor x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/products: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/products': get: operationId: GetProducts description: Get Products within a Project @@ -2987,7 +2987,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:products + resource: 'blues:resources:app:APPSERIAL:products' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -3006,7 +3006,7 @@ paths: items: type: string disable_devices_by_default: - description: If `true`, devices provisioned to this product will be automatically disabled by default. + description: 'If `true`, devices provisioned to this product will be automatically disabled by default.' type: boolean label: description: The label for the Product. @@ -3032,8 +3032,8 @@ paths: - project x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/products/{productUID}: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/products/{productUID}': delete: operationId: DeleteProduct description: Delete a product @@ -3048,11 +3048,11 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/productUIDParam' - /v1/projects/{projectOrProductUID}/routes: + '/v1/projects/{projectOrProductUID}/routes': get: operationId: GetRoutes description: Get all Routes within a Project @@ -3066,34 +3066,34 @@ paths: example: - disabled: false label: success route - modified: 2020-03-09T17:58:37Z + modified: '2020-03-09T17:58:37Z' type: http - uid: route:8d65a087d5d290ce5bdf03aeff2becc0 + uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' - disabled: false label: failing route - modified: 2020-03-09T17:59:15Z + modified: '2020-03-09T17:59:15Z' type: http - uid: route:a9eaad31d5cee8d01a42762f71fb777a + uid: 'route:a9eaad31d5cee8d01a42762f71fb777a' - disabled: true label: disabled route - modified: 2020-03-09T17:59:44Z + modified: '2020-03-09T17:59:44Z' type: http - uid: route:02ddc0e6e236c2a7e482da62047229ad + uid: 'route:02ddc0e6e236c2a7e482da62047229ad' - disabled: false label: Proxy Route - modified: 2020-03-09T17:58:36Z + modified: '2020-03-09T17:58:36Z' type: proxy - uid: route:0ac565deb7b478a250bb82348b9cfdd4 + uid: 'route:0ac565deb7b478a250bb82348b9cfdd4' - disabled: false label: Myjsonlive Webtest - modified: 2020-03-09T17:58:35Z + modified: '2020-03-09T17:58:35Z' type: proxy - uid: route:fb1b9e0aba1bf030311ba2c3c1e3efd7 + uid: 'route:fb1b9e0aba1bf030311ba2c3c1e3efd7' - disabled: false label: Myjsonlive Echo - modified: 2020-03-09T17:58:34Z + modified: '2020-03-09T17:58:34Z' type: proxy - uid: route:7804818f84a3be6193e14d804fe7fca7 + uid: 'route:7804818f84a3be6193e14d804fe7fca7' schema: type: array items: @@ -3107,7 +3107,7 @@ paths: - route x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:routes + resource: 'blues:resources:app:APPSERIAL:routes' post: operationId: CreateRoute description: Create Route within a Project @@ -3126,13 +3126,13 @@ paths: disable_http_headers: false filter: {} fleets: - - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' http_headers: X-My-Header: value throttle_ms: 100 timeout: 5000 transform: {} - url: https://example.com/ingest + url: 'https://example.com/ingest' label: Route Label schema: $ref: '#/components/schemas/NotehubRoute' @@ -3149,16 +3149,16 @@ paths: system_notefiles: false type: '' fleets: - - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' http_headers: null throttle_ms: 100 timeout: 0 transform: {} - url: http://route.url + url: 'http://route.url' label: Route Label - modified: 2020-03-09T17:59:44Z + modified: '2020-03-09T17:59:44Z' type: http - uid: route:8d65a087d5d290ce5bdf03aeff2becc0 + uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' schema: $ref: '#/components/schemas/NotehubRoute' default: @@ -3169,8 +3169,8 @@ paths: - route x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:routes - /v1/projects/{projectOrProductUID}/routes/{routeUID}: + resource: 'blues:resources:app:APPSERIAL:routes' + '/v1/projects/{projectOrProductUID}/routes/{routeUID}': delete: operationId: DeleteRoute description: Delete single route within a project @@ -3188,7 +3188,7 @@ paths: - route x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:routes + resource: 'blues:resources:app:APPSERIAL:routes' get: operationId: GetRoute description: Get single route within a project @@ -3208,16 +3208,16 @@ paths: system_notefiles: false type: '' fleets: - - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' http_headers: null throttle_ms: 100 timeout: 0 transform: {} - url: http://route.url + url: 'http://route.url' label: Route Label - modified: 2020-03-09T17:59:44Z + modified: '2020-03-09T17:59:44Z' type: http - uid: route:8d65a087d5d290ce5bdf03aeff2becc0 + uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' schema: $ref: '#/components/schemas/NotehubRoute' default: @@ -3228,7 +3228,7 @@ paths: - route x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:routes + resource: 'blues:resources:app:APPSERIAL:routes' put: operationId: UpdateRoute description: Update route by UID @@ -3291,8 +3291,8 @@ paths: - route x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:routes - /v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs: + resource: 'blues:resources:app:APPSERIAL:routes' + '/v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs': get: operationId: GetRouteLogsByRoute description: Get Route Logs by Route UID @@ -3328,8 +3328,8 @@ paths: - route x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:routes - /v1/projects/{projectOrProductUID}/schemas: + resource: 'blues:resources:app:APPSERIAL:routes' + '/v1/projects/{projectOrProductUID}/schemas': get: operationId: GetNotefileSchemas summary: Get variable format for a notefile @@ -3350,8 +3350,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/usage/data: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/usage/data': get: operationId: GetDataUsage description: Get data usage in bytes for a project with time range and period aggregation @@ -3394,11 +3394,11 @@ paths: - usage x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/usage/events: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/usage/events': get: operationId: GetEventsUsage - description: Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied + description: 'Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -3439,7 +3439,7 @@ paths: style: form - name: skipRecentData in: query - description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. + description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' required: false schema: type: boolean @@ -3466,11 +3466,11 @@ paths: - usage x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/usage/route-logs: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/usage/route-logs': get: operationId: GetRouteLogsUsage - description: Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied + description: 'Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -3499,7 +3499,7 @@ paths: - project - name: skipRecentData in: query - description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. + description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' required: false schema: type: boolean @@ -3515,11 +3515,11 @@ paths: - usage x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/usage/sessions: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/usage/sessions': get: operationId: GetSessionsUsage - description: Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied + description: 'Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -3550,7 +3550,7 @@ paths: - project - name: skipRecentData in: query - description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. + description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' required: false schema: type: boolean @@ -3566,8 +3566,8 @@ paths: - usage x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/webhooks: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/webhooks': get: operationId: GetWebhooks description: Retrieves all webhooks for the specified project @@ -3593,8 +3593,8 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/webhooks/{webhookUID}: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}': delete: operationId: DeleteWebhook description: Deletes the specified webhook @@ -3612,7 +3612,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: GetWebhook description: Retrieves the configuration settings for the specified webhook @@ -3634,7 +3634,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' post: operationId: CreateWebhook description: Creates a webhook for the specified product with the given name. The name | must be unique within the project. @@ -3663,7 +3663,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' put: operationId: UpdateWebhook description: Updates the configuration settings for the specified webhook. | Webhook will be created if it does not exist. Update body will completely replace the existing settings. @@ -3690,7 +3690,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' components: parameters: billingAccountUIDParam: @@ -3709,7 +3709,7 @@ components: schema: type: string datasetAggregateWindowQueryParam: - description: Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format + description: 'Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format' in: query name: aggregate_window required: false @@ -3723,7 +3723,7 @@ components: schema: type: boolean datasetEndQueryParam: - description: End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. + description: 'End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used.' in: query name: end required: false @@ -3737,15 +3737,15 @@ components: schema: type: integer datasetLocationNearQueryParam: - description: Latitude and Longitude for location-based filtering, location_near_radius must also be provided + description: 'Latitude and Longitude for location-based filtering, location_near_radius must also be provided' in: query name: location_near required: false schema: type: string - example: 42.393125,-71.185015 + example: '42.393125,-71.185015' datasetLocationRadiusQueryParam: - description: Distance from location_near in meters, location_near must also be provided + description: 'Distance from location_near in meters, location_near must also be provided' in: query name: location_near_radius required: false @@ -3766,28 +3766,28 @@ components: schema: type: string datasetSelectQueryParam: - description: Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent). + description: 'Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent).' in: query name: select required: false schema: type: string datasetStartQueryParam: - description: Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. + description: 'Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format.' in: query name: start required: true schema: type: string datasetWhereQueryParam: - description: Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100)) + description: 'Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100))' in: query name: where required: false schema: type: string dateTypeParam: - description: Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters + description: 'Which date to filter on, either ''captured'' or ''uploaded''. This will apply to the startDate and endDate parameters' example: uploaded in: query name: dateType @@ -3807,7 +3807,7 @@ components: items: type: string deviceUIDParam: - example: dev:000000000000000 + example: 'dev:000000000000000' in: path name: deviceUID required: true @@ -3843,7 +3843,7 @@ components: - update - cancel endDateParam: - description: End date for filtering results, specified as a Unix timestamp + description: 'End date for filtering results, specified as a Unix timestamp' example: 1657894210 in: query name: endDate @@ -3877,7 +3877,7 @@ components: schema: type: string filesQueryParam: - example: _health.qo, data.qo + example: '_health.qo, data.qo' in: query name: files required: false @@ -3897,7 +3897,7 @@ components: - version - length firmwareSortOrderParam: - description: Sort order (asc for ascending, desc for descending) + description: 'Sort order (asc for ascending, desc for descending)' in: query name: sortOrder required: false @@ -3923,7 +3923,7 @@ components: schema: type: string firstSyncParam: - description: When true, filters results to only show first sync sessions + description: 'When true, filters results to only show first sync sessions' in: query name: firstSync required: false @@ -4025,7 +4025,7 @@ components: schema: type: string monitorUIDParam: - example: monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad + example: 'monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad' in: path name: monitorUID required: true @@ -4092,7 +4092,7 @@ components: schema: type: string productUIDParam: - example: com.blues.bridge:sensors + example: 'com.blues.bridge:sensors' in: path name: productUID required: true @@ -4109,7 +4109,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 @@ -4136,7 +4136,7 @@ components: required: true schema: type: string - example: rid:2606f411-dea6-44a0-9743-1130f57d77d8 + example: 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' responseStatusParam: example: 500 in: query @@ -4167,7 +4167,7 @@ components: - asc - desc routeUIDParam: - example: route:cbd20093cba58392c9f9bbdd0cdeb1a0 + example: 'route:cbd20093cba58392c9f9bbdd0cdeb1a0' in: path name: routeUID required: true @@ -4197,7 +4197,7 @@ components: - failure type: string selectFieldsParam: - description: Comma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output. + description: 'Comma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output.' in: query name: selectFields required: false @@ -4275,7 +4275,7 @@ components: - asc - desc startDateParam: - description: Start date for filtering results, specified as a Unix timestamp + description: 'Start date for filtering results, specified as a Unix timestamp' example: 1628631763 in: query name: startDate @@ -4434,7 +4434,7 @@ components: type: number type: object resolved: - description: If true, the alert has been resolved + description: 'If true, the alert has been resolved' type: boolean source: description: The UID of the source of the alert @@ -4593,9 +4593,9 @@ components: type: integer format: int64 plan_type: - description: Description of the SIM plan type including data allowance, region, and validity period + description: 'Description of the SIM plan type including data allowance, region, and validity period' type: string - example: 500MB, North America, 10-year lifetime + example: '500MB, North America, 10-year lifetime' CellularUsage: type: array items: @@ -4707,7 +4707,7 @@ components: description: Last updated timestamp type: number version: - description: Last known version, which is generally a JSON object contained within the firmware image + description: 'Last known version, which is generally a JSON object contained within the firmware image' type: string nullable: true DataField: @@ -4996,7 +4996,7 @@ components: bssid: type: string cell: - description: Cell ID where the session originated and quality ("mcc,mnc,lac,cellid") + description: 'Cell ID where the session originated and quality ("mcc,mnc,lac,cellid")' type: string continuous: description: Was this a continuous connection? @@ -5293,7 +5293,7 @@ components: description: Country type: string best_id: - description: The device serial number, or the DeviceUID if the serial number is not set + description: 'The device serial number, or the DeviceUID if the serial number is not set' type: string best_lat: description: Latitude @@ -5303,7 +5303,7 @@ components: description: Location type: string best_location_type: - description: One of "gps", "triangulated", or "tower" + description: 'One of "gps", "triangulated", or "tower"' type: string best_location_when: description: Unix timestamp @@ -5416,7 +5416,7 @@ components: description: Unix timestamp type: number transport: - description: The transport used for this event, e.g., "cellular", "wifi", ", etc. + description: 'The transport used for this event, e.g., "cellular", "wifi", ", etc.' type: string tri_country: description: Country @@ -5608,7 +5608,7 @@ components: enabled: true nullable: true FleetRule: - description: JSONata expression that will be evaluated to determine device membership into this fleet, if the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged. + description: 'JSONata expression that will be evaluated to determine device membership into this fleet, if the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged.' type: string properties: {} FleetsUIDList: @@ -5645,7 +5645,7 @@ components: filter: $ref: '#/components/schemas/Filter' fleets: - description: If non-empty, applies only to the listed fleets. + description: 'If non-empty, applies only to the listed fleets.' type: array items: type: string @@ -5722,7 +5722,7 @@ components: type: integer format: int64 status: - description: Current status (submitted, running, completed, cancelled, failed) + description: 'Current status (submitted, running, completed, cancelled, failed)' type: string submitted: description: Unix timestamp when submitted @@ -5773,7 +5773,7 @@ components: type: object properties: aggregate_function: - description: Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min] + description: 'Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]' type: string enum: - none @@ -5785,9 +5785,9 @@ components: description: The time window to aggregate the selected values. It follows the format of a number followed by a time unit type: string example: 10m or 5h30m40s - pattern: ^[0-9]+[smh]$ + pattern: '^[0-9]+[smh]$' alert: - description: If true, the monitor is in alert state. + description: 'If true, the monitor is in alert state.' type: boolean alert_routes: type: array @@ -5797,7 +5797,7 @@ components: - $ref: '#/components/schemas/SlackBearerNotification' - $ref: '#/components/schemas/EmailNotification' condition_type: - description: A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to] + description: 'A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]' type: string enum: - greater_than @@ -5810,7 +5810,7 @@ components: description: type: string disabled: - description: If true, the monitor will not be evaluated. + description: 'If true, the monitor will not be evaluated.' type: boolean fleet_filter: type: array @@ -5826,18 +5826,18 @@ components: items: type: string per_device: - description: Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices. + description: 'Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices.' type: boolean routing_cooldown_period: description: The time period to wait before routing another event after the monitor | has been triggered. It follows the format of a number followed by a time unit. type: string example: 10m or 5h30m40s - pattern: ^[0-9]+[smh]$ + pattern: '^[0-9]+[smh]$' silenced: - description: If true, alerts will be created, but no notifications will be sent. + description: 'If true, alerts will be created, but no notifications will be sent.' type: boolean source_selector: - description: A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value. + description: 'A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.' type: string example: body.temperature source_type: @@ -5907,7 +5907,7 @@ components: description: True if originated from an edge source. type: boolean id: - description: Note name/identifier (e.g., "1:435", "my_note"). + description: 'Note name/identifier (e.g., "1:435", "my_note").' type: string payload: description: Optional base64-encoded payload. @@ -5942,7 +5942,7 @@ components: type: object properties: id: - description: Notefile id (e.g., "test.qi", "config.db"). + description: 'Notefile id (e.g., "test.qi", "config.db").' type: string notes: type: array @@ -5955,7 +5955,7 @@ components: - id - notes NotefileList: - description: Array of notefiles, each containing its notes. + description: 'Array of notefiles, each containing its notes.' type: array items: $ref: '#/components/schemas/Notefile' @@ -6042,7 +6042,7 @@ components: default: http uid: type: string - default: route:8d65a087d5d290ce5bdf03aeff2becc0 + default: 'route:8d65a087d5d290ce5bdf03aeff2becc0' OAuth2Error: type: object properties: @@ -6109,7 +6109,7 @@ components: format: date-time nullable: true last_used: - description: When it was last used, if ever + description: 'When it was last used, if ever' type: string format: date-time nullable: true @@ -6117,7 +6117,7 @@ components: description: Name for this API Key type: string suspended: - description: if true, this token cannot be used + description: 'if true, this token cannot be used' type: boolean uid: description: Unique and public identifier @@ -6135,7 +6135,7 @@ components: name: type: string suspended: - description: if true, the token is temporarily suspended + description: 'if true, the token is temporarily suspended' type: boolean required: - expiresAt @@ -6352,7 +6352,7 @@ components: type: object properties: attn: - description: If true, an error was returned when routing + description: 'If true, an error was returned when routing' type: boolean date: description: The date of the logs. @@ -6382,7 +6382,7 @@ components: type: object properties: format: - description: Output format for transformed data (e.g., "json", "xml", "text"). + description: 'Output format for transformed data (e.g., "json", "xml", "text").' type: string example: json jsonata: @@ -6487,7 +6487,7 @@ components: psid: description: Provider-specific identifier for the satellite subscription type: string - example: skylo:5746354465786 + example: 'skylo:5746354465786' satellite_data_usage: $ref: '#/components/schemas/SatelliteDataUsage' nullable: true @@ -6561,7 +6561,7 @@ components: - text - blocks text: - description: The text of the message, or the blocks definition + description: 'The text of the message, or the blocks definition' type: string token: description: The bearer token for the Slack app. @@ -6603,7 +6603,7 @@ components: - text - blocks text: - description: The text of the message, or the blocks definition + description: 'The text of the message, or the blocks definition' type: string url: description: The URL of the Slack webhook. @@ -6712,7 +6712,7 @@ components: mnc: description: Mobile Network Code type: integer - n: + 'n': description: Name of the location type: string source: @@ -6825,7 +6825,7 @@ components: period: type: string format: date-time - example: 2025-07-23T00:00:00Z + example: '2025-07-23T00:00:00Z' total_bytes: type: integer format: int64 @@ -6849,16 +6849,16 @@ components: type: object properties: billable_events: - description: Events that are billable, this include all events except platform events + description: 'Events that are billable, this include all events except platform events' type: integer format: int64 example: 10 device: type: string - example: dev:123456789012345 + example: 'dev:123456789012345' fleet: type: string - example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' notefiles: description: Count of events per notefile. Only present when includeNotefiles=true is specified. type: object @@ -6872,14 +6872,14 @@ components: period: type: string format: date-time - example: 2025-07-23T00:00:00Z + example: '2025-07-23T00:00:00Z' platform_events: - description: Total platform events. Platform events are _log, _session, _health, and _geolocate events some of which are send from the device, some generated by notehub. These events are not billed. + description: 'Total platform events. Platform events are _log, _session, _health, and _geolocate events some of which are send from the device, some generated by notehub. These events are not billed.' type: integer format: int64 example: 15 total_days_in_period: - description: The total number of days in this period. Useful for calculating daily averages for month period. Note that the current period will be the total number of days in the current period, including days in the future. + description: 'The total number of days in this period. Useful for calculating daily averages for month period. Note that the current period will be the total number of days in the current period, including days in the future.' type: integer format: int32 total_devices: @@ -6887,7 +6887,7 @@ components: type: integer format: int64 total_events: - description: Total events the device sent to notehub, including associated notehub generated events + description: 'Total events the device sent to notehub, including associated notehub generated events' type: integer format: int64 example: 42 @@ -6904,7 +6904,7 @@ components: example: 2 nullable: true watchdog_events: - description: Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time. + description: 'Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time.' type: integer format: int64 example: 10 @@ -6941,11 +6941,11 @@ components: period: type: string format: date-time - example: 2025-07-23T00:00:00Z + example: '2025-07-23T00:00:00Z' route: description: The route UID (only present when aggregate is 'route') type: string - example: route:cbd20093cba58392c9f9bbdd0cdeb1a0 + example: 'route:cbd20093cba58392c9f9bbdd0cdeb1a0' successful_routes: type: integer format: int64 @@ -6964,7 +6964,7 @@ components: properties: device: type: string - example: dev:123456789012345 + example: 'dev:123456789012345' first_sync_sessions: description: Number of first sync sessions in this period type: integer @@ -6972,17 +6972,17 @@ components: example: 2 fleet: type: string - example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' period: type: string format: date-time - example: 2025-07-23T00:00:00Z + example: '2025-07-23T00:00:00Z' sessions: type: integer format: int64 example: 12 sessions_by_transport: - description: Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan) + description: 'Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan)' type: object example: cell: 8 @@ -7012,7 +7012,7 @@ components: - total_bytes - total_devices UsageTruncatedField: - description: If the data is truncated that means that the parameters selected resulted in a response of over | the requested limit of data points, in order to ensure + description: 'If the data is truncated that means that the parameters selected resulted in a response of over | the requested limit of data points, in order to ensure' type: boolean properties: {} UserDfuStateMachine: @@ -7184,7 +7184,7 @@ components: - has_more example: events: - - app: app:218f6217-9f78-432e-9fe0-02ca8b5a216c + - app: 'app:218f6217-9f78-432e-9fe0-02ca8b5a216c' best_country: US best_id: My Device best_lat: 34.82476372 @@ -7198,15 +7198,15 @@ components: pressure: 97705.66 temperature: 24.0625 voltage: 2.598 - device: dev:5c0272311928 + device: 'dev:5c0272311928' event: dfa3747d-688b-4250-935b-5dd60354313c file: air.qo - product: product:com.blues.project.demo + product: 'product:com.blues.project.demo' received: 1656011227.006928 req: note.add session: b623132c-6afb-4740-bc39-e3634e38f064 sn: My Device - tower_id: 0,0,0,0 + tower_id: '0,0,0,0' tri_country: US tri_lat: 34.82475372 tri_location: Atlanta GA @@ -7245,7 +7245,7 @@ components: - has_more example: events: - - app: app:218f6217-9f78-432e-9fe0-02ca8b5a216c + - app: 'app:218f6217-9f78-432e-9fe0-02ca8b5a216c' best_country: US best_id: My Device best_lat: 34.82476372 @@ -7259,15 +7259,15 @@ components: pressure: 97705.66 temperature: 24.0625 voltage: 2.598 - device: dev:5c0272311928 + device: 'dev:5c0272311928' event: dfa3747d-688b-4250-935b-5dd60354313c file: air.qo - product: product:com.blues.project.demo + product: 'product:com.blues.project.demo' received: 1656011227.006928 req: note.add session: b623132c-6afb-4740-bc39-e3634e38f064 sn: My Device - tower_id: 0,0,0,0 + tower_id: '0,0,0,0' tri_country: US tri_lat: 34.82475372 tri_location: Atlanta GA @@ -7314,7 +7314,7 @@ components: additionalProperties: type: string environment_variables_effective: - description: The environment variables as they will be seen by the device, fully resolved with project/fleet/device prioritization rules. + description: 'The environment variables as they will be seen by the device, fully resolved with project/fleet/device prioritization rules.' type: object additionalProperties: type: string @@ -7382,59 +7382,59 @@ components: $ref: '#/components/schemas/Event' example: latest_events: - - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 + - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' body: why: sensors.qo requested sync (sensors.qo) (TLS) - device: dev:864475040523995 + device: 'dev:864475040523995' event: 81bd2bf1-0399-4978-bc46-8f779b4af350 file: _session.qo - product: product:com.blues.app:myapp + product: 'product:com.blues.app:myapp' received: 1669667707.564694 req: session.begin session: ed18884b-f2a6-419f-b856-d28dc8f0892b tls: true tower_country: US - tower_id: 310,410,20483,184692495 + tower_id: '310,410,20483,184692495' tower_lat: 43.769062500000004 tower_location: Waverly MI tower_lon: -83.657359375 tower_timezone: America/Detroit tower_when: 1669667691 when: 1669667707 - - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 + - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' body: humid: 56.23 temp: 35.5 - device: dev:864475040523995 + device: 'dev:864475040523995' event: 916d4c81-06ae-4263-9b55-7a3a0f73cb5a file: data.qo - product: product:com.blues.app:myapp + product: 'product:com.blues.app:myapp' received: 1669667713.221659 req: note.add session: 28cdc39f-9f62-4789-b0a3-2f35f9448ced sn: tj-1 tower_country: US - tower_id: 310,410,20483,184692495 + tower_id: '310,410,20483,184692495' tower_lat: 43.769062500000004 tower_location: Waverly MI tower_lon: -83.657359375 tower_timezone: America/Detroit tower_when: 1669667677 when: 1669667689 - - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 + - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' body: humidity: 69.88647200683693 pressure: 993.6294496104914 temp: 21.273027181770885 - device: dev:864475040523995 + device: 'dev:864475040523995' event: e98c2c3b-edbe-4fe7-af57-2196cc843eb7 file: sensors.qo - product: product:com.blues.app:myapp + product: 'product:com.blues.app:myapp' received: 1669667711.85316 req: note.add session: 7211392c-6895-43f8-9256-790655348be5 tower_country: US - tower_id: 310,410,20483,184692496 + tower_id: '310,410,20483,184692496' tower_lat: 43.747037500000005 tower_location: Waverly MI tower_lon: -83.665859375 @@ -7499,12 +7499,12 @@ components: - apn: a-notehub.com.attz bars: 2 bearer: LTE FDD - cell: 310,410,17169,77315594 + cell: '310,410,17169,77315594' continuous: true - device: dev:000000000000000 + device: 'dev:000000000000000' events: 14 fleets: - - fleet:46be9834-5te6-42c1-0000-b5ea05e248d7 + - 'fleet:46be9834-5te6-42c1-0000-b5ea05e248d7' hp_cycles_data: 3 hp_cycles_total: 3 hp_secs_data: 7659 @@ -7520,7 +7520,7 @@ components: notes_sent: 12 sessions_tls: 1 since: 1667250832 - product: product:com.blues.demo:project + product: 'product:com.blues.demo:project' rat: lte rsrp: -91 rsrq: -13 @@ -7539,7 +7539,7 @@ components: lon: -89.44239062499999 mcc: 310 mnc: 410 - n: Shorewood Hills WI + 'n': Shorewood Hills WI time: 1667250835 towers: 1 zone: America/Chicago @@ -7566,14 +7566,14 @@ components: device: description: The device UID this usage data belongs to (only present when aggregate is 'device') type: string - example: dev:123456789012345 + example: 'dev:123456789012345' device_count: description: the number of devices represented by this data point type: integer fleet: description: The fleet UID this usage data belongs to (only present when aggregate is 'fleet') type: string - example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' iccid: description: The ICCID of the cellular SIM card (only present when type is 'cellular') type: string @@ -7581,7 +7581,7 @@ components: psid: description: The PSID (Packet Service ID) of the satellite (or other packet-based device) type: string - example: skylo:5746354465786 + example: 'skylo:5746354465786' type: description: The type of connectivity type: string @@ -7650,10 +7650,10 @@ tags: name: webhook - description: APIs for events and sessions for external devices name: external devices - - description: Project Usage information related to events, route logs, sessions, and data usage + - description: 'Project Usage information related to events, route logs, sessions, and data usage' name: usage - description: Batch job operations name: jobs externalDocs: description: Find out more about Blues - url: https://blues.io + url: 'https://blues.io' From 5f520b1c163f386ceac4298d3c6dedf3d6d35670 Mon Sep 17 00:00:00 2001 From: "blues-hub-automation[bot]" Date: Wed, 13 May 2026 20:57:42 +0000 Subject: [PATCH 07/12] feat: Update OpenAPI file replicated from Notehub commit d8f1c51 --- openapi.yaml | 664 +++++++++++++++++++++++++-------------------------- 1 file changed, 332 insertions(+), 332 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 0b9ce19..c5987b7 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3,14 +3,14 @@ info: contact: email: engineering@blues.io name: Blues Engineering - url: 'https://dev.blues.io/support/' + url: https://dev.blues.io/support/ description: | The OpenAPI definition for the Notehub.io API. title: Notehub API version: 1.2.0 servers: - description: Production server - url: 'https://api.notefile.net' + url: https://api.notefile.net paths: /auth/login: post: @@ -147,7 +147,7 @@ paths: - billing_account x-custom-attributes: permission: read - '/v1/billing-accounts/{billingAccountUID}': + /v1/billing-accounts/{billingAccountUID}: get: operationId: GetBillingAccount description: Get Billing Account Information @@ -197,7 +197,7 @@ paths: - billing_account x-custom-attributes: permission: read - '/v1/billing-accounts/{billingAccountUID}/balance-history': + /v1/billing-accounts/{billingAccountUID}/balance-history: get: operationId: GetBillingAccountBalanceHistory description: Get Billing Account Balance history @@ -239,7 +239,7 @@ paths: - billing_account x-custom-attributes: permission: read - '/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 @@ -279,15 +279,15 @@ paths: - device x-custom-attributes: permission: update - '/v1/products/{productUID}/devices/{deviceUID}/webhook-event': + /v1/products/{productUID}/devices/{deviceUID}/webhook-event: post: operationId: CreateLegacyWebhookEvent - description: 'Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload.' + description: Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload. parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/deviceUIDParam' requestBody: - description: 'A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload.' + description: A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload. required: true content: application/json: @@ -321,8 +321,8 @@ paths: - webhook x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/devices/{deviceUID}/webhook-session': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/devices/{deviceUID}/webhook-session: put: operationId: UpdateLegacyWebhookSession description: Legacy endpoint for opening or updating a webhook session for the given device (provisioning the device if necessary). Used by external services that need to maintain a callable session against a device behind a webhook. @@ -348,8 +348,8 @@ paths: - webhook x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/ext-devices/{deviceUID}/event': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/ext-devices/{deviceUID}/event: post: operationId: CreateEventExtDevice description: Creates an event using specified webhook @@ -374,8 +374,8 @@ paths: - external devices x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/ext-devices/{deviceUID}/session/close': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/ext-devices/{deviceUID}/session/close: post: operationId: ExtDeviceSessionClose description: Closes the session for the specified device if open @@ -400,8 +400,8 @@ paths: - external devices x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/ext-devices/{deviceUID}/session/open': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/ext-devices/{deviceUID}/session/open: post: operationId: ExtDeviceSessionOpen description: Create a Session for the specified device. | If a session is currently open it will be closed and a new one opened. @@ -426,8 +426,8 @@ paths: - external devices x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/project': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/project: get: operationId: GetProjectByProduct description: Get a Project by ProductUID @@ -453,11 +453,11 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event': + resource: blues:resources:app:APPSERIAL:settings + /v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event: post: operationId: CreateWebhookDeviceEventByProduct - description: 'Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook''s configured JSONata transform, if any, is applied before routing.' + description: Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -481,11 +481,11 @@ paths: - webhook x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/webhooks/{webhookUID}/event': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/webhooks/{webhookUID}/event: post: operationId: CreateWebhookEventByProduct - description: 'Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook''s configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device.' + description: Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device. parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -508,11 +508,11 @@ paths: - webhook x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/products/{productUID}/webhooks/{webhookUID}/settings': + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/webhooks/{webhookUID}/settings: get: operationId: GetWebhookSettingsByProduct - description: 'Retrieves the configuration settings for the specified webhook, addressed by productUID.' + description: Retrieves the configuration settings for the specified webhook, addressed by productUID. parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -531,10 +531,10 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings put: operationId: UpdateWebhookSettingsByProduct - description: 'Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings.' + description: Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings. parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -558,7 +558,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings /v1/projects: get: operationId: GetProjects @@ -619,7 +619,7 @@ paths: - project x-custom-attributes: permission: create - '/v1/projects/{projectOrProductUID}': + /v1/projects/{projectOrProductUID}: delete: operationId: DeleteProject description: Delete a Project by ProjectUID @@ -636,7 +636,7 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings get: operationId: GetProject description: Get a Project by ProjectUID @@ -657,8 +657,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/alerts': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/alerts: get: operationId: GetAlerts description: Get list of defined Alerts @@ -678,8 +678,8 @@ paths: - alert x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/aws-role-config': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/aws-role-config: get: operationId: GetAWSRoleConfig summary: Get AWS role configuration for role-based authentication @@ -703,8 +703,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/clone': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/clone: post: operationId: CloneProject description: Clone a Project @@ -719,7 +719,7 @@ paths: type: object properties: billing_account_uid: - description: 'The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned.' + description: The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned. type: string disable_clone_fleets: description: Whether to disallow the cloning of the fleets from the parent project. Default is false if not specified. @@ -748,8 +748,8 @@ paths: - project x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/devices': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/devices: get: operationId: GetDevices description: Get Devices of a Project @@ -777,8 +777,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}: delete: operationId: DeleteDevice description: Delete Device @@ -793,7 +793,7 @@ paths: - device x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices get: operationId: GetDevice description: Get Device @@ -812,11 +812,11 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history': + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history: get: operationId: GetDeviceDfuHistory description: Get device DFU history for host or Notecard firmware @@ -839,8 +839,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status: get: operationId: GetDeviceDfuStatus description: Get device DFU history for host or Notecard firmware @@ -863,8 +863,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable: post: operationId: DisableDevice description: Disable Device @@ -882,8 +882,8 @@ paths: - device x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable: post: operationId: EnableDevice description: Enable Device @@ -901,8 +901,8 @@ paths: - device x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy: get: operationId: GetDeviceEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -926,8 +926,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables: get: operationId: GetDeviceEnvironmentVariables description: Get environment variables of a device @@ -942,7 +942,7 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -967,8 +967,8 @@ paths: - device x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}: delete: operationId: DeleteDeviceEnvironmentVariable description: Delete environment variable of a device @@ -992,8 +992,8 @@ paths: - device x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files: delete: operationId: DeleteNotefiles description: Deletes Notefiles and the Notes they contain. @@ -1023,7 +1023,7 @@ paths: - device x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:notefiles' + resource: blues:resources:app:APPSERIAL:notefiles get: operationId: ListNotefiles description: Lists .qi and .db files for the device @@ -1059,8 +1059,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:notefiles' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets': + resource: blues:resources:app:APPSERIAL:notefiles + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets: delete: operationId: DeleteDeviceFromFleets description: Remove Device from Fleets @@ -1091,7 +1091,7 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices get: operationId: GetDeviceFleets description: Get Device Fleets @@ -1106,7 +1106,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1140,8 +1140,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log: get: operationId: GetDeviceHealthLog description: Get Device Health Log @@ -1333,8 +1333,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}: post: operationId: CreateNotefile description: Creates an empty Notefile on the device. @@ -1353,11 +1353,11 @@ paths: - device x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notefiles' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}': + resource: blues:resources:app:APPSERIAL:notefiles + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}: get: operationId: GetNotefile - description: 'For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile' + description: For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1405,10 +1405,10 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:notefiles' + resource: blues:resources:app:APPSERIAL:notefiles post: operationId: AddQiNote - description: 'Adds a Note to a Notefile, creating the Notefile if it doesn''t yet exist.' + description: Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist. parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1431,8 +1431,8 @@ paths: - device x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}': + resource: blues:resources:app:APPSERIAL:notes + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}: delete: operationId: DeleteNote description: Delete a note from a .db or .qi notefile @@ -1452,7 +1452,7 @@ paths: - device x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:notes' + resource: blues:resources:app:APPSERIAL:notes get: operationId: GetDbNote description: Get a note from a .db or .qi notefile @@ -1498,7 +1498,7 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:notes' + resource: blues:resources:app:APPSERIAL:notes post: operationId: AddDbNote description: Add a Note to a .db notefile. if noteID is '-' then payload is ignored and empty notefile is created @@ -1525,7 +1525,7 @@ paths: - device x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:notes' + resource: blues:resources:app:APPSERIAL:notes put: operationId: UpdateDbNote description: Update a note in a .db or .qi notefile @@ -1552,11 +1552,11 @@ paths: - device x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:notes' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans': + resource: blues:resources:app:APPSERIAL:notes + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans: get: operationId: GetDevicePlans - description: 'Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections.' + description: Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections. responses: '200': $ref: '#/components/responses/DevicePlansResponse' @@ -1568,11 +1568,11 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision': + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision: post: operationId: ProvisionDevice description: Provision Device for a Project @@ -1617,8 +1617,8 @@ paths: - device x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key: get: operationId: GetDevicePublicKey description: Get Device Public Key @@ -1648,8 +1648,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions: get: operationId: GetDeviceSessions description: Get Device Sessions @@ -1672,8 +1672,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal: post: operationId: SignalDevice description: Send a signal from Notehub to a Notecard. @@ -1706,8 +1706,8 @@ paths: - device x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/devices/public-keys': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/public-keys: get: operationId: GetDevicePublicKeys description: Get Device Public Keys of a Project @@ -1745,8 +1745,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}: post: operationId: PerformDfuAction description: Update/cancel host or notecard firmware updates @@ -1781,8 +1781,8 @@ paths: - project x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history: get: operationId: GetDevicesDfuHistory description: Get host or Notecard DFU history for all devices that match the filter criteria @@ -1817,8 +1817,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status: get: operationId: GetDevicesDfuStatus description: Get host or Notecard DFU history for all devices that match the filter criteria @@ -1853,8 +1853,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/environment_hierarchy': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/environment_hierarchy: get: operationId: GetProjectEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -1877,8 +1877,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/environment_variables': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/environment_variables: get: operationId: GetProjectEnvironmentVariables description: Get environment variables of a project @@ -1893,7 +1893,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' put: @@ -1915,8 +1915,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/environment_variables/{key}': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/environment_variables/{key}: delete: operationId: DeleteProjectEnvironmentVariable description: Delete an environment variable of a project by key @@ -1939,8 +1939,8 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/events': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/events: get: operationId: GetEvents description: Get Events of a Project @@ -1989,8 +1989,8 @@ paths: - event x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/events-cursor': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/events-cursor: get: operationId: GetEventsByCursor description: Get Events of a Project by cursor @@ -2014,8 +2014,8 @@ paths: - event x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs: get: operationId: GetRouteLogsByEvent description: Get Route Logs by Event UID @@ -2039,8 +2039,8 @@ paths: - event x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/firmware': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/firmware: get: operationId: GetFirmwareInfo description: Get Available Firmware Information @@ -2072,8 +2072,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}: delete: operationId: DeleteFirmware description: | @@ -2103,7 +2103,7 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings get: operationId: DownloadFirmware description: Download firmware binary @@ -2131,7 +2131,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings post: operationId: UpdateFirmware description: | @@ -2172,7 +2172,7 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings put: operationId: UploadFirmware description: Upload firmware binary @@ -2186,7 +2186,7 @@ paths: type: string - name: version in: query - description: 'Firmware version (optional). If not provided, the version will be extracted from firmware binary if available, otherwise left empty' + description: Firmware version (optional). If not provided, the version will be extracted from firmware binary if available, otherwise left empty required: false schema: type: string @@ -2219,8 +2219,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/fleets': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/fleets: get: operationId: GetFleets description: Get Project Fleets @@ -2235,7 +2235,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:fleets' + resource: blues:resources:app:APPSERIAL:fleets parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -2252,7 +2252,7 @@ paths: connectivity_assurance: $ref: '#/components/schemas/FleetConnectivityAssurance' label: - description: 'The label, or name, for the Fleet.' + description: The label, or name, for the Fleet. type: string smart_rule: $ref: '#/components/schemas/FleetRule' @@ -2273,8 +2273,8 @@ paths: - project x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:fleets' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}': + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}: delete: operationId: DeleteFleet description: Delete Fleet @@ -2289,7 +2289,7 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:fleets' + resource: blues:resources:app:APPSERIAL:fleets get: operationId: GetFleet description: Get Fleet @@ -2306,7 +2306,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:fleets' + resource: blues:resources:app:APPSERIAL:fleets parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -2359,8 +2359,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:fleets' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices': + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices: get: operationId: GetFleetDevices description: Get Devices of a Fleet within a Project @@ -2388,8 +2388,8 @@ paths: - device x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy: get: operationId: GetFleetEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -2413,8 +2413,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:fleets' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables': + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables: get: operationId: GetFleetEnvironmentVariables description: Get environment variables of a fleet @@ -2429,7 +2429,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:fleets' + resource: blues:resources:app:APPSERIAL:fleets parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -2454,8 +2454,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:fleets' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}': + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}: delete: operationId: DeleteFleetEnvironmentVariable description: Delete environment variables of a fleet @@ -2479,8 +2479,8 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:fleets' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events': + resource: blues:resources:app:APPSERIAL:fleets + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events: get: operationId: GetFleetEvents description: Get Events of a Fleet @@ -2529,8 +2529,8 @@ paths: - event x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor: get: operationId: GetFleetEventsByCursor description: Get Events of a Fleet by cursor @@ -2556,8 +2556,8 @@ paths: - event x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/global-transformation': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/global-transformation: post: operationId: SetGlobalEventTransformation description: Set the project-level event JSONata transformation @@ -2581,8 +2581,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/global-transformation/disable': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/global-transformation/disable: post: operationId: DisableGlobalEventTransformation description: Disable the project-level event JSONata transformation @@ -2599,8 +2599,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/global-transformation/enable': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/global-transformation/enable: post: operationId: EnableGlobalEventTransformation description: Enable the project-level event JSONata transformation @@ -2617,8 +2617,8 @@ paths: - project x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/jobs': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs: get: operationId: GetJobs description: List all batch jobs for a project @@ -2635,7 +2635,7 @@ paths: - jobs x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings post: operationId: CreateJob description: Create a new batch job with an optional name @@ -2668,8 +2668,8 @@ paths: - jobs x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/jobs/{jobUID}': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/{jobUID}: delete: operationId: DeleteJob description: Delete a batch job @@ -2689,7 +2689,7 @@ paths: - jobs x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings get: operationId: GetJob description: Get a specific batch job definition @@ -2709,8 +2709,8 @@ paths: - jobs x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/jobs/{jobUID}/run': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/{jobUID}/run: post: operationId: RunJob description: Execute a batch job @@ -2737,8 +2737,8 @@ paths: - jobs x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs: get: operationId: GetJobRuns description: List all runs for a specific job @@ -2771,8 +2771,8 @@ paths: - jobs x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}: get: operationId: GetJobRun description: Get the result of a job execution @@ -2792,8 +2792,8 @@ paths: - jobs x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel: post: operationId: CancelJobRun description: Cancel a running job execution @@ -2813,8 +2813,8 @@ paths: - jobs x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/members': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/members: get: operationId: GetProjectMembers description: Get Project Members @@ -2840,10 +2840,10 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:accounts' + resource: blues:resources:app:APPSERIAL:accounts parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - '/v1/projects/{projectOrProductUID}/monitors': + /v1/projects/{projectOrProductUID}/monitors: get: operationId: GetMonitors description: Get list of defined Monitors @@ -2860,7 +2860,7 @@ paths: - monitor x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices post: operationId: CreateMonitor description: Create a new Monitor @@ -2888,8 +2888,8 @@ paths: - monitor x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/monitors/{monitorUID}': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/monitors/{monitorUID}: delete: operationId: DeleteMonitor description: Delete Monitor @@ -2911,7 +2911,7 @@ paths: - monitor x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices get: operationId: GetMonitor description: Get Monitor @@ -2933,7 +2933,7 @@ paths: - monitor x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:devices' + resource: blues:resources:app:APPSERIAL:devices put: operationId: UpdateMonitor description: Update Monitor @@ -2962,8 +2962,8 @@ paths: - monitor x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:devices' - '/v1/projects/{projectOrProductUID}/products': + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/products: get: operationId: GetProducts description: Get Products within a Project @@ -2987,7 +2987,7 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:products' + resource: blues:resources:app:APPSERIAL:products parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -3006,7 +3006,7 @@ paths: items: type: string disable_devices_by_default: - description: 'If `true`, devices provisioned to this product will be automatically disabled by default.' + description: If `true`, devices provisioned to this product will be automatically disabled by default. type: boolean label: description: The label for the Product. @@ -3032,8 +3032,8 @@ paths: - project x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/products/{productUID}': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/products/{productUID}: delete: operationId: DeleteProduct description: Delete a product @@ -3048,11 +3048,11 @@ paths: - project x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/productUIDParam' - '/v1/projects/{projectOrProductUID}/routes': + /v1/projects/{projectOrProductUID}/routes: get: operationId: GetRoutes description: Get all Routes within a Project @@ -3066,34 +3066,34 @@ paths: example: - disabled: false label: success route - modified: '2020-03-09T17:58:37Z' + modified: 2020-03-09T17:58:37Z type: http - uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + uid: route:8d65a087d5d290ce5bdf03aeff2becc0 - disabled: false label: failing route - modified: '2020-03-09T17:59:15Z' + modified: 2020-03-09T17:59:15Z type: http - uid: 'route:a9eaad31d5cee8d01a42762f71fb777a' + uid: route:a9eaad31d5cee8d01a42762f71fb777a - disabled: true label: disabled route - modified: '2020-03-09T17:59:44Z' + modified: 2020-03-09T17:59:44Z type: http - uid: 'route:02ddc0e6e236c2a7e482da62047229ad' + uid: route:02ddc0e6e236c2a7e482da62047229ad - disabled: false label: Proxy Route - modified: '2020-03-09T17:58:36Z' + modified: 2020-03-09T17:58:36Z type: proxy - uid: 'route:0ac565deb7b478a250bb82348b9cfdd4' + uid: route:0ac565deb7b478a250bb82348b9cfdd4 - disabled: false label: Myjsonlive Webtest - modified: '2020-03-09T17:58:35Z' + modified: 2020-03-09T17:58:35Z type: proxy - uid: 'route:fb1b9e0aba1bf030311ba2c3c1e3efd7' + uid: route:fb1b9e0aba1bf030311ba2c3c1e3efd7 - disabled: false label: Myjsonlive Echo - modified: '2020-03-09T17:58:34Z' + modified: 2020-03-09T17:58:34Z type: proxy - uid: 'route:7804818f84a3be6193e14d804fe7fca7' + uid: route:7804818f84a3be6193e14d804fe7fca7 schema: type: array items: @@ -3107,7 +3107,7 @@ paths: - route x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:routes' + resource: blues:resources:app:APPSERIAL:routes post: operationId: CreateRoute description: Create Route within a Project @@ -3126,13 +3126,13 @@ paths: disable_http_headers: false filter: {} fleets: - - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d http_headers: X-My-Header: value throttle_ms: 100 timeout: 5000 transform: {} - url: 'https://example.com/ingest' + url: https://example.com/ingest label: Route Label schema: $ref: '#/components/schemas/NotehubRoute' @@ -3149,16 +3149,16 @@ paths: system_notefiles: false type: '' fleets: - - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d http_headers: null throttle_ms: 100 timeout: 0 transform: {} - url: 'http://route.url' + url: http://route.url label: Route Label - modified: '2020-03-09T17:59:44Z' + modified: 2020-03-09T17:59:44Z type: http - uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + uid: route:8d65a087d5d290ce5bdf03aeff2becc0 schema: $ref: '#/components/schemas/NotehubRoute' default: @@ -3169,8 +3169,8 @@ paths: - route x-custom-attributes: permission: create - resource: 'blues:resources:app:APPSERIAL:routes' - '/v1/projects/{projectOrProductUID}/routes/{routeUID}': + resource: blues:resources:app:APPSERIAL:routes + /v1/projects/{projectOrProductUID}/routes/{routeUID}: delete: operationId: DeleteRoute description: Delete single route within a project @@ -3188,7 +3188,7 @@ paths: - route x-custom-attributes: permission: delete - resource: 'blues:resources:app:APPSERIAL:routes' + resource: blues:resources:app:APPSERIAL:routes get: operationId: GetRoute description: Get single route within a project @@ -3208,16 +3208,16 @@ paths: system_notefiles: false type: '' fleets: - - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d http_headers: null throttle_ms: 100 timeout: 0 transform: {} - url: 'http://route.url' + url: http://route.url label: Route Label - modified: '2020-03-09T17:59:44Z' + modified: 2020-03-09T17:59:44Z type: http - uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + uid: route:8d65a087d5d290ce5bdf03aeff2becc0 schema: $ref: '#/components/schemas/NotehubRoute' default: @@ -3228,7 +3228,7 @@ paths: - route x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:routes' + resource: blues:resources:app:APPSERIAL:routes put: operationId: UpdateRoute description: Update route by UID @@ -3291,8 +3291,8 @@ paths: - route x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:routes' - '/v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs': + resource: blues:resources:app:APPSERIAL:routes + /v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs: get: operationId: GetRouteLogsByRoute description: Get Route Logs by Route UID @@ -3328,8 +3328,8 @@ paths: - route x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:routes' - '/v1/projects/{projectOrProductUID}/schemas': + resource: blues:resources:app:APPSERIAL:routes + /v1/projects/{projectOrProductUID}/schemas: get: operationId: GetNotefileSchemas summary: Get variable format for a notefile @@ -3350,8 +3350,8 @@ paths: - project x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/usage/data': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/usage/data: get: operationId: GetDataUsage description: Get data usage in bytes for a project with time range and period aggregation @@ -3394,11 +3394,11 @@ paths: - usage x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/usage/events': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/usage/events: get: operationId: GetEventsUsage - description: 'Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' + description: Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -3439,7 +3439,7 @@ paths: style: form - name: skipRecentData in: query - description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' + description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. required: false schema: type: boolean @@ -3466,11 +3466,11 @@ paths: - usage x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/usage/route-logs': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/usage/route-logs: get: operationId: GetRouteLogsUsage - description: 'Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' + description: Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -3499,7 +3499,7 @@ paths: - project - name: skipRecentData in: query - description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' + description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. required: false schema: type: boolean @@ -3515,11 +3515,11 @@ paths: - usage x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/usage/sessions': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/usage/sessions: get: operationId: GetSessionsUsage - description: 'Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' + description: Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -3550,7 +3550,7 @@ paths: - project - name: skipRecentData in: query - description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' + description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. required: false schema: type: boolean @@ -3566,8 +3566,8 @@ paths: - usage x-custom-attributes: permission: read - resource: 'blues:resources:app:APPSERIAL:events' - '/v1/projects/{projectOrProductUID}/webhooks': + resource: blues:resources:app:APPSERIAL:events + /v1/projects/{projectOrProductUID}/webhooks: get: operationId: GetWebhooks description: Retrieves all webhooks for the specified project @@ -3593,8 +3593,8 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' - '/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}': + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/webhooks/{webhookUID}: delete: operationId: DeleteWebhook description: Deletes the specified webhook @@ -3612,7 +3612,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings get: operationId: GetWebhook description: Retrieves the configuration settings for the specified webhook @@ -3634,7 +3634,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings post: operationId: CreateWebhook description: Creates a webhook for the specified product with the given name. The name | must be unique within the project. @@ -3663,7 +3663,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings put: operationId: UpdateWebhook description: Updates the configuration settings for the specified webhook. | Webhook will be created if it does not exist. Update body will completely replace the existing settings. @@ -3690,7 +3690,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: 'blues:resources:app:APPSERIAL:settings' + resource: blues:resources:app:APPSERIAL:settings components: parameters: billingAccountUIDParam: @@ -3709,7 +3709,7 @@ components: schema: type: string datasetAggregateWindowQueryParam: - description: 'Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format' + description: Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format in: query name: aggregate_window required: false @@ -3723,7 +3723,7 @@ components: schema: type: boolean datasetEndQueryParam: - description: 'End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used.' + description: End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. in: query name: end required: false @@ -3737,15 +3737,15 @@ components: schema: type: integer datasetLocationNearQueryParam: - description: 'Latitude and Longitude for location-based filtering, location_near_radius must also be provided' + description: Latitude and Longitude for location-based filtering, location_near_radius must also be provided in: query name: location_near required: false schema: type: string - example: '42.393125,-71.185015' + example: 42.393125,-71.185015 datasetLocationRadiusQueryParam: - description: 'Distance from location_near in meters, location_near must also be provided' + description: Distance from location_near in meters, location_near must also be provided in: query name: location_near_radius required: false @@ -3766,28 +3766,28 @@ components: schema: type: string datasetSelectQueryParam: - description: 'Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent).' + description: Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent). in: query name: select required: false schema: type: string datasetStartQueryParam: - description: 'Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format.' + description: Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. in: query name: start required: true schema: type: string datasetWhereQueryParam: - description: 'Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100))' + description: Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100)) in: query name: where required: false schema: type: string dateTypeParam: - description: 'Which date to filter on, either ''captured'' or ''uploaded''. This will apply to the startDate and endDate parameters' + description: Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters example: uploaded in: query name: dateType @@ -3807,7 +3807,7 @@ components: items: type: string deviceUIDParam: - example: 'dev:000000000000000' + example: dev:000000000000000 in: path name: deviceUID required: true @@ -3843,7 +3843,7 @@ components: - update - cancel endDateParam: - description: 'End date for filtering results, specified as a Unix timestamp' + description: End date for filtering results, specified as a Unix timestamp example: 1657894210 in: query name: endDate @@ -3877,7 +3877,7 @@ components: schema: type: string filesQueryParam: - example: '_health.qo, data.qo' + example: _health.qo, data.qo in: query name: files required: false @@ -3897,7 +3897,7 @@ components: - version - length firmwareSortOrderParam: - description: 'Sort order (asc for ascending, desc for descending)' + description: Sort order (asc for ascending, desc for descending) in: query name: sortOrder required: false @@ -3923,7 +3923,7 @@ components: schema: type: string firstSyncParam: - description: 'When true, filters results to only show first sync sessions' + description: When true, filters results to only show first sync sessions in: query name: firstSync required: false @@ -4025,7 +4025,7 @@ components: schema: type: string monitorUIDParam: - example: 'monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad' + example: monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad in: path name: monitorUID required: true @@ -4092,7 +4092,7 @@ components: schema: type: string productUIDParam: - example: 'com.blues.bridge:sensors' + example: com.blues.bridge:sensors in: path name: productUID required: true @@ -4109,7 +4109,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 @@ -4136,7 +4136,7 @@ components: required: true schema: type: string - example: 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' + example: rid:2606f411-dea6-44a0-9743-1130f57d77d8 responseStatusParam: example: 500 in: query @@ -4167,7 +4167,7 @@ components: - asc - desc routeUIDParam: - example: 'route:cbd20093cba58392c9f9bbdd0cdeb1a0' + example: route:cbd20093cba58392c9f9bbdd0cdeb1a0 in: path name: routeUID required: true @@ -4197,7 +4197,7 @@ components: - failure type: string selectFieldsParam: - description: 'Comma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output.' + description: Comma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output. in: query name: selectFields required: false @@ -4275,7 +4275,7 @@ components: - asc - desc startDateParam: - description: 'Start date for filtering results, specified as a Unix timestamp' + description: Start date for filtering results, specified as a Unix timestamp example: 1628631763 in: query name: startDate @@ -4434,7 +4434,7 @@ components: type: number type: object resolved: - description: 'If true, the alert has been resolved' + description: If true, the alert has been resolved type: boolean source: description: The UID of the source of the alert @@ -4593,9 +4593,9 @@ components: type: integer format: int64 plan_type: - description: 'Description of the SIM plan type including data allowance, region, and validity period' + description: Description of the SIM plan type including data allowance, region, and validity period type: string - example: '500MB, North America, 10-year lifetime' + example: 500MB, North America, 10-year lifetime CellularUsage: type: array items: @@ -4707,7 +4707,7 @@ components: description: Last updated timestamp type: number version: - description: 'Last known version, which is generally a JSON object contained within the firmware image' + description: Last known version, which is generally a JSON object contained within the firmware image type: string nullable: true DataField: @@ -4996,7 +4996,7 @@ components: bssid: type: string cell: - description: 'Cell ID where the session originated and quality ("mcc,mnc,lac,cellid")' + description: Cell ID where the session originated and quality ("mcc,mnc,lac,cellid") type: string continuous: description: Was this a continuous connection? @@ -5293,7 +5293,7 @@ components: description: Country type: string best_id: - description: 'The device serial number, or the DeviceUID if the serial number is not set' + description: The device serial number, or the DeviceUID if the serial number is not set type: string best_lat: description: Latitude @@ -5303,7 +5303,7 @@ components: description: Location type: string best_location_type: - description: 'One of "gps", "triangulated", or "tower"' + description: One of "gps", "triangulated", or "tower" type: string best_location_when: description: Unix timestamp @@ -5416,7 +5416,7 @@ components: description: Unix timestamp type: number transport: - description: 'The transport used for this event, e.g., "cellular", "wifi", ", etc.' + description: The transport used for this event, e.g., "cellular", "wifi", ", etc. type: string tri_country: description: Country @@ -5608,7 +5608,7 @@ components: enabled: true nullable: true FleetRule: - description: 'JSONata expression that will be evaluated to determine device membership into this fleet, if the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged.' + description: JSONata expression that will be evaluated to determine device membership into this fleet, if the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged. type: string properties: {} FleetsUIDList: @@ -5645,7 +5645,7 @@ components: filter: $ref: '#/components/schemas/Filter' fleets: - description: 'If non-empty, applies only to the listed fleets.' + description: If non-empty, applies only to the listed fleets. type: array items: type: string @@ -5722,7 +5722,7 @@ components: type: integer format: int64 status: - description: 'Current status (submitted, running, completed, cancelled, failed)' + description: Current status (submitted, running, completed, cancelled, failed) type: string submitted: description: Unix timestamp when submitted @@ -5773,7 +5773,7 @@ components: type: object properties: aggregate_function: - description: 'Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]' + description: Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min] type: string enum: - none @@ -5785,9 +5785,9 @@ components: description: The time window to aggregate the selected values. It follows the format of a number followed by a time unit type: string example: 10m or 5h30m40s - pattern: '^[0-9]+[smh]$' + pattern: ^[0-9]+[smh]$ alert: - description: 'If true, the monitor is in alert state.' + description: If true, the monitor is in alert state. type: boolean alert_routes: type: array @@ -5797,7 +5797,7 @@ components: - $ref: '#/components/schemas/SlackBearerNotification' - $ref: '#/components/schemas/EmailNotification' condition_type: - description: 'A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]' + description: A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to] type: string enum: - greater_than @@ -5810,7 +5810,7 @@ components: description: type: string disabled: - description: 'If true, the monitor will not be evaluated.' + description: If true, the monitor will not be evaluated. type: boolean fleet_filter: type: array @@ -5826,18 +5826,18 @@ components: items: type: string per_device: - description: 'Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices.' + description: Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices. type: boolean routing_cooldown_period: description: The time period to wait before routing another event after the monitor | has been triggered. It follows the format of a number followed by a time unit. type: string example: 10m or 5h30m40s - pattern: '^[0-9]+[smh]$' + pattern: ^[0-9]+[smh]$ silenced: - description: 'If true, alerts will be created, but no notifications will be sent.' + description: If true, alerts will be created, but no notifications will be sent. type: boolean source_selector: - description: 'A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.' + description: A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value. type: string example: body.temperature source_type: @@ -5907,7 +5907,7 @@ components: description: True if originated from an edge source. type: boolean id: - description: 'Note name/identifier (e.g., "1:435", "my_note").' + description: Note name/identifier (e.g., "1:435", "my_note"). type: string payload: description: Optional base64-encoded payload. @@ -5942,7 +5942,7 @@ components: type: object properties: id: - description: 'Notefile id (e.g., "test.qi", "config.db").' + description: Notefile id (e.g., "test.qi", "config.db"). type: string notes: type: array @@ -5955,7 +5955,7 @@ components: - id - notes NotefileList: - description: 'Array of notefiles, each containing its notes.' + description: Array of notefiles, each containing its notes. type: array items: $ref: '#/components/schemas/Notefile' @@ -6042,7 +6042,7 @@ components: default: http uid: type: string - default: 'route:8d65a087d5d290ce5bdf03aeff2becc0' + default: route:8d65a087d5d290ce5bdf03aeff2becc0 OAuth2Error: type: object properties: @@ -6109,7 +6109,7 @@ components: format: date-time nullable: true last_used: - description: 'When it was last used, if ever' + description: When it was last used, if ever type: string format: date-time nullable: true @@ -6117,7 +6117,7 @@ components: description: Name for this API Key type: string suspended: - description: 'if true, this token cannot be used' + description: if true, this token cannot be used type: boolean uid: description: Unique and public identifier @@ -6135,7 +6135,7 @@ components: name: type: string suspended: - description: 'if true, the token is temporarily suspended' + description: if true, the token is temporarily suspended type: boolean required: - expiresAt @@ -6352,7 +6352,7 @@ components: type: object properties: attn: - description: 'If true, an error was returned when routing' + description: If true, an error was returned when routing type: boolean date: description: The date of the logs. @@ -6382,7 +6382,7 @@ components: type: object properties: format: - description: 'Output format for transformed data (e.g., "json", "xml", "text").' + description: Output format for transformed data (e.g., "json", "xml", "text"). type: string example: json jsonata: @@ -6487,7 +6487,7 @@ components: psid: description: Provider-specific identifier for the satellite subscription type: string - example: 'skylo:5746354465786' + example: skylo:5746354465786 satellite_data_usage: $ref: '#/components/schemas/SatelliteDataUsage' nullable: true @@ -6561,7 +6561,7 @@ components: - text - blocks text: - description: 'The text of the message, or the blocks definition' + description: The text of the message, or the blocks definition type: string token: description: The bearer token for the Slack app. @@ -6603,7 +6603,7 @@ components: - text - blocks text: - description: 'The text of the message, or the blocks definition' + description: The text of the message, or the blocks definition type: string url: description: The URL of the Slack webhook. @@ -6712,7 +6712,7 @@ components: mnc: description: Mobile Network Code type: integer - 'n': + n: description: Name of the location type: string source: @@ -6825,7 +6825,7 @@ components: period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: 2025-07-23T00:00:00Z total_bytes: type: integer format: int64 @@ -6849,16 +6849,16 @@ components: type: object properties: billable_events: - description: 'Events that are billable, this include all events except platform events' + description: Events that are billable, this include all events except platform events type: integer format: int64 example: 10 device: type: string - example: 'dev:123456789012345' + example: dev:123456789012345 fleet: type: string - example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d notefiles: description: Count of events per notefile. Only present when includeNotefiles=true is specified. type: object @@ -6872,14 +6872,14 @@ components: period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: 2025-07-23T00:00:00Z platform_events: - description: 'Total platform events. Platform events are _log, _session, _health, and _geolocate events some of which are send from the device, some generated by notehub. These events are not billed.' + description: Total platform events. Platform events are _log, _session, _health, and _geolocate events some of which are send from the device, some generated by notehub. These events are not billed. type: integer format: int64 example: 15 total_days_in_period: - description: 'The total number of days in this period. Useful for calculating daily averages for month period. Note that the current period will be the total number of days in the current period, including days in the future.' + description: The total number of days in this period. Useful for calculating daily averages for month period. Note that the current period will be the total number of days in the current period, including days in the future. type: integer format: int32 total_devices: @@ -6887,7 +6887,7 @@ components: type: integer format: int64 total_events: - description: 'Total events the device sent to notehub, including associated notehub generated events' + description: Total events the device sent to notehub, including associated notehub generated events type: integer format: int64 example: 42 @@ -6904,7 +6904,7 @@ components: example: 2 nullable: true watchdog_events: - description: 'Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time.' + description: Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time. type: integer format: int64 example: 10 @@ -6941,11 +6941,11 @@ components: period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: 2025-07-23T00:00:00Z route: description: The route UID (only present when aggregate is 'route') type: string - example: 'route:cbd20093cba58392c9f9bbdd0cdeb1a0' + example: route:cbd20093cba58392c9f9bbdd0cdeb1a0 successful_routes: type: integer format: int64 @@ -6964,7 +6964,7 @@ components: properties: device: type: string - example: 'dev:123456789012345' + example: dev:123456789012345 first_sync_sessions: description: Number of first sync sessions in this period type: integer @@ -6972,17 +6972,17 @@ components: example: 2 fleet: type: string - example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d period: type: string format: date-time - example: '2025-07-23T00:00:00Z' + example: 2025-07-23T00:00:00Z sessions: type: integer format: int64 example: 12 sessions_by_transport: - description: 'Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan)' + description: Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan) type: object example: cell: 8 @@ -7012,7 +7012,7 @@ components: - total_bytes - total_devices UsageTruncatedField: - description: 'If the data is truncated that means that the parameters selected resulted in a response of over | the requested limit of data points, in order to ensure' + description: If the data is truncated that means that the parameters selected resulted in a response of over | the requested limit of data points, in order to ensure type: boolean properties: {} UserDfuStateMachine: @@ -7184,7 +7184,7 @@ components: - has_more example: events: - - app: 'app:218f6217-9f78-432e-9fe0-02ca8b5a216c' + - app: app:218f6217-9f78-432e-9fe0-02ca8b5a216c best_country: US best_id: My Device best_lat: 34.82476372 @@ -7198,15 +7198,15 @@ components: pressure: 97705.66 temperature: 24.0625 voltage: 2.598 - device: 'dev:5c0272311928' + device: dev:5c0272311928 event: dfa3747d-688b-4250-935b-5dd60354313c file: air.qo - product: 'product:com.blues.project.demo' + product: product:com.blues.project.demo received: 1656011227.006928 req: note.add session: b623132c-6afb-4740-bc39-e3634e38f064 sn: My Device - tower_id: '0,0,0,0' + tower_id: 0,0,0,0 tri_country: US tri_lat: 34.82475372 tri_location: Atlanta GA @@ -7245,7 +7245,7 @@ components: - has_more example: events: - - app: 'app:218f6217-9f78-432e-9fe0-02ca8b5a216c' + - app: app:218f6217-9f78-432e-9fe0-02ca8b5a216c best_country: US best_id: My Device best_lat: 34.82476372 @@ -7259,15 +7259,15 @@ components: pressure: 97705.66 temperature: 24.0625 voltage: 2.598 - device: 'dev:5c0272311928' + device: dev:5c0272311928 event: dfa3747d-688b-4250-935b-5dd60354313c file: air.qo - product: 'product:com.blues.project.demo' + product: product:com.blues.project.demo received: 1656011227.006928 req: note.add session: b623132c-6afb-4740-bc39-e3634e38f064 sn: My Device - tower_id: '0,0,0,0' + tower_id: 0,0,0,0 tri_country: US tri_lat: 34.82475372 tri_location: Atlanta GA @@ -7314,7 +7314,7 @@ components: additionalProperties: type: string environment_variables_effective: - description: 'The environment variables as they will be seen by the device, fully resolved with project/fleet/device prioritization rules.' + description: The environment variables as they will be seen by the device, fully resolved with project/fleet/device prioritization rules. type: object additionalProperties: type: string @@ -7382,59 +7382,59 @@ components: $ref: '#/components/schemas/Event' example: latest_events: - - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' + - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 body: why: sensors.qo requested sync (sensors.qo) (TLS) - device: 'dev:864475040523995' + device: dev:864475040523995 event: 81bd2bf1-0399-4978-bc46-8f779b4af350 file: _session.qo - product: 'product:com.blues.app:myapp' + product: product:com.blues.app:myapp received: 1669667707.564694 req: session.begin session: ed18884b-f2a6-419f-b856-d28dc8f0892b tls: true tower_country: US - tower_id: '310,410,20483,184692495' + tower_id: 310,410,20483,184692495 tower_lat: 43.769062500000004 tower_location: Waverly MI tower_lon: -83.657359375 tower_timezone: America/Detroit tower_when: 1669667691 when: 1669667707 - - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' + - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 body: humid: 56.23 temp: 35.5 - device: 'dev:864475040523995' + device: dev:864475040523995 event: 916d4c81-06ae-4263-9b55-7a3a0f73cb5a file: data.qo - product: 'product:com.blues.app:myapp' + product: product:com.blues.app:myapp received: 1669667713.221659 req: note.add session: 28cdc39f-9f62-4789-b0a3-2f35f9448ced sn: tj-1 tower_country: US - tower_id: '310,410,20483,184692495' + tower_id: 310,410,20483,184692495 tower_lat: 43.769062500000004 tower_location: Waverly MI tower_lon: -83.657359375 tower_timezone: America/Detroit tower_when: 1669667677 when: 1669667689 - - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' + - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 body: humidity: 69.88647200683693 pressure: 993.6294496104914 temp: 21.273027181770885 - device: 'dev:864475040523995' + device: dev:864475040523995 event: e98c2c3b-edbe-4fe7-af57-2196cc843eb7 file: sensors.qo - product: 'product:com.blues.app:myapp' + product: product:com.blues.app:myapp received: 1669667711.85316 req: note.add session: 7211392c-6895-43f8-9256-790655348be5 tower_country: US - tower_id: '310,410,20483,184692496' + tower_id: 310,410,20483,184692496 tower_lat: 43.747037500000005 tower_location: Waverly MI tower_lon: -83.665859375 @@ -7499,12 +7499,12 @@ components: - apn: a-notehub.com.attz bars: 2 bearer: LTE FDD - cell: '310,410,17169,77315594' + cell: 310,410,17169,77315594 continuous: true - device: 'dev:000000000000000' + device: dev:000000000000000 events: 14 fleets: - - 'fleet:46be9834-5te6-42c1-0000-b5ea05e248d7' + - fleet:46be9834-5te6-42c1-0000-b5ea05e248d7 hp_cycles_data: 3 hp_cycles_total: 3 hp_secs_data: 7659 @@ -7520,7 +7520,7 @@ components: notes_sent: 12 sessions_tls: 1 since: 1667250832 - product: 'product:com.blues.demo:project' + product: product:com.blues.demo:project rat: lte rsrp: -91 rsrq: -13 @@ -7539,7 +7539,7 @@ components: lon: -89.44239062499999 mcc: 310 mnc: 410 - 'n': Shorewood Hills WI + n: Shorewood Hills WI time: 1667250835 towers: 1 zone: America/Chicago @@ -7566,14 +7566,14 @@ components: device: description: The device UID this usage data belongs to (only present when aggregate is 'device') type: string - example: 'dev:123456789012345' + example: dev:123456789012345 device_count: description: the number of devices represented by this data point type: integer fleet: description: The fleet UID this usage data belongs to (only present when aggregate is 'fleet') type: string - example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' + example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d iccid: description: The ICCID of the cellular SIM card (only present when type is 'cellular') type: string @@ -7581,7 +7581,7 @@ components: psid: description: The PSID (Packet Service ID) of the satellite (or other packet-based device) type: string - example: 'skylo:5746354465786' + example: skylo:5746354465786 type: description: The type of connectivity type: string @@ -7650,10 +7650,10 @@ tags: name: webhook - description: APIs for events and sessions for external devices name: external devices - - description: 'Project Usage information related to events, route logs, sessions, and data usage' + - description: Project Usage information related to events, route logs, sessions, and data usage name: usage - description: Batch job operations name: jobs externalDocs: description: Find out more about Blues - url: 'https://blues.io' + url: https://blues.io From 85b3142dbb9ab13286095705bd7fb3fe5cf5ada7 Mon Sep 17 00:00:00 2001 From: "blues-hub-automation[bot]" Date: Fri, 15 May 2026 14:11:47 +0000 Subject: [PATCH 08/12] feat: Update OpenAPI file replicated from Notehub commit 23b3571 --- openapi.yaml | 221 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 213 insertions(+), 8 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index c5987b7..7026397 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2648,13 +2648,12 @@ paths: schema: type: string requestBody: - description: The job definition as raw JSON + description: The batch job definition required: true content: application/json: schema: - description: Job definition (structure varies by job type) - type: object + $ref: '#/components/schemas/JobDefinition' responses: '201': $ref: '#/components/responses/CreateJobResponse' @@ -2773,12 +2772,39 @@ paths: permission: read resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}: + delete: + operationId: DeleteJobRun + description: Delete the results of a job run + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/reportUIDParam' + responses: + '200': + description: Job run deleted successfully + '404': + description: Run not found + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - jobs get: operationId: GetJobRun description: Get the result of a job execution parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/reportUIDParam' + - name: view + in: query + description: "Controls the level of detail returned: 'summary' returns metadata only, 'detail' returns the full result payload" + required: false + schema: + type: string + default: summary + enum: + - summary + - detail responses: '200': $ref: '#/components/responses/GetJobRunResponse' @@ -4518,6 +4544,58 @@ components: type: string format: uri additionalProperties: false + BatchJobRequests: + description: Operations to apply to a device + type: object + properties: + comment: + type: string + connectivity_assurance_disable: + description: Disable connectivity assurance for the device + type: boolean + connectivity_assurance_enable: + description: Enable connectivity assurance for the device + type: boolean + disable: + description: Disable the device + type: boolean + enable: + description: Enable the device + type: boolean + fleets_to_default: + description: Fleet UIDs to assign to the device if it has no fleets + type: array + items: + type: string + fleets_to_join: + description: Fleet UIDs to add the device to + type: array + items: + type: string + fleets_to_leave: + description: Fleet UIDs to remove the device from + type: array + items: + type: string + provision_product: + description: Product UID to provision the device with if not already provisioned + type: string + sn_to_default: + description: Set the device serial number only if not already set + type: string + sn_to_set: + description: Set the device serial number ("-" to clear) + type: string + vars_to_default: + description: Environment variables to set only if not already set + type: object + additionalProperties: + type: string + vars_to_set: + description: Environment variables to set (use "-" as value to clear) + type: object + additionalProperties: + type: string BillingAccount: type: object properties: @@ -5676,13 +5754,23 @@ components: created_by: description: User who created the job type: string - definition: - description: Full job definition (only in detail view) - type: object - additionalProperties: true job_uid: description: Unique identifier for the job type: string + last_run_completed: + description: Unix timestamp when the most recent run completed (0 if still in progress) + type: integer + format: int64 + example: 1775252922 + last_run_status: + description: 'Status of the most recent job run. Terminal values are: "submitted", "completed successfully", "dry run completed successfully", "completed with errors", "cancelled". While a job is running, intermediate per-device progress updates may appear (e.g. "dev:000000000000000 completed", "dev:000000000000000 updated: ...").' + type: string + example: dry run completed successfully + last_run_submitted: + description: Unix timestamp when the most recent run was submitted + type: integer + format: int64 + example: 1775252900 name: description: Human-readable job name type: string @@ -5691,50 +5779,167 @@ components: - name - created - created_by + JobDefinition: + description: Batch job definition + type: object + properties: + comment: + description: Human-readable description of the job + type: string + default_requests: + $ref: '#/components/schemas/BatchJobRequests' + device_requests: + description: Device-specific request overrides, keyed by device UID + type: object + additionalProperties: + $ref: '#/components/schemas/BatchJobRequests' + report_options: + description: Controls what data is included in the job report + type: object + properties: + app_fleets: + description: Include project fleets in the report + type: boolean + app_info: + description: Include project info in the report + type: boolean + app_vars: + description: Include project environment variables in the report + type: boolean + comment: + type: string + device_activity: + description: Include device activity data in the report + type: boolean + device_health: + description: Include device health data in the report + type: boolean + device_info: + description: Include device info in the report + type: boolean + device_vars: + description: Include device environment variables in the report + type: boolean + select: + description: Device selection criteria + type: object + properties: + all_devices: + description: Select all devices in the project + type: boolean + comment: + type: string + devices: + description: Specific device UIDs to include + type: array + items: + type: string + devices_by_sn: + description: Serial number patterns to match (supports glob wildcards *, ?, [...]) + type: array + items: + type: string + devices_in_fleets: + description: Fleet UIDs whose devices should be included + type: array + items: + type: string + example: + comment: Set environment variables on all devices in a fleet + default_requests: + vars_to_set: + firmware_channel: production + log_level: '1' + select: + devices_in_fleets: + - fleet:00000000-0000-0000-0000-000000000000 + JobDetail: + description: Batch job with full definition + type: '' + properties: {} + allOf: + - $ref: '#/components/schemas/Job' + - properties: + definition: + $ref: '#/components/schemas/JobDefinition' + type: object JobRun: type: object properties: cancel: description: Whether cancellation was requested type: boolean + example: false completed: description: Unix timestamp when completed type: integer format: int64 + example: 1775252922 dry_run: description: Whether this was a dry run type: boolean + example: false job_name: description: Name of the job type: string + example: My Fleet Update job_uid: description: Unique identifier for the job type: string + example: 6862064d-9c7a-4d5d-88e6-2dfa8b4ef6c5 report_uid: description: Unique identifier for this run type: string + example: 6862064d-9c7a-4d5d-88e6-2dfa8b4ef6c5-1776780688472 results: description: Full results (only in detail view) type: object + example: + devices: + dev:000000000000001: + status: completed + vars_set: + firmware_channel: production + log_level: '1' + dev:000000000000002: + status: completed + vars_set: + firmware_channel: production + log_level: '1' + job: + dry_run: false + job_name: My Fleet Update + job_uid: 6862064d-9c7a-4d5d-88e6-2dfa8b4ef6c5 + status: completed successfully + when_completed: 1775252922 + when_started: 1775252900 + when_submitted: 1775252900 + when_updated: 1775252922 + who_submitted: user@example.com additionalProperties: true started: description: Unix timestamp when started type: integer format: int64 + example: 1775252900 status: description: Current status (submitted, running, completed, cancelled, failed) type: string + example: completed successfully submitted: description: Unix timestamp when submitted type: integer format: int64 + example: 1775252900 submitted_by: description: User who submitted the run type: string + example: user@example.com updated: description: Unix timestamp of last update type: integer format: int64 + example: 1775252922 required: - report_uid - job_uid @@ -7333,7 +7538,7 @@ components: schema: type: '' properties: {} - $ref: '#/components/schemas/Job' + $ref: '#/components/schemas/JobDetail' GetJobRunResponse: description: Job run details content: From 2da2e139636be8051ab09e7f70a8ddf1e71719d5 Mon Sep 17 00:00:00 2001 From: "blues-hub-automation[bot]" Date: Fri, 15 May 2026 16:47:00 +0000 Subject: [PATCH 09/12] feat: Update OpenAPI file replicated from Notehub commit ce75e07 --- openapi.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 7026397..f9eb85a 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1233,8 +1233,13 @@ paths: description: Earliest event time within the journey. type: string format: date-time + total_events: + description: The number of _track.qo events in the journey. + type: integer + format: int64 required: - journey_id + - total_events - start_date - end_date type: object From 376f4057de4e4738add4c75d7b42643f33dd5c8b Mon Sep 17 00:00:00 2001 From: "blues-hub-automation[bot]" Date: Mon, 18 May 2026 18:01:03 +0000 Subject: [PATCH 10/12] feat: Update OpenAPI file replicated from Notehub commit 588924d --- openapi.yaml | 162 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index f9eb85a..f3ba50d 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3382,6 +3382,106 @@ paths: x-custom-attributes: permission: read resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/secrets: + get: + operationId: GetProjectSecrets + description: Get all secrets for a project (metadata only, values are never returned) + responses: + '200': + $ref: '#/components/responses/GetProjectSecretsResponse' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + post: + operationId: CreateProjectSecret + description: Create a new project secret + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateProjectSecretRequest' + responses: + '201': + description: Secret created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectSecret' + '400': + $ref: '#/components/responses/ErrorResponse' + '409': + $ref: '#/components/responses/ErrorResponse' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/secrets/{secretName}: + delete: + operationId: DeleteProjectSecret + description: Delete a project secret by name + responses: + '204': + description: Secret deleted successfully + '404': + $ref: '#/components/responses/ErrorResponse' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - name: secretName + in: path + description: The name of the secret. + required: true + schema: + type: string + put: + operationId: UpdateProjectSecret + description: Update the value of an existing project secret + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateProjectSecretRequest' + responses: + '200': + description: Secret updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectSecret' + '404': + $ref: '#/components/responses/ErrorResponse' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/usage/data: get: operationId: GetDataUsage @@ -4707,6 +4807,18 @@ components: - alert_routes - source_type - threshold + CreateProjectSecretRequest: + type: object + properties: + name: + description: The secret name (alphanumeric and underscores only). + type: string + value: + description: The secret value (encrypted at rest, never returned after creation). + type: string + required: + - name + - value CreateUpdateRepository: type: object properties: @@ -5699,6 +5811,15 @@ components: items: type: string properties: {} + GetProjectSecretsResponse: + type: object + properties: + secrets: + type: array + items: + $ref: '#/components/schemas/ProjectSecret' + required: + - secrets GoogleRoute: type: object properties: @@ -6412,6 +6533,31 @@ components: - name - email - role + ProjectSecret: + description: Metadata for a project secret. The value is never returned. + type: object + properties: + created: + description: When the secret was first created. + type: string + format: date-time + created_by: + description: The actor who created the secret. + type: string + modified: + description: When the secret was last updated. + type: string + format: date-time + modified_by: + description: The actor who last updated the secret. + type: string + name: + description: The secret name (alphanumeric and underscores only). + type: string + required: + - name + - created + - created_by ProxyRoute: type: object properties: @@ -6981,6 +7127,14 @@ components: version: description: The firmware version string. type: string + UpdateProjectSecretRequest: + type: object + properties: + value: + description: The new secret value (encrypted at rest, never returned). + type: string + required: + - value UploadMetadata: type: object properties: @@ -7578,6 +7732,14 @@ components: $ref: '#/components/schemas/Job' required: - jobs + GetProjectSecretsResponse: + description: The response body from a get project secrets request. + content: + application/json: + schema: + type: '' + properties: {} + $ref: '#/components/schemas/GetProjectSecretsResponse' LatestResponse: description: The response body for a Latest Events request. content: From ebb814055b1ad80b4606b5d85b98e59d949f9dd9 Mon Sep 17 00:00:00 2001 From: "blues-hub-automation[bot]" Date: Wed, 27 May 2026 14:58:13 +0000 Subject: [PATCH 11/12] feat: Update OpenAPI file replicated from Notehub commit 4f5fa08 --- openapi.yaml | 706 +++++++++++++++++++++++++-------------------------- 1 file changed, 353 insertions(+), 353 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index f3ba50d..30b9743 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: @@ -147,7 +147,7 @@ paths: - billing_account x-custom-attributes: permission: read - /v1/billing-accounts/{billingAccountUID}: + '/v1/billing-accounts/{billingAccountUID}': get: operationId: GetBillingAccount description: Get Billing Account Information @@ -197,7 +197,7 @@ paths: - billing_account x-custom-attributes: permission: read - /v1/billing-accounts/{billingAccountUID}/balance-history: + '/v1/billing-accounts/{billingAccountUID}/balance-history': get: operationId: GetBillingAccountBalanceHistory description: Get Billing Account Balance history @@ -239,7 +239,7 @@ paths: - billing_account x-custom-attributes: permission: read - /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 @@ -279,15 +279,15 @@ paths: - device x-custom-attributes: permission: update - /v1/products/{productUID}/devices/{deviceUID}/webhook-event: + '/v1/products/{productUID}/devices/{deviceUID}/webhook-event': post: operationId: CreateLegacyWebhookEvent - description: Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload. + description: 'Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload.' parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/deviceUIDParam' requestBody: - description: A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload. + description: 'A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload.' required: true content: application/json: @@ -321,8 +321,8 @@ paths: - webhook x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/devices/{deviceUID}/webhook-session: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/devices/{deviceUID}/webhook-session': put: operationId: UpdateLegacyWebhookSession description: Legacy endpoint for opening or updating a webhook session for the given device (provisioning the device if necessary). Used by external services that need to maintain a callable session against a device behind a webhook. @@ -348,8 +348,8 @@ paths: - webhook x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/ext-devices/{deviceUID}/event: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/ext-devices/{deviceUID}/event': post: operationId: CreateEventExtDevice description: Creates an event using specified webhook @@ -374,8 +374,8 @@ paths: - external devices x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/ext-devices/{deviceUID}/session/close: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/ext-devices/{deviceUID}/session/close': post: operationId: ExtDeviceSessionClose description: Closes the session for the specified device if open @@ -400,8 +400,8 @@ paths: - external devices x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/ext-devices/{deviceUID}/session/open: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/ext-devices/{deviceUID}/session/open': post: operationId: ExtDeviceSessionOpen description: Create a Session for the specified device. | If a session is currently open it will be closed and a new one opened. @@ -426,8 +426,8 @@ paths: - external devices x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/project: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/project': get: operationId: GetProjectByProduct description: Get a Project by ProductUID @@ -453,11 +453,11 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event': post: operationId: CreateWebhookDeviceEventByProduct - description: Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. + description: 'Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook''s configured JSONata transform, if any, is applied before routing.' parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -481,11 +481,11 @@ paths: - webhook x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/webhooks/{webhookUID}/event: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/webhooks/{webhookUID}/event': post: operationId: CreateWebhookEventByProduct - description: Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device. + description: 'Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook''s configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device.' parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -508,11 +508,11 @@ paths: - webhook x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/products/{productUID}/webhooks/{webhookUID}/settings: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/products/{productUID}/webhooks/{webhookUID}/settings': get: operationId: GetWebhookSettingsByProduct - description: Retrieves the configuration settings for the specified webhook, addressed by productUID. + description: 'Retrieves the configuration settings for the specified webhook, addressed by productUID.' parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -531,10 +531,10 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' put: operationId: UpdateWebhookSettingsByProduct - description: Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings. + description: 'Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings.' parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/webhookUIDParam' @@ -558,7 +558,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' /v1/projects: get: operationId: GetProjects @@ -619,7 +619,7 @@ paths: - project x-custom-attributes: permission: create - /v1/projects/{projectOrProductUID}: + '/v1/projects/{projectOrProductUID}': delete: operationId: DeleteProject description: Delete a Project by ProjectUID @@ -636,7 +636,7 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: GetProject description: Get a Project by ProjectUID @@ -657,8 +657,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/alerts: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/alerts': get: operationId: GetAlerts description: Get list of defined Alerts @@ -678,8 +678,8 @@ paths: - alert x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/aws-role-config: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/aws-role-config': get: operationId: GetAWSRoleConfig summary: Get AWS role configuration for role-based authentication @@ -703,8 +703,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/clone: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/clone': post: operationId: CloneProject description: Clone a Project @@ -719,7 +719,7 @@ paths: type: object properties: billing_account_uid: - description: The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned. + description: 'The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned.' type: string disable_clone_fleets: description: Whether to disallow the cloning of the fleets from the parent project. Default is false if not specified. @@ -748,8 +748,8 @@ paths: - project x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/devices: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/devices': get: operationId: GetDevices description: Get Devices of a Project @@ -777,8 +777,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}': delete: operationId: DeleteDevice description: Delete Device @@ -793,7 +793,7 @@ paths: - device x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' get: operationId: GetDevice description: Get Device @@ -812,11 +812,11 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history: + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history': get: operationId: GetDeviceDfuHistory description: Get device DFU history for host or Notecard firmware @@ -839,8 +839,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status': get: operationId: GetDeviceDfuStatus description: Get device DFU history for host or Notecard firmware @@ -863,8 +863,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable': post: operationId: DisableDevice description: Disable Device @@ -882,8 +882,8 @@ paths: - device x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable': post: operationId: EnableDevice description: Enable Device @@ -901,8 +901,8 @@ paths: - device x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy': get: operationId: GetDeviceEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -926,8 +926,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables': get: operationId: GetDeviceEnvironmentVariables description: Get environment variables of a device @@ -942,7 +942,7 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -967,8 +967,8 @@ paths: - device x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}': delete: operationId: DeleteDeviceEnvironmentVariable description: Delete environment variable of a device @@ -992,8 +992,8 @@ paths: - device x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files': delete: operationId: DeleteNotefiles description: Deletes Notefiles and the Notes they contain. @@ -1023,7 +1023,7 @@ paths: - device x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:notefiles + resource: 'blues:resources:app:APPSERIAL:notefiles' get: operationId: ListNotefiles description: Lists .qi and .db files for the device @@ -1059,8 +1059,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:notefiles - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets: + resource: 'blues:resources:app:APPSERIAL:notefiles' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets': delete: operationId: DeleteDeviceFromFleets description: Remove Device from Fleets @@ -1091,7 +1091,7 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' get: operationId: GetDeviceFleets description: Get Device Fleets @@ -1106,7 +1106,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1140,8 +1140,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log': get: operationId: GetDeviceHealthLog description: Get Device Health Log @@ -1195,8 +1195,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys': get: operationId: GetDeviceJourneys description: | @@ -1254,8 +1254,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys/{journeyID}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys/{journeyID}': get: operationId: GetDeviceJourney description: | @@ -1319,8 +1319,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest': get: operationId: GetDeviceLatestEvents description: Get Device Latest Events @@ -1338,8 +1338,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}': post: operationId: CreateNotefile description: Creates an empty Notefile on the device. @@ -1358,11 +1358,11 @@ paths: - device x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notefiles - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}: + resource: 'blues:resources:app:APPSERIAL:notefiles' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}': get: operationId: GetNotefile - description: For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile + description: 'For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1410,10 +1410,10 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:notefiles + resource: 'blues:resources:app:APPSERIAL:notefiles' post: operationId: AddQiNote - description: Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist. + description: 'Adds a Note to a Notefile, creating the Notefile if it doesn''t yet exist.' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1436,8 +1436,8 @@ paths: - device x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}': delete: operationId: DeleteNote description: Delete a note from a .db or .qi notefile @@ -1457,7 +1457,7 @@ paths: - device x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:notes + resource: 'blues:resources:app:APPSERIAL:notes' get: operationId: GetDbNote description: Get a note from a .db or .qi notefile @@ -1503,7 +1503,7 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:notes + resource: 'blues:resources:app:APPSERIAL:notes' post: operationId: AddDbNote description: Add a Note to a .db notefile. if noteID is '-' then payload is ignored and empty notefile is created @@ -1530,7 +1530,7 @@ paths: - device x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:notes + resource: 'blues:resources:app:APPSERIAL:notes' put: operationId: UpdateDbNote description: Update a note in a .db or .qi notefile @@ -1557,11 +1557,11 @@ paths: - device x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:notes - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans: + resource: 'blues:resources:app:APPSERIAL:notes' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans': get: operationId: GetDevicePlans - description: Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections. + description: 'Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections.' responses: '200': $ref: '#/components/responses/DevicePlansResponse' @@ -1573,11 +1573,11 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision: + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision': post: operationId: ProvisionDevice description: Provision Device for a Project @@ -1622,8 +1622,8 @@ paths: - device x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key': get: operationId: GetDevicePublicKey description: Get Device Public Key @@ -1653,8 +1653,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions': get: operationId: GetDeviceSessions description: Get Device Sessions @@ -1677,8 +1677,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal': post: operationId: SignalDevice description: Send a signal from Notehub to a Notecard. @@ -1711,8 +1711,8 @@ paths: - device x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/devices/public-keys: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/devices/public-keys': get: operationId: GetDevicePublicKeys description: Get Device Public Keys of a Project @@ -1750,8 +1750,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}': post: operationId: PerformDfuAction description: Update/cancel host or notecard firmware updates @@ -1786,8 +1786,8 @@ paths: - project x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history': get: operationId: GetDevicesDfuHistory description: Get host or Notecard DFU history for all devices that match the filter criteria @@ -1822,8 +1822,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status': get: operationId: GetDevicesDfuStatus description: Get host or Notecard DFU history for all devices that match the filter criteria @@ -1858,8 +1858,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/environment_hierarchy: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/environment_hierarchy': get: operationId: GetProjectEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -1882,8 +1882,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/environment_variables: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/environment_variables': get: operationId: GetProjectEnvironmentVariables description: Get environment variables of a project @@ -1898,7 +1898,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' put: @@ -1920,8 +1920,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/environment_variables/{key}: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/environment_variables/{key}': delete: operationId: DeleteProjectEnvironmentVariable description: Delete an environment variable of a project by key @@ -1944,8 +1944,8 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/events: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/events': get: operationId: GetEvents description: Get Events of a Project @@ -1994,8 +1994,8 @@ paths: - event x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/events-cursor: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/events-cursor': get: operationId: GetEventsByCursor description: Get Events of a Project by cursor @@ -2019,8 +2019,8 @@ paths: - event x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs': get: operationId: GetRouteLogsByEvent description: Get Route Logs by Event UID @@ -2044,8 +2044,8 @@ paths: - event x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/firmware: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/firmware': get: operationId: GetFirmwareInfo description: Get Available Firmware Information @@ -2077,8 +2077,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}': delete: operationId: DeleteFirmware description: | @@ -2108,7 +2108,7 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: DownloadFirmware description: Download firmware binary @@ -2136,7 +2136,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' post: operationId: UpdateFirmware description: | @@ -2177,7 +2177,7 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' put: operationId: UploadFirmware description: Upload firmware binary @@ -2191,7 +2191,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 @@ -2224,8 +2224,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/fleets: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/fleets': get: operationId: GetFleets description: Get Project Fleets @@ -2240,7 +2240,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:fleets + resource: 'blues:resources:app:APPSERIAL:fleets' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -2257,7 +2257,7 @@ paths: connectivity_assurance: $ref: '#/components/schemas/FleetConnectivityAssurance' label: - description: The label, or name, for the Fleet. + description: 'The label, or name, for the Fleet.' type: string smart_rule: $ref: '#/components/schemas/FleetRule' @@ -2278,8 +2278,8 @@ paths: - project x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:fleets - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}: + resource: 'blues:resources:app:APPSERIAL:fleets' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}': delete: operationId: DeleteFleet description: Delete Fleet @@ -2294,7 +2294,7 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:fleets + resource: 'blues:resources:app:APPSERIAL:fleets' get: operationId: GetFleet description: Get Fleet @@ -2311,7 +2311,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:fleets + resource: 'blues:resources:app:APPSERIAL:fleets' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -2364,8 +2364,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:fleets - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices: + resource: 'blues:resources:app:APPSERIAL:fleets' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices': get: operationId: GetFleetDevices description: Get Devices of a Fleet within a Project @@ -2393,8 +2393,8 @@ paths: - device x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy': get: operationId: GetFleetEnvironmentHierarchy summary: Get environment variable hierarchy for a device @@ -2418,8 +2418,8 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:fleets - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables: + resource: 'blues:resources:app:APPSERIAL:fleets' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables': get: operationId: GetFleetEnvironmentVariables description: Get environment variables of a fleet @@ -2434,7 +2434,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:fleets + resource: 'blues:resources:app:APPSERIAL:fleets' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -2459,8 +2459,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:fleets - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}: + resource: 'blues:resources:app:APPSERIAL:fleets' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}': delete: operationId: DeleteFleetEnvironmentVariable description: Delete environment variables of a fleet @@ -2484,8 +2484,8 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:fleets - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events: + resource: 'blues:resources:app:APPSERIAL:fleets' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events': get: operationId: GetFleetEvents description: Get Events of a Fleet @@ -2534,8 +2534,8 @@ paths: - event x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor': get: operationId: GetFleetEventsByCursor description: Get Events of a Fleet by cursor @@ -2561,8 +2561,8 @@ paths: - event x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/global-transformation: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/global-transformation': post: operationId: SetGlobalEventTransformation description: Set the project-level event JSONata transformation @@ -2586,8 +2586,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/global-transformation/disable: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/global-transformation/disable': post: operationId: DisableGlobalEventTransformation description: Disable the project-level event JSONata transformation @@ -2604,8 +2604,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/global-transformation/enable: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/global-transformation/enable': post: operationId: EnableGlobalEventTransformation description: Enable the project-level event JSONata transformation @@ -2622,8 +2622,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/jobs: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/jobs': get: operationId: GetJobs description: List all batch jobs for a project @@ -2640,7 +2640,7 @@ paths: - jobs x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' post: operationId: CreateJob description: Create a new batch job with an optional name @@ -2672,8 +2672,8 @@ paths: - jobs x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/jobs/{jobUID}: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/jobs/{jobUID}': delete: operationId: DeleteJob description: Delete a batch job @@ -2693,7 +2693,7 @@ paths: - jobs x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: GetJob description: Get a specific batch job definition @@ -2713,8 +2713,8 @@ paths: - jobs x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/jobs/{jobUID}/run: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/jobs/{jobUID}/run': post: operationId: RunJob description: Execute a batch job @@ -2741,8 +2741,8 @@ paths: - jobs x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs': get: operationId: GetJobRuns description: List all runs for a specific job @@ -2775,8 +2775,8 @@ paths: - jobs x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}': delete: operationId: DeleteJobRun description: Delete the results of a job run @@ -2802,7 +2802,7 @@ paths: - $ref: '#/components/parameters/reportUIDParam' - name: view in: query - description: "Controls the level of detail returned: 'summary' returns metadata only, 'detail' returns the full result payload" + description: 'Controls the level of detail returned: ''summary'' returns metadata only, ''detail'' returns the full result payload' required: false schema: type: string @@ -2823,8 +2823,8 @@ paths: - jobs x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel': post: operationId: CancelJobRun description: Cancel a running job execution @@ -2844,8 +2844,8 @@ paths: - jobs x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/members: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/members': get: operationId: GetProjectMembers description: Get Project Members @@ -2871,10 +2871,10 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:accounts + resource: 'blues:resources:app:APPSERIAL:accounts' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - /v1/projects/{projectOrProductUID}/monitors: + '/v1/projects/{projectOrProductUID}/monitors': get: operationId: GetMonitors description: Get list of defined Monitors @@ -2891,7 +2891,7 @@ paths: - monitor x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' post: operationId: CreateMonitor description: Create a new Monitor @@ -2919,8 +2919,8 @@ paths: - monitor x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/monitors/{monitorUID}: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/monitors/{monitorUID}': delete: operationId: DeleteMonitor description: Delete Monitor @@ -2942,7 +2942,7 @@ paths: - monitor x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' get: operationId: GetMonitor description: Get Monitor @@ -2964,7 +2964,7 @@ paths: - monitor x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:devices + resource: 'blues:resources:app:APPSERIAL:devices' put: operationId: UpdateMonitor description: Update Monitor @@ -2993,8 +2993,8 @@ paths: - monitor x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:devices - /v1/projects/{projectOrProductUID}/products: + resource: 'blues:resources:app:APPSERIAL:devices' + '/v1/projects/{projectOrProductUID}/products': get: operationId: GetProducts description: Get Products within a Project @@ -3018,7 +3018,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:products + resource: 'blues:resources:app:APPSERIAL:products' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -3037,7 +3037,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. @@ -3063,8 +3063,8 @@ paths: - project x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/products/{productUID}: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/products/{productUID}': delete: operationId: DeleteProduct description: Delete a product @@ -3079,11 +3079,11 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/productUIDParam' - /v1/projects/{projectOrProductUID}/routes: + '/v1/projects/{projectOrProductUID}/routes': get: operationId: GetRoutes description: Get all Routes within a Project @@ -3097,34 +3097,34 @@ paths: example: - disabled: false label: success route - modified: 2020-03-09T17:58:37Z + modified: '2020-03-09T17:58:37Z' type: http - uid: route:8d65a087d5d290ce5bdf03aeff2becc0 + uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' - disabled: false label: failing route - modified: 2020-03-09T17:59:15Z + modified: '2020-03-09T17:59:15Z' type: http - uid: route:a9eaad31d5cee8d01a42762f71fb777a + uid: 'route:a9eaad31d5cee8d01a42762f71fb777a' - disabled: true label: disabled route - modified: 2020-03-09T17:59:44Z + modified: '2020-03-09T17:59:44Z' type: http - uid: route:02ddc0e6e236c2a7e482da62047229ad + uid: 'route:02ddc0e6e236c2a7e482da62047229ad' - disabled: false label: Proxy Route - modified: 2020-03-09T17:58:36Z + modified: '2020-03-09T17:58:36Z' type: proxy - uid: route:0ac565deb7b478a250bb82348b9cfdd4 + uid: 'route:0ac565deb7b478a250bb82348b9cfdd4' - disabled: false label: Myjsonlive Webtest - modified: 2020-03-09T17:58:35Z + modified: '2020-03-09T17:58:35Z' type: proxy - uid: route:fb1b9e0aba1bf030311ba2c3c1e3efd7 + uid: 'route:fb1b9e0aba1bf030311ba2c3c1e3efd7' - disabled: false label: Myjsonlive Echo - modified: 2020-03-09T17:58:34Z + modified: '2020-03-09T17:58:34Z' type: proxy - uid: route:7804818f84a3be6193e14d804fe7fca7 + uid: 'route:7804818f84a3be6193e14d804fe7fca7' schema: type: array items: @@ -3138,7 +3138,7 @@ paths: - route x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:routes + resource: 'blues:resources:app:APPSERIAL:routes' post: operationId: CreateRoute description: Create Route within a Project @@ -3157,13 +3157,13 @@ paths: disable_http_headers: false filter: {} fleets: - - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' http_headers: X-My-Header: value throttle_ms: 100 timeout: 5000 transform: {} - url: https://example.com/ingest + url: 'https://example.com/ingest' label: Route Label schema: $ref: '#/components/schemas/NotehubRoute' @@ -3180,16 +3180,16 @@ paths: system_notefiles: false type: '' fleets: - - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' http_headers: null throttle_ms: 100 timeout: 0 transform: {} - url: http://route.url + url: 'http://route.url' label: Route Label - modified: 2020-03-09T17:59:44Z + modified: '2020-03-09T17:59:44Z' type: http - uid: route:8d65a087d5d290ce5bdf03aeff2becc0 + uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' schema: $ref: '#/components/schemas/NotehubRoute' default: @@ -3200,8 +3200,8 @@ paths: - route x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:routes - /v1/projects/{projectOrProductUID}/routes/{routeUID}: + resource: 'blues:resources:app:APPSERIAL:routes' + '/v1/projects/{projectOrProductUID}/routes/{routeUID}': delete: operationId: DeleteRoute description: Delete single route within a project @@ -3219,7 +3219,7 @@ paths: - route x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:routes + resource: 'blues:resources:app:APPSERIAL:routes' get: operationId: GetRoute description: Get single route within a project @@ -3239,16 +3239,16 @@ paths: system_notefiles: false type: '' fleets: - - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' http_headers: null throttle_ms: 100 timeout: 0 transform: {} - url: http://route.url + url: 'http://route.url' label: Route Label - modified: 2020-03-09T17:59:44Z + modified: '2020-03-09T17:59:44Z' type: http - uid: route:8d65a087d5d290ce5bdf03aeff2becc0 + uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' schema: $ref: '#/components/schemas/NotehubRoute' default: @@ -3259,7 +3259,7 @@ paths: - route x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:routes + resource: 'blues:resources:app:APPSERIAL:routes' put: operationId: UpdateRoute description: Update route by UID @@ -3322,8 +3322,8 @@ paths: - route x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:routes - /v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs: + resource: 'blues:resources:app:APPSERIAL:routes' + '/v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs': get: operationId: GetRouteLogsByRoute description: Get Route Logs by Route UID @@ -3359,8 +3359,8 @@ paths: - route x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:routes - /v1/projects/{projectOrProductUID}/schemas: + resource: 'blues:resources:app:APPSERIAL:routes' + '/v1/projects/{projectOrProductUID}/schemas': get: operationId: GetNotefileSchemas summary: Get variable format for a notefile @@ -3381,11 +3381,11 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/secrets: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/secrets': get: operationId: GetProjectSecrets - description: Get all secrets for a project (metadata only, values are never returned) + description: 'Get all secrets for a project (metadata only, values are never returned)' responses: '200': $ref: '#/components/responses/GetProjectSecretsResponse' @@ -3397,7 +3397,7 @@ paths: - project x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -3428,8 +3428,8 @@ paths: - project x-custom-attributes: permission: create - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/secrets/{secretName}: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/secrets/{secretName}': delete: operationId: DeleteProjectSecret description: Delete a project secret by name @@ -3446,7 +3446,7 @@ paths: - project x-custom-attributes: permission: delete - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - name: secretName @@ -3481,8 +3481,8 @@ paths: - project x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/usage/data: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/usage/data': get: operationId: GetDataUsage description: Get data usage in bytes for a project with time range and period aggregation @@ -3525,11 +3525,11 @@ paths: - usage x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/usage/events: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/usage/events': get: operationId: GetEventsUsage - description: Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied + description: 'Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -3570,7 +3570,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 @@ -3597,11 +3597,11 @@ paths: - usage x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/usage/route-logs: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/usage/route-logs': get: operationId: GetRouteLogsUsage - description: Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied + description: 'Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -3630,7 +3630,7 @@ paths: - project - name: skipRecentData in: query - description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. + description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' required: false schema: type: boolean @@ -3646,11 +3646,11 @@ paths: - usage x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/usage/sessions: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/usage/sessions': get: operationId: GetSessionsUsage - description: Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied + description: 'Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' @@ -3681,7 +3681,7 @@ paths: - project - name: skipRecentData in: query - description: When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. + description: 'When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.' required: false schema: type: boolean @@ -3697,8 +3697,8 @@ paths: - usage x-custom-attributes: permission: read - resource: blues:resources:app:APPSERIAL:events - /v1/projects/{projectOrProductUID}/webhooks: + resource: 'blues:resources:app:APPSERIAL:events' + '/v1/projects/{projectOrProductUID}/webhooks': get: operationId: GetWebhooks description: Retrieves all webhooks for the specified project @@ -3724,8 +3724,8 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings - /v1/projects/{projectOrProductUID}/webhooks/{webhookUID}: + resource: 'blues:resources:app:APPSERIAL:settings' + '/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}': delete: operationId: DeleteWebhook description: Deletes the specified webhook @@ -3743,7 +3743,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: GetWebhook description: Retrieves the configuration settings for the specified webhook @@ -3765,7 +3765,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' post: operationId: CreateWebhook description: Creates a webhook for the specified product with the given name. The name | must be unique within the project. @@ -3794,7 +3794,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' put: operationId: UpdateWebhook description: Updates the configuration settings for the specified webhook. | Webhook will be created if it does not exist. Update body will completely replace the existing settings. @@ -3821,7 +3821,7 @@ paths: - webhook x-custom-attributes: permission: update - resource: blues:resources:app:APPSERIAL:settings + resource: 'blues:resources:app:APPSERIAL:settings' components: parameters: billingAccountUIDParam: @@ -3840,7 +3840,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 @@ -3854,7 +3854,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 @@ -3868,15 +3868,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 @@ -3897,28 +3897,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 @@ -3938,7 +3938,7 @@ components: items: type: string deviceUIDParam: - example: dev:000000000000000 + example: 'dev:000000000000000' in: path name: deviceUID required: true @@ -3974,7 +3974,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 @@ -4008,7 +4008,7 @@ components: schema: type: string filesQueryParam: - example: _health.qo, data.qo + example: '_health.qo, data.qo' in: query name: files required: false @@ -4028,7 +4028,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 @@ -4054,7 +4054,7 @@ components: schema: type: string firstSyncParam: - description: When true, filters results to only show first sync sessions + description: 'When true, filters results to only show first sync sessions' in: query name: firstSync required: false @@ -4156,7 +4156,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 @@ -4223,7 +4223,7 @@ components: schema: type: string productUIDParam: - example: com.blues.bridge:sensors + example: 'com.blues.bridge:sensors' in: path name: productUID required: true @@ -4240,7 +4240,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 @@ -4267,7 +4267,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 @@ -4298,7 +4298,7 @@ components: - asc - desc routeUIDParam: - example: route:cbd20093cba58392c9f9bbdd0cdeb1a0 + example: 'route:cbd20093cba58392c9f9bbdd0cdeb1a0' in: path name: routeUID required: true @@ -4328,7 +4328,7 @@ components: - failure type: string selectFieldsParam: - description: Comma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output. + description: 'Comma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output.' in: query name: selectFields required: false @@ -4406,7 +4406,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 @@ -4565,7 +4565,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 @@ -4776,9 +4776,9 @@ components: type: integer format: int64 plan_type: - description: Description of the SIM plan type including data allowance, region, and validity period + description: 'Description of the SIM plan type including data allowance, region, and validity period' type: string - example: 500MB, North America, 10-year lifetime + example: '500MB, North America, 10-year lifetime' CellularUsage: type: array items: @@ -4814,7 +4814,7 @@ components: description: The secret name (alphanumeric and underscores only). type: string value: - description: The secret value (encrypted at rest, never returned after creation). + description: 'The secret value (encrypted at rest, never returned after creation).' type: string required: - name @@ -4902,7 +4902,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: @@ -5191,7 +5191,7 @@ components: bssid: type: string cell: - description: Cell ID where the session originated and quality ("mcc,mnc,lac,cellid") + description: 'Cell ID where the session originated and quality ("mcc,mnc,lac,cellid")' type: string continuous: description: Was this a continuous connection? @@ -5488,7 +5488,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 @@ -5498,7 +5498,7 @@ components: description: Location type: string best_location_type: - description: One of "gps", "triangulated", or "tower" + description: 'One of "gps", "triangulated", or "tower"' type: string best_location_when: description: Unix timestamp @@ -5611,7 +5611,7 @@ components: description: Unix timestamp type: number transport: - description: The transport used for this event, e.g., "cellular", "wifi", ", etc. + description: 'The transport used for this event, e.g., "cellular", "wifi", ", etc.' type: string tri_country: description: Country @@ -5803,7 +5803,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: @@ -5849,7 +5849,7 @@ components: filter: $ref: '#/components/schemas/Filter' fleets: - description: If non-empty, applies only to the listed fleets. + description: 'If non-empty, applies only to the listed fleets.' type: array items: type: string @@ -5915,7 +5915,7 @@ components: default_requests: $ref: '#/components/schemas/BatchJobRequests' device_requests: - description: Device-specific request overrides, keyed by device UID + description: 'Device-specific request overrides, keyed by device UID' type: object additionalProperties: $ref: '#/components/schemas/BatchJobRequests' @@ -5961,7 +5961,7 @@ components: items: type: string devices_by_sn: - description: Serial number patterns to match (supports glob wildcards *, ?, [...]) + description: 'Serial number patterns to match (supports glob wildcards *, ?, [...])' type: array items: type: string @@ -5978,7 +5978,7 @@ components: log_level: '1' select: devices_in_fleets: - - fleet:00000000-0000-0000-0000-000000000000 + - 'fleet:00000000-0000-0000-0000-000000000000' JobDetail: description: Batch job with full definition type: '' @@ -6022,12 +6022,12 @@ components: type: object example: devices: - dev:000000000000001: + 'dev:000000000000001': status: completed vars_set: firmware_channel: production log_level: '1' - dev:000000000000002: + 'dev:000000000000002': status: completed vars_set: firmware_channel: production @@ -6049,7 +6049,7 @@ components: format: int64 example: 1775252900 status: - description: Current status (submitted, running, completed, cancelled, failed) + description: 'Current status (submitted, running, completed, cancelled, failed)' type: string example: completed successfully submitted: @@ -6104,7 +6104,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 @@ -6116,9 +6116,9 @@ components: description: The time window to aggregate the selected values. It follows the format of a number followed by a time unit type: string example: 10m or 5h30m40s - pattern: ^[0-9]+[smh]$ + pattern: '^[0-9]+[smh]$' alert: - description: If true, the monitor is in alert state. + description: 'If true, the monitor is in alert state.' type: boolean alert_routes: type: array @@ -6128,7 +6128,7 @@ components: - $ref: '#/components/schemas/SlackBearerNotification' - $ref: '#/components/schemas/EmailNotification' condition_type: - description: A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to] + description: 'A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]' type: string enum: - greater_than @@ -6141,7 +6141,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 @@ -6157,18 +6157,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: @@ -6238,7 +6238,7 @@ components: description: True if originated from an edge source. type: boolean id: - description: Note name/identifier (e.g., "1:435", "my_note"). + description: 'Note name/identifier (e.g., "1:435", "my_note").' type: string payload: description: Optional base64-encoded payload. @@ -6273,7 +6273,7 @@ components: type: object properties: id: - description: Notefile id (e.g., "test.qi", "config.db"). + description: 'Notefile id (e.g., "test.qi", "config.db").' type: string notes: type: array @@ -6286,7 +6286,7 @@ components: - id - notes NotefileList: - description: Array of notefiles, each containing its notes. + description: 'Array of notefiles, each containing its notes.' type: array items: $ref: '#/components/schemas/Notefile' @@ -6373,7 +6373,7 @@ components: default: http uid: type: string - default: route:8d65a087d5d290ce5bdf03aeff2becc0 + default: 'route:8d65a087d5d290ce5bdf03aeff2becc0' OAuth2Error: type: object properties: @@ -6440,7 +6440,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 @@ -6448,7 +6448,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 @@ -6466,7 +6466,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 @@ -6708,7 +6708,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. @@ -6738,7 +6738,7 @@ components: type: object properties: format: - description: Output format for transformed data (e.g., "json", "xml", "text"). + description: 'Output format for transformed data (e.g., "json", "xml", "text").' type: string example: json jsonata: @@ -6843,7 +6843,7 @@ components: psid: description: Provider-specific identifier for the satellite subscription type: string - example: skylo:5746354465786 + example: 'skylo:5746354465786' satellite_data_usage: $ref: '#/components/schemas/SatelliteDataUsage' nullable: true @@ -6917,7 +6917,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. @@ -6959,7 +6959,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. @@ -7068,7 +7068,7 @@ components: mnc: description: Mobile Network Code type: integer - n: + 'n': description: Name of the location type: string source: @@ -7131,7 +7131,7 @@ components: type: object properties: value: - description: The new secret value (encrypted at rest, never returned). + description: 'The new secret value (encrypted at rest, never returned).' type: string required: - value @@ -7189,7 +7189,7 @@ components: period: type: string format: date-time - example: 2025-07-23T00:00:00Z + example: '2025-07-23T00:00:00Z' total_bytes: type: integer format: int64 @@ -7213,16 +7213,16 @@ components: type: object properties: billable_events: - description: Events that are billable, this include all events except platform events + description: 'Events that are billable, this include all events except platform events' type: integer format: int64 example: 10 device: type: string - example: dev:123456789012345 + example: 'dev:123456789012345' fleet: type: string - example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' notefiles: description: Count of events per notefile. Only present when includeNotefiles=true is specified. type: object @@ -7236,14 +7236,14 @@ components: period: type: string format: date-time - example: 2025-07-23T00:00:00Z + example: '2025-07-23T00:00:00Z' platform_events: - description: Total platform events. Platform events are _log, _session, _health, and _geolocate events some of which are send from the device, some generated by notehub. These events are not billed. + description: 'Total platform events. Platform events are _log, _session, _health, and _geolocate events some of which are send from the device, some generated by notehub. These events are not billed.' type: integer format: int64 example: 15 total_days_in_period: - description: The total number of days in this period. Useful for calculating daily averages for month period. Note that the current period will be the total number of days in the current period, including days in the future. + description: 'The total number of days in this period. Useful for calculating daily averages for month period. Note that the current period will be the total number of days in the current period, including days in the future.' type: integer format: int32 total_devices: @@ -7251,7 +7251,7 @@ components: type: integer format: int64 total_events: - description: Total events the device sent to notehub, including associated notehub generated events + description: 'Total events the device sent to notehub, including associated notehub generated events' type: integer format: int64 example: 42 @@ -7268,7 +7268,7 @@ components: example: 2 nullable: true watchdog_events: - description: Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time. + description: 'Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time.' type: integer format: int64 example: 10 @@ -7305,11 +7305,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 @@ -7328,7 +7328,7 @@ components: properties: device: type: string - example: dev:123456789012345 + example: 'dev:123456789012345' first_sync_sessions: description: Number of first sync sessions in this period type: integer @@ -7336,17 +7336,17 @@ components: example: 2 fleet: type: string - example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' period: type: string format: date-time - example: 2025-07-23T00:00:00Z + example: '2025-07-23T00:00:00Z' sessions: type: integer format: int64 example: 12 sessions_by_transport: - description: Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan) + description: 'Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan)' type: object example: cell: 8 @@ -7376,7 +7376,7 @@ components: - total_bytes - total_devices UsageTruncatedField: - description: If the data is truncated that means that the parameters selected resulted in a response of over | the requested limit of data points, in order to ensure + description: 'If the data is truncated that means that the parameters selected resulted in a response of over | the requested limit of data points, in order to ensure' type: boolean properties: {} UserDfuStateMachine: @@ -7548,7 +7548,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 @@ -7562,15 +7562,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 @@ -7609,7 +7609,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 @@ -7623,15 +7623,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 @@ -7678,7 +7678,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 @@ -7754,59 +7754,59 @@ components: $ref: '#/components/schemas/Event' example: latest_events: - - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 + - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' body: why: sensors.qo requested sync (sensors.qo) (TLS) - device: dev:864475040523995 + device: 'dev:864475040523995' event: 81bd2bf1-0399-4978-bc46-8f779b4af350 file: _session.qo - product: product:com.blues.app:myapp + product: 'product:com.blues.app:myapp' received: 1669667707.564694 req: session.begin session: ed18884b-f2a6-419f-b856-d28dc8f0892b tls: true tower_country: US - tower_id: 310,410,20483,184692495 + tower_id: '310,410,20483,184692495' tower_lat: 43.769062500000004 tower_location: Waverly MI tower_lon: -83.657359375 tower_timezone: America/Detroit tower_when: 1669667691 when: 1669667707 - - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 + - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' body: humid: 56.23 temp: 35.5 - device: dev:864475040523995 + device: 'dev:864475040523995' event: 916d4c81-06ae-4263-9b55-7a3a0f73cb5a file: data.qo - product: product:com.blues.app:myapp + product: 'product:com.blues.app:myapp' received: 1669667713.221659 req: note.add session: 28cdc39f-9f62-4789-b0a3-2f35f9448ced sn: tj-1 tower_country: US - tower_id: 310,410,20483,184692495 + tower_id: '310,410,20483,184692495' tower_lat: 43.769062500000004 tower_location: Waverly MI tower_lon: -83.657359375 tower_timezone: America/Detroit tower_when: 1669667677 when: 1669667689 - - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 + - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' body: humidity: 69.88647200683693 pressure: 993.6294496104914 temp: 21.273027181770885 - device: dev:864475040523995 + device: 'dev:864475040523995' event: e98c2c3b-edbe-4fe7-af57-2196cc843eb7 file: sensors.qo - product: product:com.blues.app:myapp + product: 'product:com.blues.app:myapp' received: 1669667711.85316 req: note.add session: 7211392c-6895-43f8-9256-790655348be5 tower_country: US - tower_id: 310,410,20483,184692496 + tower_id: '310,410,20483,184692496' tower_lat: 43.747037500000005 tower_location: Waverly MI tower_lon: -83.665859375 @@ -7871,12 +7871,12 @@ components: - apn: a-notehub.com.attz bars: 2 bearer: LTE FDD - cell: 310,410,17169,77315594 + cell: '310,410,17169,77315594' continuous: true - device: dev:000000000000000 + device: 'dev:000000000000000' events: 14 fleets: - - fleet:46be9834-5te6-42c1-0000-b5ea05e248d7 + - 'fleet:46be9834-5te6-42c1-0000-b5ea05e248d7' hp_cycles_data: 3 hp_cycles_total: 3 hp_secs_data: 7659 @@ -7892,7 +7892,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 @@ -7911,7 +7911,7 @@ components: lon: -89.44239062499999 mcc: 310 mnc: 410 - n: Shorewood Hills WI + 'n': Shorewood Hills WI time: 1667250835 towers: 1 zone: America/Chicago @@ -7938,14 +7938,14 @@ components: device: description: The device UID this usage data belongs to (only present when aggregate is 'device') type: string - example: dev:123456789012345 + example: 'dev:123456789012345' device_count: description: the number of devices represented by this data point type: integer fleet: description: The fleet UID this usage data belongs to (only present when aggregate is 'fleet') type: string - example: fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' iccid: description: The ICCID of the cellular SIM card (only present when type is 'cellular') type: string @@ -7953,7 +7953,7 @@ components: psid: description: The PSID (Packet Service ID) of the satellite (or other packet-based device) type: string - example: skylo:5746354465786 + example: 'skylo:5746354465786' type: description: The type of connectivity type: string @@ -8022,10 +8022,10 @@ tags: name: webhook - description: APIs for events and sessions for external devices name: external devices - - description: Project Usage information related to events, route logs, sessions, and data usage + - description: 'Project Usage information related to events, route logs, sessions, and data usage' name: usage - description: Batch job operations name: jobs externalDocs: description: Find out more about Blues - url: https://blues.io + url: 'https://blues.io' From be5545706174401cedf53e3b5535f471a79f3960 Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Mon, 1 Jun 2026 14:18:28 -0400 Subject: [PATCH 12/12] updates --- config.json | 2 +- openapi_filtered.yaml | 1140 +++++++++- src/.openapi-generator/FILES | 52 +- src/README.md | 32 +- src/docs/BatchJobRequests.md | 41 + src/docs/CreateLegacyWebhookEventRequest.md | 37 + src/docs/CreateMonitor.md | 3 + src/docs/CreateProjectSecretRequest.md | 30 + src/docs/DeviceApi.md | 130 +- src/docs/GetDeviceJourney200Response.md | 32 + .../GetDeviceJourney200ResponseJourney.md | 40 + src/docs/GetDeviceJourneys200Response.md | 34 + ...tDeviceJourneys200ResponseJourneysInner.md | 40 + src/docs/GetProjectSecretsResponse.md | 29 + src/docs/Job.md | 16 +- src/docs/JobDefinition.md | 33 + src/docs/JobDefinitionReportOptions.md | 38 + src/docs/JobDefinitionSelect.md | 35 + src/docs/JobDetail.md | 36 + src/docs/JobsApi.md | 92 +- src/docs/Monitor.md | 3 + src/docs/ProjectApi.md | 230 +- src/docs/ProjectSecret.md | 33 + src/docs/RepositoryListResponse.md | 29 + src/docs/RepositoryTokenRequest.md | 30 + src/docs/RepositoryTokenResponse.md | 34 + src/docs/UpdateProjectSecretRequest.md | 29 + src/docs/WebhookApi.md | 362 ++- src/notehub_py/__init__.py | 27 +- src/notehub_py/api/device_api.py | 842 ++++++- src/notehub_py/api/jobs_api.py | 348 ++- src/notehub_py/api/project_api.py | 1144 +++++++++- src/notehub_py/api/webhook_api.py | 2023 +++++++++++++++-- src/notehub_py/api_client.py | 2 +- src/notehub_py/configuration.py | 2 +- src/notehub_py/models/__init__.py | 25 + src/notehub_py/models/batch_job_requests.py | 155 ++ src/notehub_py/models/billing_account_role.py | 1 + .../create_legacy_webhook_event_request.py | 114 + src/notehub_py/models/create_monitor.py | 18 + .../models/create_project_secret_request.py | 89 + .../models/get_device_journey200_response.py | 110 + .../get_device_journey200_response_journey.py | 102 + .../models/get_device_journeys200_response.py | 107 + ...ice_journeys200_response_journeys_inner.py | 104 + .../models/get_project_secrets_response.py | 100 + src/notehub_py/models/job.py | 23 +- src/notehub_py/models/job_definition.py | 145 ++ .../models/job_definition_report_options.py | 125 + .../models/job_definition_select.py | 111 + src/notehub_py/models/job_detail.py | 128 ++ src/notehub_py/models/monitor.py | 18 + src/notehub_py/models/project_secret.py | 109 + .../models/repository_list_response.py | 100 + .../models/repository_token_request.py | 113 + .../models/repository_token_response.py | 116 + .../models/update_project_secret_request.py | 86 + src/pyproject.toml | 2 +- src/setup.py | 2 +- src/test/test_batch_job_requests.py | 76 + ...est_create_legacy_webhook_event_request.py | 58 + .../test_create_project_secret_request.py | 57 + .../test_get_device_journey200_response.py | 189 ++ ..._get_device_journey200_response_journey.py | 183 ++ .../test_get_device_journeys200_response.py | 71 + ...ice_journeys200_response_journeys_inner.py | 65 + src/test/test_get_project_secrets_response.py | 69 + src/test/test_job_definition.py | 125 + .../test_job_definition_report_options.py | 61 + src/test/test_job_definition_select.py | 64 + src/test/test_job_detail.py | 65 + src/test/test_project_secret.py | 61 + src/test/test_repository_list_response.py | 75 + src/test/test_repository_token_request.py | 55 + src/test/test_repository_token_response.py | 65 + .../test_update_project_secret_request.py | 55 + 76 files changed, 10030 insertions(+), 397 deletions(-) create mode 100644 src/docs/BatchJobRequests.md create mode 100644 src/docs/CreateLegacyWebhookEventRequest.md create mode 100644 src/docs/CreateProjectSecretRequest.md create mode 100644 src/docs/GetDeviceJourney200Response.md create mode 100644 src/docs/GetDeviceJourney200ResponseJourney.md create mode 100644 src/docs/GetDeviceJourneys200Response.md create mode 100644 src/docs/GetDeviceJourneys200ResponseJourneysInner.md create mode 100644 src/docs/GetProjectSecretsResponse.md create mode 100644 src/docs/JobDefinition.md create mode 100644 src/docs/JobDefinitionReportOptions.md create mode 100644 src/docs/JobDefinitionSelect.md create mode 100644 src/docs/JobDetail.md create mode 100644 src/docs/ProjectSecret.md create mode 100644 src/docs/RepositoryListResponse.md create mode 100644 src/docs/RepositoryTokenRequest.md create mode 100644 src/docs/RepositoryTokenResponse.md create mode 100644 src/docs/UpdateProjectSecretRequest.md create mode 100644 src/notehub_py/models/batch_job_requests.py create mode 100644 src/notehub_py/models/create_legacy_webhook_event_request.py create mode 100644 src/notehub_py/models/create_project_secret_request.py create mode 100644 src/notehub_py/models/get_device_journey200_response.py create mode 100644 src/notehub_py/models/get_device_journey200_response_journey.py create mode 100644 src/notehub_py/models/get_device_journeys200_response.py create mode 100644 src/notehub_py/models/get_device_journeys200_response_journeys_inner.py create mode 100644 src/notehub_py/models/get_project_secrets_response.py create mode 100644 src/notehub_py/models/job_definition.py create mode 100644 src/notehub_py/models/job_definition_report_options.py create mode 100644 src/notehub_py/models/job_definition_select.py create mode 100644 src/notehub_py/models/job_detail.py create mode 100644 src/notehub_py/models/project_secret.py create mode 100644 src/notehub_py/models/repository_list_response.py create mode 100644 src/notehub_py/models/repository_token_request.py create mode 100644 src/notehub_py/models/repository_token_response.py create mode 100644 src/notehub_py/models/update_project_secret_request.py create mode 100644 src/test/test_batch_job_requests.py create mode 100644 src/test/test_create_legacy_webhook_event_request.py create mode 100644 src/test/test_create_project_secret_request.py create mode 100644 src/test/test_get_device_journey200_response.py create mode 100644 src/test/test_get_device_journey200_response_journey.py create mode 100644 src/test/test_get_device_journeys200_response.py create mode 100644 src/test/test_get_device_journeys200_response_journeys_inner.py create mode 100644 src/test/test_get_project_secrets_response.py create mode 100644 src/test/test_job_definition.py create mode 100644 src/test/test_job_definition_report_options.py create mode 100644 src/test/test_job_definition_select.py create mode 100644 src/test/test_job_detail.py create mode 100644 src/test/test_project_secret.py create mode 100644 src/test/test_repository_list_response.py create mode 100644 src/test/test_repository_token_request.py create mode 100644 src/test/test_repository_token_response.py create mode 100644 src/test/test_update_project_secret_request.py diff --git a/config.json b/config.json index fb1c50a..d33934e 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.2.0" + "packageVersion": "6.3.0" } diff --git a/openapi_filtered.yaml b/openapi_filtered.yaml index 792c693..076cc0b 100644 --- a/openapi_filtered.yaml +++ b/openapi_filtered.yaml @@ -47,6 +47,8 @@ paths: description: Internal Server Error tags: - authorization + x-custom-attributes: + permission: create /oauth2/token: post: operationId: OAuth2ClientCredentials @@ -146,6 +148,8 @@ paths: - personalAccessToken: [] tags: - billing_account + x-custom-attributes: + permission: read /v1/billing-accounts/{billingAccountUID}: get: operationId: GetBillingAccount @@ -194,6 +198,8 @@ paths: - personalAccessToken: [] tags: - billing_account + x-custom-attributes: + permission: read /v1/billing-accounts/{billingAccountUID}/balance-history: get: operationId: GetBillingAccountBalanceHistory @@ -234,6 +240,8 @@ paths: - personalAccessToken: [] tags: - billing_account + x-custom-attributes: + permission: read /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin: get: operationId: GetDeviceEnvironmentVariablesByPin @@ -243,8 +251,12 @@ paths: $ref: '#/components/responses/GetDeviceEnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -265,8 +277,88 @@ paths: $ref: '#/components/responses/EnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: update + /v1/products/{productUID}/devices/{deviceUID}/webhook-event: + post: + operationId: CreateLegacyWebhookEvent + description: Legacy endpoint for sending an event from a webhook, associated + with the given device (provisioning it if necessary). The request body is + a Note-shaped object containing the notefile name, body, and optional payload. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + requestBody: + description: A Note-shaped event with notefile name, JSON body, and optional + base64-encoded payload. + required: true + content: + application/json: + example: + body: + key: value + file: data.qo + payload: SGVsbG8sIFdvcmxkIQ== + schema: + type: object + properties: + body: + description: Arbitrary JSON event body. + type: object + additionalProperties: true + file: + description: The notefile to which the event should be written. + type: string + payload: + description: Optional base64-encoded binary payload. + type: string + additionalProperties: true + responses: + '200': + description: Event created successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/devices/{deviceUID}/webhook-session: + put: + operationId: UpdateLegacyWebhookSession + description: Legacy endpoint for opening or updating a webhook session for the + given device (provisioning the device if necessary). Used by external services + that need to maintain a callable session against a device behind a webhook. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + requestBody: + description: Optional session metadata. + required: false + content: + application/json: + schema: + type: object + additionalProperties: true + properties: {} + responses: + '200': + description: Webhook session updated successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes /v1/products/{productUID}/ext-devices/{deviceUID}/event: post: operationId: CreateEventExtDevice @@ -291,6 +383,9 @@ paths: - personalAccessToken: [] tags: - external devices + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes /v1/products/{productUID}/ext-devices/{deviceUID}/session/close: post: operationId: ExtDeviceSessionClose @@ -315,6 +410,9 @@ paths: - personalAccessToken: [] tags: - external devices + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes /v1/products/{productUID}/ext-devices/{deviceUID}/session/open: post: operationId: ExtDeviceSessionOpen @@ -340,6 +438,9 @@ paths: - personalAccessToken: [] tags: - external devices + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes /v1/products/{productUID}/project: get: operationId: GetProjectByProduct @@ -364,6 +465,125 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event: + post: + operationId: CreateWebhookDeviceEventByProduct + description: Sends an event to be processed by the specified webhook, addressed + by productUID, associated with the given device (provisioning it if necessary). + The entire request body becomes the event body. The webhook's configured JSONata + transform, if any, is applied before routing. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + requestBody: + description: The event body (arbitrary JSON) + required: true + content: + application/json: + schema: + type: object + additionalProperties: true + properties: {} + responses: + '200': + description: Event created successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/webhooks/{webhookUID}/event: + post: + operationId: CreateWebhookEventByProduct + description: Sends an event to be processed by the specified webhook, addressed + by productUID. The entire request body becomes the event body. The webhook's + configured JSONata transform, if any, is applied before routing. The event + is not associated with a specific device. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' + requestBody: + description: The event body (arbitrary JSON) + required: true + content: + application/json: + schema: + type: object + additionalProperties: true + properties: {} + responses: + '200': + description: Event created successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes + /v1/products/{productUID}/webhooks/{webhookUID}/settings: + get: + operationId: GetWebhookSettingsByProduct + description: Retrieves the configuration settings for the specified webhook, + addressed by productUID. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' + responses: + '200': + description: Webhook settings retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookSettings' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings + put: + operationId: UpdateWebhookSettingsByProduct + description: Updates the configuration settings for the specified webhook, addressed + by productUID. Update body will completely replace the existing settings. + parameters: + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' + requestBody: + required: true + content: + application/json: + example: + disabled: false + transform: '{"device":body.end_device_ids.dev_eui,"sn":body.end_device_ids.device_id,"body":body.uplink_message.decoded_payload,"details":body}' + schema: + $ref: '#/components/schemas/WebhookSettings' + properties: {} + responses: + '200': + description: Webhook settings updated successfully + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings /v1/projects: get: operationId: GetProjects @@ -386,6 +606,8 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read post: operationId: CreateProject description: Create a Project @@ -423,6 +645,8 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: create /v1/projects/{projectOrProductUID}: delete: operationId: DeleteProject @@ -438,6 +662,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings get: operationId: GetProject description: Get a Project by ProjectUID @@ -456,6 +683,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/alerts: get: operationId: GetAlerts @@ -474,6 +704,9 @@ paths: - personalAccessToken: [] tags: - alert + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/aws-role-config: get: operationId: GetAWSRoleConfig @@ -499,6 +732,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/clone: post: operationId: CloneProject @@ -545,6 +781,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/devices: get: operationId: GetDevices @@ -571,6 +810,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/{deviceUID}: delete: operationId: DeleteDevice @@ -584,6 +826,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:devices get: operationId: GetDevice description: Get Device @@ -600,6 +845,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -624,6 +872,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status: get: operationId: GetDeviceDfuStatus @@ -645,6 +896,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable: post: operationId: DisableDevice @@ -661,6 +915,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable: post: operationId: EnableDevice @@ -677,6 +934,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy: get: operationId: GetDeviceEnvironmentHierarchy @@ -699,6 +959,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables: get: operationId: GetDeviceEnvironmentVariables @@ -712,6 +975,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -735,6 +1001,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}: delete: operationId: DeleteDeviceEnvironmentVariable @@ -757,6 +1026,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files: delete: operationId: DeleteNotefiles @@ -785,6 +1057,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:notefiles get: operationId: ListNotefiles description: Lists .qi and .db files for the device @@ -818,6 +1093,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:notefiles /v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets: delete: operationId: DeleteDeviceFromFleets @@ -852,6 +1130,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:devices get: operationId: GetDeviceFleets description: Get Device Fleets @@ -864,6 +1145,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -899,6 +1183,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log: get: operationId: GetDeviceHealthLog @@ -951,6 +1238,144 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys: + get: + operationId: GetDeviceJourneys + description: 'Get the list of journeys for a device, derived from `_track.qo` + events. Returns journey metadata only (no event payloads). Capped at 100 most + recent journeys; `has_more` is true when the cap is hit. + + ' + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/startDateParam' + - $ref: '#/components/parameters/endDateParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + has_more: + type: boolean + journeys: + type: array + items: + properties: + end_date: + description: Latest event time within the journey. + type: string + format: date-time + journey_id: + description: 'Identifier of the journey, taken from the + `journey` field on `_track.qo` events. This value is itself + a Unix timestamp marking the start of the journey. + + ' + type: integer + format: int64 + start_date: + description: Earliest event time within the journey. + type: string + format: date-time + total_events: + description: The number of _track.qo events in the journey. + type: integer + format: int64 + required: + - journey_id + - total_events + - start_date + - end_date + type: object + required: + - journeys + - has_more + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices + /v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys/{journeyID}: + get: + operationId: GetDeviceJourney + description: 'Get a single journey for a device along with its `_track.qo` events. + The events array is paginated via `pageSize` / `pageNum`; use `journey.has_more` + to detect additional pages. + + ' + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - name: journeyID + in: path + description: 'Identifier of the journey, taken from the `journey` field on + `_track.qo` events (a Unix timestamp marking the start of the journey). + + ' + required: true + schema: + type: integer + format: int64 + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + end_date: + description: Latest event time within the journey. + type: string + format: date-time + journey: + description: Paginated `_track.qo` events for the journey. + type: object + properties: + events: + type: array + items: + $ref: '#/components/schemas/Event' + has_more: + type: boolean + required: + - events + - has_more + journey_id: + description: Identifier of the journey. + type: integer + format: int64 + start_date: + description: Earliest event time within the journey. + type: string + format: date-time + required: + - journey_id + - start_date + - end_date + - journey + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest: get: operationId: GetDeviceLatestEvents @@ -967,6 +1392,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}: post: operationId: CreateNotefile @@ -984,6 +1412,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notefiles /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}: get: operationId: GetNotefile @@ -1035,6 +1466,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:notefiles post: operationId: AddQiNote description: Adds a Note to a Notefile, creating the Notefile if it doesn't @@ -1060,6 +1494,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}: delete: operationId: DeleteNote @@ -1078,6 +1515,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:notes get: operationId: GetDbNote description: Get a note from a .db or .qi notefile @@ -1121,6 +1561,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:notes post: operationId: AddDbNote description: Add a Note to a .db notefile. if noteID is '-' then payload is @@ -1147,6 +1590,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:notes put: operationId: UpdateDbNote description: Update a note in a .db or .qi notefile @@ -1172,6 +1618,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:notes /v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans: get: operationId: GetDevicePlans @@ -1186,6 +1635,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' @@ -1232,6 +1684,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key: get: operationId: GetDevicePublicKey @@ -1260,6 +1715,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions: get: operationId: GetDeviceSessions @@ -1281,6 +1739,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal: post: operationId: SignalDevice @@ -1313,6 +1774,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/devices/public-keys: get: operationId: GetDevicePublicKeys @@ -1349,6 +1813,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}: post: operationId: PerformDfuAction @@ -1383,6 +1850,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history: get: operationId: GetDevicesDfuHistory @@ -1417,6 +1887,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status: get: operationId: GetDevicesDfuStatus @@ -1451,6 +1924,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/environment_hierarchy: get: operationId: GetProjectEnvironmentHierarchy @@ -1472,6 +1948,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/environment_variables: get: operationId: GetProjectEnvironmentVariables @@ -1485,6 +1964,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' put: @@ -1505,6 +1987,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/environment_variables/{key}: delete: operationId: DeleteProjectEnvironmentVariable @@ -1526,6 +2011,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/events: get: operationId: GetEvents @@ -1557,6 +2045,9 @@ paths: - personalAccessToken: [] tags: - event + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events /v1/projects/{projectOrProductUID}/events-cursor: get: operationId: GetEventsByCursor @@ -1579,6 +2070,9 @@ paths: - personalAccessToken: [] tags: - event + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events /v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs: get: operationId: GetRouteLogsByEvent @@ -1601,6 +2095,9 @@ paths: - personalAccessToken: [] tags: - event + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events /v1/projects/{projectOrProductUID}/firmware: get: operationId: GetFirmwareInfo @@ -1631,6 +2128,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}: delete: operationId: DeleteFirmware @@ -1662,6 +2162,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings get: operationId: DownloadFirmware description: Download firmware binary @@ -1687,6 +2190,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings post: operationId: UpdateFirmware description: 'Update the metadata of an existing host firmware entry. The filename @@ -1730,6 +2236,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings put: operationId: UploadFirmware description: Upload firmware binary @@ -1777,6 +2286,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/fleets: get: operationId: GetFleets @@ -1790,6 +2302,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:fleets parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -1825,6 +2340,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:fleets /v1/projects/{projectOrProductUID}/fleets/{fleetUID}: delete: operationId: DeleteFleet @@ -1838,6 +2356,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:fleets get: operationId: GetFleet description: Get Fleet @@ -1852,6 +2373,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:fleets parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -1903,6 +2427,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:fleets /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices: get: operationId: GetFleetDevices @@ -1929,6 +2456,9 @@ paths: - personalAccessToken: [] tags: - device + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy: get: operationId: GetFleetEnvironmentHierarchy @@ -1951,6 +2481,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:fleets /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables: get: operationId: GetFleetEnvironmentVariables @@ -1964,6 +2497,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:fleets parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' @@ -1987,6 +2523,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:fleets /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}: delete: operationId: DeleteFleetEnvironmentVariable @@ -2009,6 +2548,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:fleets /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events: get: operationId: GetFleetEvents @@ -2040,6 +2582,9 @@ paths: - personalAccessToken: [] tags: - event + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor: get: operationId: GetFleetEventsByCursor @@ -2064,6 +2609,9 @@ paths: - personalAccessToken: [] tags: - event + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events /v1/projects/{projectOrProductUID}/global-transformation: post: operationId: SetGlobalEventTransformation @@ -2075,9 +2623,9 @@ paths: it is persisted and routed required: true content: - application/json: + text/plain: schema: - $ref: '#/components/schemas/JSONata' + type: string properties: {} responses: '200': @@ -2088,6 +2636,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/global-transformation/disable: post: operationId: DisableGlobalEventTransformation @@ -2103,6 +2654,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/global-transformation/enable: post: operationId: EnableGlobalEventTransformation @@ -2118,6 +2672,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/jobs: get: operationId: GetJobs @@ -2133,6 +2690,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings post: operationId: CreateJob description: Create a new batch job with an optional name @@ -2145,13 +2705,12 @@ paths: schema: type: string requestBody: - description: The job definition as raw JSON + description: The batch job definition required: true content: application/json: schema: - description: Job definition (structure varies by job type) - type: object + $ref: '#/components/schemas/JobDefinition' properties: {} responses: '201': @@ -2164,6 +2723,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/jobs/{jobUID}: delete: operationId: DeleteJob @@ -2182,6 +2744,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings get: operationId: GetJob description: Get a specific batch job definition @@ -2199,6 +2764,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/jobs/{jobUID}/run: post: operationId: RunJob @@ -2224,6 +2792,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs: get: operationId: GetJobRuns @@ -2255,13 +2826,44 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}: + delete: + operationId: DeleteJobRun + description: Delete the results of a job run + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/reportUIDParam' + responses: + '200': + description: Job run deleted successfully + '404': + description: Run not found + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - jobs get: operationId: GetJobRun description: Get the result of a job execution parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/reportUIDParam' + - name: view + in: query + description: 'Controls the level of detail returned: ''summary'' returns metadata + only, ''detail'' returns the full result payload' + required: false + schema: + type: string + default: summary + enum: + - summary + - detail responses: '200': $ref: '#/components/responses/GetJobRunResponse' @@ -2273,6 +2875,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel: post: operationId: CancelJobRun @@ -2291,6 +2896,9 @@ paths: - personalAccessToken: [] tags: - jobs + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/members: get: operationId: GetProjectMembers @@ -2315,6 +2923,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:accounts parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' /v1/projects/{projectOrProductUID}/monitors: @@ -2332,6 +2943,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices post: operationId: CreateMonitor description: Create a new Monitor @@ -2358,6 +2972,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/monitors/{monitorUID}: delete: operationId: DeleteMonitor @@ -2378,6 +2995,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:devices get: operationId: GetMonitor description: Get Monitor @@ -2397,6 +3017,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:devices put: operationId: UpdateMonitor description: Update Monitor @@ -2424,6 +3047,9 @@ paths: - personalAccessToken: [] tags: - monitor + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:devices /v1/projects/{projectOrProductUID}/products: get: operationId: GetProducts @@ -2446,6 +3072,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:products parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: @@ -2490,6 +3119,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/products/{productUID}: delete: operationId: DeleteProduct @@ -2503,6 +3135,9 @@ paths: - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/productUIDParam' @@ -2559,6 +3194,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:routes post: operationId: CreateRoute description: Create Route within a Project @@ -2619,6 +3257,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:routes /v1/projects/{projectOrProductUID}/routes/{routeUID}: delete: operationId: DeleteRoute @@ -2635,6 +3276,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:routes get: operationId: GetRoute description: Get single route within a project @@ -2672,6 +3316,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:routes put: operationId: UpdateRoute description: Update route by UID @@ -2712,6 +3359,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:routes /v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs: get: operationId: GetRouteLogsByRoute @@ -2746,6 +3396,9 @@ paths: - personalAccessToken: [] tags: - route + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:routes /v1/projects/{projectOrProductUID}/schemas: get: operationId: GetNotefileSchemas @@ -2761,8 +3414,116 @@ paths: type: array items: $ref: '#/components/schemas/NotefileSchema' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/secrets: + get: + operationId: GetProjectSecrets + description: Get all secrets for a project (metadata only, values are never + returned) + responses: + '200': + $ref: '#/components/responses/GetProjectSecretsResponse' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:settings + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + post: + operationId: CreateProjectSecret + description: Create a new project secret + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateProjectSecretRequest' + properties: {} + responses: + '201': + description: Secret created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectSecret' + '400': + $ref: '#/components/responses/ErrorResponse' + '409': + $ref: '#/components/responses/ErrorResponse' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] tags: - project + x-custom-attributes: + permission: create + resource: blues:resources:app:APPSERIAL:settings + /v1/projects/{projectOrProductUID}/secrets/{secretName}: + delete: + operationId: DeleteProjectSecret + description: Delete a project secret by name + responses: + '204': + description: Secret deleted successfully + '404': + $ref: '#/components/responses/ErrorResponse' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: delete + resource: blues:resources:app:APPSERIAL:settings + parameters: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - name: secretName + in: path + description: The name of the secret. + required: true + schema: + type: string + put: + operationId: UpdateProjectSecret + description: Update the value of an existing project secret + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateProjectSecretRequest' + properties: {} + responses: + '200': + description: Secret updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectSecret' + '404': + $ref: '#/components/responses/ErrorResponse' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - personalAccessToken: [] + tags: + - project + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/usage/data: get: operationId: GetDataUsage @@ -2805,6 +3566,9 @@ paths: - personalAccessToken: [] tags: - usage + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events /v1/projects/{projectOrProductUID}/usage/events: get: operationId: GetEventsUsage @@ -2877,6 +3641,9 @@ paths: - personalAccessToken: [] tags: - usage + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events /v1/projects/{projectOrProductUID}/usage/route-logs: get: operationId: GetRouteLogsUsage @@ -2926,6 +3693,9 @@ paths: - personalAccessToken: [] tags: - usage + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events /v1/projects/{projectOrProductUID}/usage/sessions: get: operationId: GetSessionsUsage @@ -2977,6 +3747,9 @@ paths: - personalAccessToken: [] tags: - usage + x-custom-attributes: + permission: read + resource: blues:resources:app:APPSERIAL:events /v1/projects/{projectOrProductUID}/webhooks: get: operationId: GetWebhooks @@ -3001,6 +3774,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings /v1/projects/{projectOrProductUID}/webhooks/{webhookUID}: delete: operationId: DeleteWebhook @@ -3017,6 +3793,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings get: operationId: GetWebhook description: Retrieves the configuration settings for the specified webhook @@ -3036,6 +3815,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings post: operationId: CreateWebhook description: Creates a webhook for the specified product with the given name. @@ -3064,6 +3846,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings put: operationId: UpdateWebhook description: Updates the configuration settings for the specified webhook. | @@ -3091,6 +3876,9 @@ paths: - personalAccessToken: [] tags: - webhook + x-custom-attributes: + permission: update + resource: blues:resources:app:APPSERIAL:settings components: parameters: billingAccountUIDParam: @@ -3934,6 +4722,58 @@ components: type: string format: uri additionalProperties: false + BatchJobRequests: + description: Operations to apply to a device + type: object + properties: + comment: + type: string + connectivity_assurance_disable: + description: Disable connectivity assurance for the device + type: boolean + connectivity_assurance_enable: + description: Enable connectivity assurance for the device + type: boolean + disable: + description: Disable the device + type: boolean + enable: + description: Enable the device + type: boolean + fleets_to_default: + description: Fleet UIDs to assign to the device if it has no fleets + type: array + items: + type: string + fleets_to_join: + description: Fleet UIDs to add the device to + type: array + items: + type: string + fleets_to_leave: + description: Fleet UIDs to remove the device from + type: array + items: + type: string + provision_product: + description: Product UID to provision the device with if not already provisioned + type: string + sn_to_default: + description: Set the device serial number only if not already set + type: string + sn_to_set: + description: Set the device serial number ("-" to clear) + type: string + vars_to_default: + description: Environment variables to set only if not already set + type: object + additionalProperties: + type: string + vars_to_set: + description: Environment variables to set (use "-" as value to clear) + type: object + additionalProperties: + type: string BillingAccount: type: object properties: @@ -3954,6 +4794,7 @@ components: - billing_admin - billing_manager - project_creator + - billing_member BlynkRoute: type: object properties: @@ -4040,6 +4881,18 @@ components: - alert_routes - source_type - threshold + CreateProjectSecretRequest: + type: object + properties: + name: + description: The secret name (alphanumeric and underscores only). + type: string + value: + description: The secret value (encrypted at rest, never returned after creation). + type: string + required: + - name + - value CreateUpdateRepository: type: object properties: @@ -5058,6 +5911,15 @@ components: items: type: string properties: {} + GetProjectSecretsResponse: + type: object + properties: + secrets: + type: array + items: + $ref: '#/components/schemas/ProjectSecret' + required: + - secrets GoogleRoute: type: object properties: @@ -5118,13 +5980,28 @@ components: created_by: description: User who created the job type: string - definition: - description: Full job definition (only in detail view) - type: object - additionalProperties: true job_uid: description: Unique identifier for the job type: string + last_run_completed: + description: Unix timestamp when the most recent run completed (0 if still + in progress) + type: integer + format: int64 + example: 1775252922 + last_run_status: + description: 'Status of the most recent job run. Terminal values are: "submitted", + "completed successfully", "dry run completed successfully", "completed + with errors", "cancelled". While a job is running, intermediate per-device + progress updates may appear (e.g. "dev:000000000000000 completed", "dev:000000000000000 + updated: ...").' + type: string + example: dry run completed successfully + last_run_submitted: + description: Unix timestamp when the most recent run was submitted + type: integer + format: int64 + example: 1775252900 name: description: Human-readable job name type: string @@ -5133,50 +6010,168 @@ components: - name - created - created_by + JobDefinition: + description: Batch job definition + type: object + properties: + comment: + description: Human-readable description of the job + type: string + default_requests: + $ref: '#/components/schemas/BatchJobRequests' + device_requests: + description: Device-specific request overrides, keyed by device UID + type: object + additionalProperties: + $ref: '#/components/schemas/BatchJobRequests' + report_options: + description: Controls what data is included in the job report + type: object + properties: + app_fleets: + description: Include project fleets in the report + type: boolean + app_info: + description: Include project info in the report + type: boolean + app_vars: + description: Include project environment variables in the report + type: boolean + comment: + type: string + device_activity: + description: Include device activity data in the report + type: boolean + device_health: + description: Include device health data in the report + type: boolean + device_info: + description: Include device info in the report + type: boolean + device_vars: + description: Include device environment variables in the report + type: boolean + select: + description: Device selection criteria + type: object + properties: + all_devices: + description: Select all devices in the project + type: boolean + comment: + type: string + devices: + description: Specific device UIDs to include + type: array + items: + type: string + devices_by_sn: + description: Serial number patterns to match (supports glob wildcards + *, ?, [...]) + type: array + items: + type: string + devices_in_fleets: + description: Fleet UIDs whose devices should be included + type: array + items: + type: string + example: + comment: Set environment variables on all devices in a fleet + default_requests: + vars_to_set: + firmware_channel: production + log_level: '1' + select: + devices_in_fleets: + - fleet:00000000-0000-0000-0000-000000000000 + JobDetail: + description: Batch job with full definition + type: '' + properties: {} + allOf: + - $ref: '#/components/schemas/Job' + - properties: + definition: + $ref: '#/components/schemas/JobDefinition' + type: object JobRun: type: object properties: cancel: description: Whether cancellation was requested type: boolean + example: false completed: description: Unix timestamp when completed type: integer format: int64 + example: 1775252922 dry_run: description: Whether this was a dry run type: boolean + example: false job_name: description: Name of the job type: string + example: My Fleet Update job_uid: description: Unique identifier for the job type: string + example: 6862064d-9c7a-4d5d-88e6-2dfa8b4ef6c5 report_uid: description: Unique identifier for this run type: string + example: 6862064d-9c7a-4d5d-88e6-2dfa8b4ef6c5-1776780688472 results: description: Full results (only in detail view) type: object + example: + devices: + dev:000000000000001: + status: completed + vars_set: + firmware_channel: production + log_level: '1' + dev:000000000000002: + status: completed + vars_set: + firmware_channel: production + log_level: '1' + job: + dry_run: false + job_name: My Fleet Update + job_uid: 6862064d-9c7a-4d5d-88e6-2dfa8b4ef6c5 + status: completed successfully + when_completed: 1775252922 + when_started: 1775252900 + when_submitted: 1775252900 + when_updated: 1775252922 + who_submitted: user@example.com additionalProperties: true started: description: Unix timestamp when started type: integer format: int64 + example: 1775252900 status: description: Current status (submitted, running, completed, cancelled, failed) type: string + example: completed successfully submitted: description: Unix timestamp when submitted type: integer format: int64 + example: 1775252900 submitted_by: description: User who submitted the run type: string + example: user@example.com updated: description: Unix timestamp of last update type: integer format: int64 + example: 1775252922 required: - report_uid - job_uid @@ -5307,6 +6302,19 @@ components: type: integer uid: type: string + usage_scope: + description: 'For usage monitors: the scope of aggregation. Supported values + are "device" and "fleet".' + type: string + usage_type: + description: 'For usage monitors: the type of data usage to monitor. Supported + values are "cellular" and "satellite".' + type: string + usage_window: + description: 'For usage monitors: the rolling time window in days to sum + usage over (e.g. 30 for 30 days).' + type: integer + format: int32 MqttRoute: type: object properties: @@ -5651,6 +6659,31 @@ components: - name - email - role + ProjectSecret: + description: Metadata for a project secret. The value is never returned. + type: object + properties: + created: + description: When the secret was first created. + type: string + format: date-time + created_by: + description: The actor who created the secret. + type: string + modified: + description: When the secret was last updated. + type: string + format: date-time + modified_by: + description: The actor who last updated the secret. + type: string + name: + description: The secret name (alphanumeric and underscores only). + type: string + required: + - name + - created + - created_by ProxyRoute: type: object properties: @@ -5726,6 +6759,77 @@ components: uid: description: The unique identifier for the data repository type: string + RepositoryListResponse: + type: object + properties: + repositories: + type: array + items: + $ref: '#/components/schemas/Repository' + required: + - repositories + RepositoryTokenRequest: + type: object + properties: + intent: + description: 'Access intent for the vended credentials. Only `read` is + + supported today; `write` and `admin` are reserved for future use. + + ' + type: string + default: read + enum: + - read + ttl_seconds: + description: 'Requested credential lifetime in seconds. Clamped server-side + to + + [60, 3600]. Defaults to 900 (15 minutes) if omitted. + + ' + type: integer + default: 900 + maximum: 3600 + minimum: 60 + RepositoryTokenResponse: + type: object + properties: + database: + description: Storage service database name scoped to this repository + type: string + expires_at: + description: 'Absolute expiration time of the ephemeral user. The storage + + service will reject connections and queries after this instant. + + ' + type: string + format: date-time + host: + description: Storage service hostname the caller should connect to + type: string + password: + description: 'Ephemeral password. Returned once; not stored by Notehub. + Hold + + this in memory only and discard after `expires_at`. + + ' + type: string + port: + description: Storage service port + type: integer + username: + description: Ephemeral storage service username (prefixed with `u_`) + type: string + required: + - host + - port + - username + - password + - database + - expires_at Role: type: string properties: {} @@ -6164,6 +7268,14 @@ components: version: description: The firmware version string. type: string + UpdateProjectSecretRequest: + type: object + properties: + value: + description: The new secret value (encrypted at rest, never returned). + type: string + required: + - value UploadMetadata: type: object properties: @@ -6755,7 +7867,7 @@ components: schema: type: '' properties: {} - $ref: '#/components/schemas/Job' + $ref: '#/components/schemas/JobDetail' GetJobRunResponse: description: Job run details content: @@ -6790,6 +7902,14 @@ components: $ref: '#/components/schemas/Job' required: - jobs + GetProjectSecretsResponse: + description: The response body from a get project secrets request. + content: + application/json: + schema: + type: '' + properties: {} + $ref: '#/components/schemas/GetProjectSecretsResponse' LatestResponse: description: The response body for a Latest Events request. content: diff --git a/src/.openapi-generator/FILES b/src/.openapi-generator/FILES index 805aae5..b8c3f47 100644 --- a/src/.openapi-generator/FILES +++ b/src/.openapi-generator/FILES @@ -12,6 +12,7 @@ docs/AlertNotificationsInner.md docs/AuthorizationApi.md docs/AwsRoute.md docs/AzureRoute.md +docs/BatchJobRequests.md docs/BillingAccount.md docs/BillingAccountApi.md docs/BillingAccountRole.md @@ -23,9 +24,11 @@ docs/CloneProjectRequest.md docs/Contact.md docs/CreateFleetRequest.md docs/CreateJob201Response.md +docs/CreateLegacyWebhookEventRequest.md docs/CreateMonitor.md docs/CreateProductRequest.md docs/CreateProjectRequest.md +docs/CreateProjectSecretRequest.md docs/CreateUpdateRepository.md docs/CurrentFirmware.md docs/DFUEnv.md @@ -76,6 +79,10 @@ docs/GetDeviceEnvironmentVariablesByPin200Response.md docs/GetDeviceFleets200Response.md docs/GetDeviceHealthLog200Response.md docs/GetDeviceHealthLog200ResponseHealthLogInner.md +docs/GetDeviceJourney200Response.md +docs/GetDeviceJourney200ResponseJourney.md +docs/GetDeviceJourneys200Response.md +docs/GetDeviceJourneys200ResponseJourneysInner.md docs/GetDeviceLatestEvents200Response.md docs/GetDevicePlans200Response.md docs/GetDevicePublicKey200Response.md @@ -90,6 +97,7 @@ docs/GetJobs200Response.md docs/GetNotefile200Response.md docs/GetProducts200Response.md docs/GetProjectMembers200Response.md +docs/GetProjectSecretsResponse.md docs/GetProjects200Response.md docs/GetRouteLogsUsage200Response.md docs/GetSessionsUsage200Response.md @@ -97,6 +105,10 @@ docs/GetWebhooks200Response.md docs/GoogleRoute.md docs/HttpRoute.md docs/Job.md +docs/JobDefinition.md +docs/JobDefinitionReportOptions.md +docs/JobDefinitionSelect.md +docs/JobDetail.md docs/JobRun.md docs/JobsApi.md docs/Location.md @@ -122,11 +134,15 @@ docs/Product.md docs/Project.md docs/ProjectApi.md docs/ProjectMember.md +docs/ProjectSecret.md docs/ProvisionDeviceRequest.md docs/ProxyRoute.md docs/QubitroRoute.md docs/RadRoute.md docs/Repository.md +docs/RepositoryListResponse.md +docs/RepositoryTokenRequest.md +docs/RepositoryTokenResponse.md docs/Role.md docs/RouteApi.md docs/RouteLog.md @@ -148,6 +164,7 @@ docs/TowerLocation.md docs/TwilioRoute.md docs/UpdateFleetRequest.md docs/UpdateHostFirmwareRequest.md +docs/UpdateProjectSecretRequest.md docs/UploadMetadata.md docs/UsageApi.md docs/UsageData.md @@ -187,6 +204,7 @@ notehub_py/models/alert_notifications_inner.py notehub_py/models/aws_role_config.py notehub_py/models/aws_route.py notehub_py/models/azure_route.py +notehub_py/models/batch_job_requests.py notehub_py/models/billing_account.py notehub_py/models/billing_account_role.py notehub_py/models/blynk_route.py @@ -197,9 +215,11 @@ notehub_py/models/clone_project_request.py notehub_py/models/contact.py notehub_py/models/create_fleet_request.py notehub_py/models/create_job201_response.py +notehub_py/models/create_legacy_webhook_event_request.py notehub_py/models/create_monitor.py notehub_py/models/create_product_request.py notehub_py/models/create_project_request.py +notehub_py/models/create_project_secret_request.py notehub_py/models/create_update_repository.py notehub_py/models/current_firmware.py notehub_py/models/data_field.py @@ -247,6 +267,10 @@ notehub_py/models/get_device_environment_variables_by_pin200_response.py notehub_py/models/get_device_fleets200_response.py notehub_py/models/get_device_health_log200_response.py notehub_py/models/get_device_health_log200_response_health_log_inner.py +notehub_py/models/get_device_journey200_response.py +notehub_py/models/get_device_journey200_response_journey.py +notehub_py/models/get_device_journeys200_response.py +notehub_py/models/get_device_journeys200_response_journeys_inner.py notehub_py/models/get_device_latest_events200_response.py notehub_py/models/get_device_plans200_response.py notehub_py/models/get_device_public_key200_response.py @@ -261,6 +285,7 @@ notehub_py/models/get_jobs200_response.py notehub_py/models/get_notefile200_response.py notehub_py/models/get_products200_response.py notehub_py/models/get_project_members200_response.py +notehub_py/models/get_project_secrets_response.py notehub_py/models/get_projects200_response.py notehub_py/models/get_route_logs_usage200_response.py notehub_py/models/get_sessions_usage200_response.py @@ -268,6 +293,10 @@ notehub_py/models/get_webhooks200_response.py notehub_py/models/google_route.py notehub_py/models/http_route.py notehub_py/models/job.py +notehub_py/models/job_definition.py +notehub_py/models/job_definition_report_options.py +notehub_py/models/job_definition_select.py +notehub_py/models/job_detail.py notehub_py/models/job_run.py notehub_py/models/location.py notehub_py/models/login200_response.py @@ -290,11 +319,15 @@ notehub_py/models/personal_access_token_secret.py notehub_py/models/product.py notehub_py/models/project.py notehub_py/models/project_member.py +notehub_py/models/project_secret.py notehub_py/models/provision_device_request.py notehub_py/models/proxy_route.py notehub_py/models/qubitro_route.py notehub_py/models/rad_route.py notehub_py/models/repository.py +notehub_py/models/repository_list_response.py +notehub_py/models/repository_token_request.py +notehub_py/models/repository_token_response.py notehub_py/models/role.py notehub_py/models/route_log.py notehub_py/models/route_transform_settings.py @@ -315,6 +348,7 @@ notehub_py/models/tower_location.py notehub_py/models/twilio_route.py notehub_py/models/update_fleet_request.py notehub_py/models/update_host_firmware_request.py +notehub_py/models/update_project_secret_request.py notehub_py/models/upload_metadata.py notehub_py/models/usage_data.py notehub_py/models/usage_events_data.py @@ -333,5 +367,21 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_update_host_firmware_request.py +test/test_batch_job_requests.py +test/test_create_legacy_webhook_event_request.py +test/test_create_project_secret_request.py +test/test_get_device_journey200_response.py +test/test_get_device_journey200_response_journey.py +test/test_get_device_journeys200_response.py +test/test_get_device_journeys200_response_journeys_inner.py +test/test_get_project_secrets_response.py +test/test_job_definition.py +test/test_job_definition_report_options.py +test/test_job_definition_select.py +test/test_job_detail.py +test/test_project_secret.py +test/test_repository_list_response.py +test/test_repository_token_request.py +test/test_repository_token_response.py +test/test_update_project_secret_request.py tox.ini diff --git a/src/README.md b/src/README.md index ef83476..22a6052 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.2.0 +- Package version: 6.3.0 - 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/) @@ -114,6 +114,8 @@ Class | Method | HTTP request | Description *DeviceApi* | [**get_device_environment_variables**](docs/DeviceApi.md#get_device_environment_variables) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables | *DeviceApi* | [**get_device_environment_variables_by_pin**](docs/DeviceApi.md#get_device_environment_variables_by_pin) | **GET** /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin | *DeviceApi* | [**get_device_health_log**](docs/DeviceApi.md#get_device_health_log) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log | +*DeviceApi* | [**get_device_journey**](docs/DeviceApi.md#get_device_journey) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys/{journeyID} | +*DeviceApi* | [**get_device_journeys**](docs/DeviceApi.md#get_device_journeys) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys | *DeviceApi* | [**get_device_latest_events**](docs/DeviceApi.md#get_device_latest_events) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest | *DeviceApi* | [**get_device_plans**](docs/DeviceApi.md#get_device_plans) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans | *DeviceApi* | [**get_device_public_key**](docs/DeviceApi.md#get_device_public_key) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key | @@ -139,6 +141,7 @@ Class | Method | HTTP request | Description *JobsApi* | [**cancel_job_run**](docs/JobsApi.md#cancel_job_run) | **POST** /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel | *JobsApi* | [**create_job**](docs/JobsApi.md#create_job) | **POST** /v1/projects/{projectOrProductUID}/jobs | *JobsApi* | [**delete_job**](docs/JobsApi.md#delete_job) | **DELETE** /v1/projects/{projectOrProductUID}/jobs/{jobUID} | +*JobsApi* | [**delete_job_run**](docs/JobsApi.md#delete_job_run) | **DELETE** /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID} | *JobsApi* | [**get_job**](docs/JobsApi.md#get_job) | **GET** /v1/projects/{projectOrProductUID}/jobs/{jobUID} | *JobsApi* | [**get_job_run**](docs/JobsApi.md#get_job_run) | **GET** /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID} | *JobsApi* | [**get_job_runs**](docs/JobsApi.md#get_job_runs) | **GET** /v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs | @@ -154,6 +157,7 @@ Class | Method | HTTP request | Description *ProjectApi* | [**create_fleet**](docs/ProjectApi.md#create_fleet) | **POST** /v1/projects/{projectOrProductUID}/fleets | *ProjectApi* | [**create_product**](docs/ProjectApi.md#create_product) | **POST** /v1/projects/{projectOrProductUID}/products | *ProjectApi* | [**create_project**](docs/ProjectApi.md#create_project) | **POST** /v1/projects | +*ProjectApi* | [**create_project_secret**](docs/ProjectApi.md#create_project_secret) | **POST** /v1/projects/{projectOrProductUID}/secrets | *ProjectApi* | [**delete_device_from_fleets**](docs/ProjectApi.md#delete_device_from_fleets) | **DELETE** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets | *ProjectApi* | [**delete_firmware**](docs/ProjectApi.md#delete_firmware) | **DELETE** /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename} | *ProjectApi* | [**delete_fleet**](docs/ProjectApi.md#delete_fleet) | **DELETE** /v1/projects/{projectOrProductUID}/fleets/{fleetUID} | @@ -161,6 +165,7 @@ Class | Method | HTTP request | Description *ProjectApi* | [**delete_product**](docs/ProjectApi.md#delete_product) | **DELETE** /v1/projects/{projectOrProductUID}/products/{productUID} | *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* | [**delete_project_secret**](docs/ProjectApi.md#delete_project_secret) | **DELETE** /v1/projects/{projectOrProductUID}/secrets/{secretName} | *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 | @@ -182,6 +187,7 @@ Class | Method | HTTP request | Description *ProjectApi* | [**get_project_environment_hierarchy**](docs/ProjectApi.md#get_project_environment_hierarchy) | **GET** /v1/projects/{projectOrProductUID}/environment_hierarchy | Get environment variable hierarchy for a device *ProjectApi* | [**get_project_environment_variables**](docs/ProjectApi.md#get_project_environment_variables) | **GET** /v1/projects/{projectOrProductUID}/environment_variables | *ProjectApi* | [**get_project_members**](docs/ProjectApi.md#get_project_members) | **GET** /v1/projects/{projectOrProductUID}/members | +*ProjectApi* | [**get_project_secrets**](docs/ProjectApi.md#get_project_secrets) | **GET** /v1/projects/{projectOrProductUID}/secrets | *ProjectApi* | [**get_projects**](docs/ProjectApi.md#get_projects) | **GET** /v1/projects | *ProjectApi* | [**perform_dfu_action**](docs/ProjectApi.md#perform_dfu_action) | **POST** /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action} | *ProjectApi* | [**set_fleet_environment_variables**](docs/ProjectApi.md#set_fleet_environment_variables) | **PUT** /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables | @@ -189,6 +195,7 @@ Class | Method | HTTP request | Description *ProjectApi* | [**set_project_environment_variables**](docs/ProjectApi.md#set_project_environment_variables) | **PUT** /v1/projects/{projectOrProductUID}/environment_variables | *ProjectApi* | [**update_firmware**](docs/ProjectApi.md#update_firmware) | **POST** /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename} | *ProjectApi* | [**update_fleet**](docs/ProjectApi.md#update_fleet) | **PUT** /v1/projects/{projectOrProductUID}/fleets/{fleetUID} | +*ProjectApi* | [**update_project_secret**](docs/ProjectApi.md#update_project_secret) | **PUT** /v1/projects/{projectOrProductUID}/secrets/{secretName} | *ProjectApi* | [**upload_firmware**](docs/ProjectApi.md#upload_firmware) | **PUT** /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename} | *RouteApi* | [**create_route**](docs/RouteApi.md#create_route) | **POST** /v1/projects/{projectOrProductUID}/routes | *RouteApi* | [**delete_route**](docs/RouteApi.md#delete_route) | **DELETE** /v1/projects/{projectOrProductUID}/routes/{routeUID} | @@ -200,11 +207,17 @@ Class | Method | HTTP request | Description *UsageApi* | [**get_events_usage**](docs/UsageApi.md#get_events_usage) | **GET** /v1/projects/{projectOrProductUID}/usage/events | *UsageApi* | [**get_route_logs_usage**](docs/UsageApi.md#get_route_logs_usage) | **GET** /v1/projects/{projectOrProductUID}/usage/route-logs | *UsageApi* | [**get_sessions_usage**](docs/UsageApi.md#get_sessions_usage) | **GET** /v1/projects/{projectOrProductUID}/usage/sessions | +*WebhookApi* | [**create_legacy_webhook_event**](docs/WebhookApi.md#create_legacy_webhook_event) | **POST** /v1/products/{productUID}/devices/{deviceUID}/webhook-event | *WebhookApi* | [**create_webhook**](docs/WebhookApi.md#create_webhook) | **POST** /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | +*WebhookApi* | [**create_webhook_device_event_by_product**](docs/WebhookApi.md#create_webhook_device_event_by_product) | **POST** /v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event | +*WebhookApi* | [**create_webhook_event_by_product**](docs/WebhookApi.md#create_webhook_event_by_product) | **POST** /v1/products/{productUID}/webhooks/{webhookUID}/event | *WebhookApi* | [**delete_webhook**](docs/WebhookApi.md#delete_webhook) | **DELETE** /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | *WebhookApi* | [**get_webhook**](docs/WebhookApi.md#get_webhook) | **GET** /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | +*WebhookApi* | [**get_webhook_settings_by_product**](docs/WebhookApi.md#get_webhook_settings_by_product) | **GET** /v1/products/{productUID}/webhooks/{webhookUID}/settings | *WebhookApi* | [**get_webhooks**](docs/WebhookApi.md#get_webhooks) | **GET** /v1/projects/{projectOrProductUID}/webhooks | +*WebhookApi* | [**update_legacy_webhook_session**](docs/WebhookApi.md#update_legacy_webhook_session) | **PUT** /v1/products/{productUID}/devices/{deviceUID}/webhook-session | *WebhookApi* | [**update_webhook**](docs/WebhookApi.md#update_webhook) | **PUT** /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | +*WebhookApi* | [**update_webhook_settings_by_product**](docs/WebhookApi.md#update_webhook_settings_by_product) | **PUT** /v1/products/{productUID}/webhooks/{webhookUID}/settings | ## Documentation For Models @@ -216,6 +229,7 @@ Class | Method | HTTP request | Description - [AlertNotificationsInner](docs/AlertNotificationsInner.md) - [AwsRoute](docs/AwsRoute.md) - [AzureRoute](docs/AzureRoute.md) + - [BatchJobRequests](docs/BatchJobRequests.md) - [BillingAccount](docs/BillingAccount.md) - [BillingAccountRole](docs/BillingAccountRole.md) - [BlynkRoute](docs/BlynkRoute.md) @@ -226,9 +240,11 @@ Class | Method | HTTP request | Description - [Contact](docs/Contact.md) - [CreateFleetRequest](docs/CreateFleetRequest.md) - [CreateJob201Response](docs/CreateJob201Response.md) + - [CreateLegacyWebhookEventRequest](docs/CreateLegacyWebhookEventRequest.md) - [CreateMonitor](docs/CreateMonitor.md) - [CreateProductRequest](docs/CreateProductRequest.md) - [CreateProjectRequest](docs/CreateProjectRequest.md) + - [CreateProjectSecretRequest](docs/CreateProjectSecretRequest.md) - [CreateUpdateRepository](docs/CreateUpdateRepository.md) - [CurrentFirmware](docs/CurrentFirmware.md) - [DFUEnv](docs/DFUEnv.md) @@ -276,6 +292,10 @@ Class | Method | HTTP request | Description - [GetDeviceFleets200Response](docs/GetDeviceFleets200Response.md) - [GetDeviceHealthLog200Response](docs/GetDeviceHealthLog200Response.md) - [GetDeviceHealthLog200ResponseHealthLogInner](docs/GetDeviceHealthLog200ResponseHealthLogInner.md) + - [GetDeviceJourney200Response](docs/GetDeviceJourney200Response.md) + - [GetDeviceJourney200ResponseJourney](docs/GetDeviceJourney200ResponseJourney.md) + - [GetDeviceJourneys200Response](docs/GetDeviceJourneys200Response.md) + - [GetDeviceJourneys200ResponseJourneysInner](docs/GetDeviceJourneys200ResponseJourneysInner.md) - [GetDeviceLatestEvents200Response](docs/GetDeviceLatestEvents200Response.md) - [GetDevicePlans200Response](docs/GetDevicePlans200Response.md) - [GetDevicePublicKey200Response](docs/GetDevicePublicKey200Response.md) @@ -290,6 +310,7 @@ Class | Method | HTTP request | Description - [GetNotefile200Response](docs/GetNotefile200Response.md) - [GetProducts200Response](docs/GetProducts200Response.md) - [GetProjectMembers200Response](docs/GetProjectMembers200Response.md) + - [GetProjectSecretsResponse](docs/GetProjectSecretsResponse.md) - [GetProjects200Response](docs/GetProjects200Response.md) - [GetRouteLogsUsage200Response](docs/GetRouteLogsUsage200Response.md) - [GetSessionsUsage200Response](docs/GetSessionsUsage200Response.md) @@ -297,6 +318,10 @@ Class | Method | HTTP request | Description - [GoogleRoute](docs/GoogleRoute.md) - [HttpRoute](docs/HttpRoute.md) - [Job](docs/Job.md) + - [JobDefinition](docs/JobDefinition.md) + - [JobDefinitionReportOptions](docs/JobDefinitionReportOptions.md) + - [JobDefinitionSelect](docs/JobDefinitionSelect.md) + - [JobDetail](docs/JobDetail.md) - [JobRun](docs/JobRun.md) - [Location](docs/Location.md) - [Login200Response](docs/Login200Response.md) @@ -319,11 +344,15 @@ Class | Method | HTTP request | Description - [Product](docs/Product.md) - [Project](docs/Project.md) - [ProjectMember](docs/ProjectMember.md) + - [ProjectSecret](docs/ProjectSecret.md) - [ProvisionDeviceRequest](docs/ProvisionDeviceRequest.md) - [ProxyRoute](docs/ProxyRoute.md) - [QubitroRoute](docs/QubitroRoute.md) - [RadRoute](docs/RadRoute.md) - [Repository](docs/Repository.md) + - [RepositoryListResponse](docs/RepositoryListResponse.md) + - [RepositoryTokenRequest](docs/RepositoryTokenRequest.md) + - [RepositoryTokenResponse](docs/RepositoryTokenResponse.md) - [Role](docs/Role.md) - [RouteLog](docs/RouteLog.md) - [RouteTransformSettings](docs/RouteTransformSettings.md) @@ -344,6 +373,7 @@ Class | Method | HTTP request | Description - [TwilioRoute](docs/TwilioRoute.md) - [UpdateFleetRequest](docs/UpdateFleetRequest.md) - [UpdateHostFirmwareRequest](docs/UpdateHostFirmwareRequest.md) + - [UpdateProjectSecretRequest](docs/UpdateProjectSecretRequest.md) - [UploadMetadata](docs/UploadMetadata.md) - [UsageData](docs/UsageData.md) - [UsageEventsData](docs/UsageEventsData.md) diff --git a/src/docs/BatchJobRequests.md b/src/docs/BatchJobRequests.md new file mode 100644 index 0000000..5685a06 --- /dev/null +++ b/src/docs/BatchJobRequests.md @@ -0,0 +1,41 @@ +# BatchJobRequests + +Operations to apply to a device + +## Properties + +| Name | Type | Description | Notes | +| ---------------------------------- | ------------------ | -------------------------------------------------------------------- | ---------- | +| **comment** | **str** | | [optional] | +| **connectivity_assurance_disable** | **bool** | Disable connectivity assurance for the device | [optional] | +| **connectivity_assurance_enable** | **bool** | Enable connectivity assurance for the device | [optional] | +| **disable** | **bool** | Disable the device | [optional] | +| **enable** | **bool** | Enable the device | [optional] | +| **fleets_to_default** | **List[str]** | Fleet UIDs to assign to the device if it has no fleets | [optional] | +| **fleets_to_join** | **List[str]** | Fleet UIDs to add the device to | [optional] | +| **fleets_to_leave** | **List[str]** | Fleet UIDs to remove the device from | [optional] | +| **provision_product** | **str** | Product UID to provision the device with if not already provisioned | [optional] | +| **sn_to_default** | **str** | Set the device serial number only if not already set | [optional] | +| **sn_to_set** | **str** | Set the device serial number (\"-\" to clear) | [optional] | +| **vars_to_default** | **Dict[str, str]** | Environment variables to set only if not already set | [optional] | +| **vars_to_set** | **Dict[str, str]** | Environment variables to set (use \"-\" as value to clear) | [optional] | + +## Example + +```python +from notehub_py.models.batch_job_requests import BatchJobRequests + +# TODO update the JSON string below +json = "{}" +# create an instance of BatchJobRequests from a JSON string +batch_job_requests_instance = BatchJobRequests.from_json(json) +# print the JSON string representation of the object +print(BatchJobRequests.to_json()) + +# convert the object into a dict +batch_job_requests_dict = batch_job_requests_instance.to_dict() +# create an instance of BatchJobRequests from a dict +batch_job_requests_from_dict = BatchJobRequests.from_dict(batch_job_requests_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/CreateLegacyWebhookEventRequest.md b/src/docs/CreateLegacyWebhookEventRequest.md new file mode 100644 index 0000000..e685905 --- /dev/null +++ b/src/docs/CreateLegacyWebhookEventRequest.md @@ -0,0 +1,37 @@ +# CreateLegacyWebhookEventRequest + +## Properties + +| Name | Type | Description | Notes | +| ----------- | --------------------- | -------------------------------------------------- | ---------- | +| **body** | **Dict[str, object]** | Arbitrary JSON event body. | [optional] | +| **file** | **str** | The notefile to which the event should be written. | [optional] | +| **payload** | **str** | Optional base64-encoded binary payload. | [optional] | + +## Example + +```python +from notehub_py.models.create_legacy_webhook_event_request import ( + CreateLegacyWebhookEventRequest, +) + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateLegacyWebhookEventRequest from a JSON string +create_legacy_webhook_event_request_instance = ( + CreateLegacyWebhookEventRequest.from_json(json) +) +# print the JSON string representation of the object +print(CreateLegacyWebhookEventRequest.to_json()) + +# convert the object into a dict +create_legacy_webhook_event_request_dict = ( + create_legacy_webhook_event_request_instance.to_dict() +) +# create an instance of CreateLegacyWebhookEventRequest from a dict +create_legacy_webhook_event_request_from_dict = ( + CreateLegacyWebhookEventRequest.from_dict(create_legacy_webhook_event_request_dict) +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/CreateMonitor.md b/src/docs/CreateMonitor.md index 3d04a69..ee0be6c 100644 --- a/src/docs/CreateMonitor.md +++ b/src/docs/CreateMonitor.md @@ -22,6 +22,9 @@ | **source_type** | **str** | The type of source to monitor. Supported values are \"event\" and \"heartbeat\". | | **threshold** | **int** | The type of condition to apply to the value selected by the source_selector | | **uid** | **str** | | [optional] | +| **usage_scope** | **str** | For usage monitors: the scope of aggregation. Supported values are \"device\" and \"fleet\". | [optional] | +| **usage_type** | **str** | For usage monitors: the type of data usage to monitor. Supported values are \"cellular\" and \"satellite\". | [optional] | +| **usage_window** | **int** | For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days). | [optional] | ## Example diff --git a/src/docs/CreateProjectSecretRequest.md b/src/docs/CreateProjectSecretRequest.md new file mode 100644 index 0000000..0bdf744 --- /dev/null +++ b/src/docs/CreateProjectSecretRequest.md @@ -0,0 +1,30 @@ +# CreateProjectSecretRequest + +## Properties + +| Name | Type | Description | Notes | +| --------- | ------- | -------------------------------------------------------------------- | ----- | +| **name** | **str** | The secret name (alphanumeric and underscores only). | +| **value** | **str** | The secret value (encrypted at rest, never returned after creation). | + +## Example + +```python +from notehub_py.models.create_project_secret_request import CreateProjectSecretRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateProjectSecretRequest from a JSON string +create_project_secret_request_instance = CreateProjectSecretRequest.from_json(json) +# print the JSON string representation of the object +print(CreateProjectSecretRequest.to_json()) + +# convert the object into a dict +create_project_secret_request_dict = create_project_secret_request_instance.to_dict() +# create an instance of CreateProjectSecretRequest from a dict +create_project_secret_request_from_dict = CreateProjectSecretRequest.from_dict( + create_project_secret_request_dict +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/DeviceApi.md b/src/docs/DeviceApi.md index 791abab..cfc352a 100644 --- a/src/docs/DeviceApi.md +++ b/src/docs/DeviceApi.md @@ -19,6 +19,8 @@ All URIs are relative to *https://api.notefile.net* | [**get_device_environment_variables**](DeviceApi.md#get_device_environment_variables) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables | | [**get_device_environment_variables_by_pin**](DeviceApi.md#get_device_environment_variables_by_pin) | **GET** /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin | | [**get_device_health_log**](DeviceApi.md#get_device_health_log) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log | +| [**get_device_journey**](DeviceApi.md#get_device_journey) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys/{journeyID} | +| [**get_device_journeys**](DeviceApi.md#get_device_journeys) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys | | [**get_device_latest_events**](DeviceApi.md#get_device_latest_events) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest | | [**get_device_plans**](DeviceApi.md#get_device_plans) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans | | [**get_device_public_key**](DeviceApi.md#get_device_public_key) | **GET** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key | @@ -759,6 +761,7 @@ from notehub_py.models.get_device_environment_variables_by_pin200_response impor from notehub_py.rest import ApiException from pprint import pprint +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_TOKEN") # Enter a context with an instance of the API client with notehub_py.ApiClient(configuration) as api_client: @@ -797,7 +800,7 @@ with notehub_py.ApiClient(configuration) as api_client: ### Authorization -No authorization required +[personalAccessToken](../README.md#personalAccessToken) ### HTTP request headers @@ -871,6 +874,128 @@ with notehub_py.ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json +## get_device_journey + +> GetDeviceJourney200Response get_device_journey(project_or_product_uid, device_uid, journey_id, page_size=page_size, page_num=page_num) + +Get a single journey for a device along with its `_track.qo` events. The events array is paginated via `pageSize` / `pageNum`; use `journey.has_more` to detect additional pages. + +### Example + +```python +import notehub_py +from notehub_py.models.get_device_journey200_response import GetDeviceJourney200Response +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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.DeviceApi(api_client) + project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | + device_uid = "dev:000000000000000" # str | + journey_id = 56 # int | Identifier of the journey, taken from the `journey` field on `_track.qo` events (a Unix timestamp marking the start of the journey). + page_size = 50 # int | (optional) (default to 50) + page_num = 1 # int | (optional) (default to 1) + + try: + api_response = api_instance.get_device_journey( + project_or_product_uid, + device_uid, + journey_id, + page_size=page_size, + page_num=page_num, + ) + print("The response of DeviceApi->get_device_journey:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DeviceApi->get_device_journey: %s\n" % e) +``` + +### Parameters + +| Name | Type | Description | Notes | +| -------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | +| **project_or_product_uid** | **str** | | +| **device_uid** | **str** | | +| **journey_id** | **int** | Identifier of the journey, taken from the `journey` field on `\_track.qo` events (a Unix timestamp marking the start of the journey). | +| **page_size** | **int** | | [optional] [default to 50] | +| **page_num** | **int** | | [optional] [default to 1] | + +### Return type + +[**GetDeviceJourney200Response**](GetDeviceJourney200Response.md) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## get_device_journeys + +> GetDeviceJourneys200Response get_device_journeys(project_or_product_uid, device_uid, start_date=start_date, end_date=end_date) + +Get the list of journeys for a device, derived from `_track.qo` events. Returns journey metadata only (no event payloads). Capped at 100 most recent journeys; `has_more` is true when the cap is hit. + +### Example + +```python +import notehub_py +from notehub_py.models.get_device_journeys200_response import ( + GetDeviceJourneys200Response, +) +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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.DeviceApi(api_client) + project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | + device_uid = "dev:000000000000000" # str | + 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) + + try: + api_response = api_instance.get_device_journeys( + project_or_product_uid, device_uid, start_date=start_date, end_date=end_date + ) + print("The response of DeviceApi->get_device_journeys:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DeviceApi->get_device_journeys: %s\n" % e) +``` + +### Parameters + +| Name | Type | Description | Notes | +| -------------------------- | ------- | --------------------------------------------------------------- | ---------- | +| **project_or_product_uid** | **str** | | +| **device_uid** | **str** | | +| **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] | + +### Return type + +[**GetDeviceJourneys200Response**](GetDeviceJourneys200Response.md) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + ## get_device_latest_events > GetDeviceLatestEvents200Response get_device_latest_events(project_or_product_uid, device_uid) @@ -1598,6 +1723,7 @@ from notehub_py.models.environment_variables import EnvironmentVariables from notehub_py.rest import ApiException from pprint import pprint +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_TOKEN") # Enter a context with an instance of the API client with notehub_py.ApiClient(configuration) as api_client: @@ -1640,7 +1766,7 @@ with notehub_py.ApiClient(configuration) as api_client: ### Authorization -No authorization required +[personalAccessToken](../README.md#personalAccessToken) ### HTTP request headers diff --git a/src/docs/GetDeviceJourney200Response.md b/src/docs/GetDeviceJourney200Response.md new file mode 100644 index 0000000..b30b700 --- /dev/null +++ b/src/docs/GetDeviceJourney200Response.md @@ -0,0 +1,32 @@ +# GetDeviceJourney200Response + +## Properties + +| Name | Type | Description | Notes | +| -------------- | ------------------------------------------------------------------------------- | --------------------------------------- | ----- | +| **end_date** | **datetime** | Latest event time within the journey. | +| **journey** | [**GetDeviceJourney200ResponseJourney**](GetDeviceJourney200ResponseJourney.md) | | +| **journey_id** | **int** | Identifier of the journey. | +| **start_date** | **datetime** | Earliest event time within the journey. | + +## Example + +```python +from notehub_py.models.get_device_journey200_response import GetDeviceJourney200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDeviceJourney200Response from a JSON string +get_device_journey200_response_instance = GetDeviceJourney200Response.from_json(json) +# print the JSON string representation of the object +print(GetDeviceJourney200Response.to_json()) + +# convert the object into a dict +get_device_journey200_response_dict = get_device_journey200_response_instance.to_dict() +# create an instance of GetDeviceJourney200Response from a dict +get_device_journey200_response_from_dict = GetDeviceJourney200Response.from_dict( + get_device_journey200_response_dict +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/GetDeviceJourney200ResponseJourney.md b/src/docs/GetDeviceJourney200ResponseJourney.md new file mode 100644 index 0000000..2738a79 --- /dev/null +++ b/src/docs/GetDeviceJourney200ResponseJourney.md @@ -0,0 +1,40 @@ +# GetDeviceJourney200ResponseJourney + +Paginated `_track.qo` events for the journey. + +## Properties + +| Name | Type | Description | Notes | +| ------------ | --------------------------- | ----------- | ----- | +| **events** | [**List[Event]**](Event.md) | | +| **has_more** | **bool** | | + +## Example + +```python +from notehub_py.models.get_device_journey200_response_journey import ( + GetDeviceJourney200ResponseJourney, +) + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDeviceJourney200ResponseJourney from a JSON string +get_device_journey200_response_journey_instance = ( + GetDeviceJourney200ResponseJourney.from_json(json) +) +# print the JSON string representation of the object +print(GetDeviceJourney200ResponseJourney.to_json()) + +# convert the object into a dict +get_device_journey200_response_journey_dict = ( + get_device_journey200_response_journey_instance.to_dict() +) +# create an instance of GetDeviceJourney200ResponseJourney from a dict +get_device_journey200_response_journey_from_dict = ( + GetDeviceJourney200ResponseJourney.from_dict( + get_device_journey200_response_journey_dict + ) +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/GetDeviceJourneys200Response.md b/src/docs/GetDeviceJourneys200Response.md new file mode 100644 index 0000000..9a75eaa --- /dev/null +++ b/src/docs/GetDeviceJourneys200Response.md @@ -0,0 +1,34 @@ +# GetDeviceJourneys200Response + +## Properties + +| Name | Type | Description | Notes | +| ------------ | --------------------------------------------------------------------------------------------------- | ----------- | ----- | +| **has_more** | **bool** | | +| **journeys** | [**List[GetDeviceJourneys200ResponseJourneysInner]**](GetDeviceJourneys200ResponseJourneysInner.md) | | + +## Example + +```python +from notehub_py.models.get_device_journeys200_response import ( + GetDeviceJourneys200Response, +) + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDeviceJourneys200Response from a JSON string +get_device_journeys200_response_instance = GetDeviceJourneys200Response.from_json(json) +# print the JSON string representation of the object +print(GetDeviceJourneys200Response.to_json()) + +# convert the object into a dict +get_device_journeys200_response_dict = ( + get_device_journeys200_response_instance.to_dict() +) +# create an instance of GetDeviceJourneys200Response from a dict +get_device_journeys200_response_from_dict = GetDeviceJourneys200Response.from_dict( + get_device_journeys200_response_dict +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/GetDeviceJourneys200ResponseJourneysInner.md b/src/docs/GetDeviceJourneys200ResponseJourneysInner.md new file mode 100644 index 0000000..8ecb558 --- /dev/null +++ b/src/docs/GetDeviceJourneys200ResponseJourneysInner.md @@ -0,0 +1,40 @@ +# GetDeviceJourneys200ResponseJourneysInner + +## Properties + +| Name | Type | Description | Notes | +| ---------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | +| **end_date** | **datetime** | Latest event time within the journey. | +| **journey_id** | **int** | Identifier of the journey, taken from the `journey` field on `\_track.qo` events. This value is itself a Unix timestamp marking the start of the journey. | +| **start_date** | **datetime** | Earliest event time within the journey. | +| **total_events** | **int** | The number of \_track.qo events in the journey. | + +## Example + +```python +from notehub_py.models.get_device_journeys200_response_journeys_inner import ( + GetDeviceJourneys200ResponseJourneysInner, +) + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDeviceJourneys200ResponseJourneysInner from a JSON string +get_device_journeys200_response_journeys_inner_instance = ( + GetDeviceJourneys200ResponseJourneysInner.from_json(json) +) +# print the JSON string representation of the object +print(GetDeviceJourneys200ResponseJourneysInner.to_json()) + +# convert the object into a dict +get_device_journeys200_response_journeys_inner_dict = ( + get_device_journeys200_response_journeys_inner_instance.to_dict() +) +# create an instance of GetDeviceJourneys200ResponseJourneysInner from a dict +get_device_journeys200_response_journeys_inner_from_dict = ( + GetDeviceJourneys200ResponseJourneysInner.from_dict( + get_device_journeys200_response_journeys_inner_dict + ) +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/GetProjectSecretsResponse.md b/src/docs/GetProjectSecretsResponse.md new file mode 100644 index 0000000..e2d1165 --- /dev/null +++ b/src/docs/GetProjectSecretsResponse.md @@ -0,0 +1,29 @@ +# GetProjectSecretsResponse + +## Properties + +| Name | Type | Description | Notes | +| ----------- | ------------------------------------------- | ----------- | ----- | +| **secrets** | [**List[ProjectSecret]**](ProjectSecret.md) | | + +## Example + +```python +from notehub_py.models.get_project_secrets_response import GetProjectSecretsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetProjectSecretsResponse from a JSON string +get_project_secrets_response_instance = GetProjectSecretsResponse.from_json(json) +# print the JSON string representation of the object +print(GetProjectSecretsResponse.to_json()) + +# convert the object into a dict +get_project_secrets_response_dict = get_project_secrets_response_instance.to_dict() +# create an instance of GetProjectSecretsResponse from a dict +get_project_secrets_response_from_dict = GetProjectSecretsResponse.from_dict( + get_project_secrets_response_dict +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/Job.md b/src/docs/Job.md index a78f4d2..fe7705e 100644 --- a/src/docs/Job.md +++ b/src/docs/Job.md @@ -2,13 +2,15 @@ ## Properties -| Name | Type | Description | Notes | -| -------------- | --------------------- | ----------------------------------------- | ---------- | -| **created** | **int** | Unix timestamp when job was created | -| **created_by** | **str** | User who created the job | -| **definition** | **Dict[str, object]** | Full job definition (only in detail view) | [optional] | -| **job_uid** | **str** | Unique identifier for the job | -| **name** | **str** | Human-readable job name | +| Name | Type | Description | Notes | +| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | +| **created** | **int** | Unix timestamp when job was created | +| **created_by** | **str** | User who created the job | +| **job_uid** | **str** | Unique identifier for the job | +| **last_run_completed** | **int** | Unix timestamp when the most recent run completed (0 if still in progress) | [optional] | +| **last_run_status** | **str** | Status of the most recent job run. Terminal values are: \"submitted\", \"completed successfully\", \"dry run completed successfully\", \"completed with errors\", \"cancelled\". While a job is running, intermediate per-device progress updates may appear (e.g. \"dev:000000000000000 completed\", \"dev:000000000000000 updated: ...\"). | [optional] | +| **last_run_submitted** | **int** | Unix timestamp when the most recent run was submitted | [optional] | +| **name** | **str** | Human-readable job name | ## Example diff --git a/src/docs/JobDefinition.md b/src/docs/JobDefinition.md new file mode 100644 index 0000000..7b4b678 --- /dev/null +++ b/src/docs/JobDefinition.md @@ -0,0 +1,33 @@ +# JobDefinition + +Batch job definition + +## Properties + +| Name | Type | Description | Notes | +| -------------------- | --------------------------------------------------------------- | ------------------------------------------------------ | ---------- | +| **comment** | **str** | Human-readable description of the job | [optional] | +| **default_requests** | [**BatchJobRequests**](BatchJobRequests.md) | | [optional] | +| **device_requests** | [**Dict[str, BatchJobRequests]**](BatchJobRequests.md) | Device-specific request overrides, keyed by device UID | [optional] | +| **report_options** | [**JobDefinitionReportOptions**](JobDefinitionReportOptions.md) | | [optional] | +| **select** | [**JobDefinitionSelect**](JobDefinitionSelect.md) | | [optional] | + +## Example + +```python +from notehub_py.models.job_definition import JobDefinition + +# TODO update the JSON string below +json = "{}" +# create an instance of JobDefinition from a JSON string +job_definition_instance = JobDefinition.from_json(json) +# print the JSON string representation of the object +print(JobDefinition.to_json()) + +# convert the object into a dict +job_definition_dict = job_definition_instance.to_dict() +# create an instance of JobDefinition from a dict +job_definition_from_dict = JobDefinition.from_dict(job_definition_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/JobDefinitionReportOptions.md b/src/docs/JobDefinitionReportOptions.md new file mode 100644 index 0000000..f8bda21 --- /dev/null +++ b/src/docs/JobDefinitionReportOptions.md @@ -0,0 +1,38 @@ +# JobDefinitionReportOptions + +Controls what data is included in the job report + +## Properties + +| Name | Type | Description | Notes | +| ------------------- | -------- | --------------------------------------------------- | ---------- | +| **app_fleets** | **bool** | Include project fleets in the report | [optional] | +| **app_info** | **bool** | Include project info in the report | [optional] | +| **app_vars** | **bool** | Include project environment variables in the report | [optional] | +| **comment** | **str** | | [optional] | +| **device_activity** | **bool** | Include device activity data in the report | [optional] | +| **device_health** | **bool** | Include device health data in the report | [optional] | +| **device_info** | **bool** | Include device info in the report | [optional] | +| **device_vars** | **bool** | Include device environment variables in the report | [optional] | + +## Example + +```python +from notehub_py.models.job_definition_report_options import JobDefinitionReportOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of JobDefinitionReportOptions from a JSON string +job_definition_report_options_instance = JobDefinitionReportOptions.from_json(json) +# print the JSON string representation of the object +print(JobDefinitionReportOptions.to_json()) + +# convert the object into a dict +job_definition_report_options_dict = job_definition_report_options_instance.to_dict() +# create an instance of JobDefinitionReportOptions from a dict +job_definition_report_options_from_dict = JobDefinitionReportOptions.from_dict( + job_definition_report_options_dict +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/JobDefinitionSelect.md b/src/docs/JobDefinitionSelect.md new file mode 100644 index 0000000..b8f5bc0 --- /dev/null +++ b/src/docs/JobDefinitionSelect.md @@ -0,0 +1,35 @@ +# JobDefinitionSelect + +Device selection criteria + +## Properties + +| Name | Type | Description | Notes | +| --------------------- | ------------- | ---------------------------------------------------------------------- | ---------- | +| **all_devices** | **bool** | Select all devices in the project | [optional] | +| **comment** | **str** | | [optional] | +| **devices** | **List[str]** | Specific device UIDs to include | [optional] | +| **devices_by_sn** | **List[str]** | Serial number patterns to match (supports glob wildcards \*, ?, [...]) | [optional] | +| **devices_in_fleets** | **List[str]** | Fleet UIDs whose devices should be included | [optional] | + +## Example + +```python +from notehub_py.models.job_definition_select import JobDefinitionSelect + +# TODO update the JSON string below +json = "{}" +# create an instance of JobDefinitionSelect from a JSON string +job_definition_select_instance = JobDefinitionSelect.from_json(json) +# print the JSON string representation of the object +print(JobDefinitionSelect.to_json()) + +# convert the object into a dict +job_definition_select_dict = job_definition_select_instance.to_dict() +# create an instance of JobDefinitionSelect from a dict +job_definition_select_from_dict = JobDefinitionSelect.from_dict( + job_definition_select_dict +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/JobDetail.md b/src/docs/JobDetail.md new file mode 100644 index 0000000..887de19 --- /dev/null +++ b/src/docs/JobDetail.md @@ -0,0 +1,36 @@ +# JobDetail + +Batch job with full definition + +## Properties + +| Name | Type | Description | Notes | +| ---------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | +| **created** | **int** | Unix timestamp when job was created | +| **created_by** | **str** | User who created the job | +| **job_uid** | **str** | Unique identifier for the job | +| **last_run_completed** | **int** | Unix timestamp when the most recent run completed (0 if still in progress) | [optional] | +| **last_run_status** | **str** | Status of the most recent job run. Terminal values are: \"submitted\", \"completed successfully\", \"dry run completed successfully\", \"completed with errors\", \"cancelled\". While a job is running, intermediate per-device progress updates may appear (e.g. \"dev:000000000000000 completed\", \"dev:000000000000000 updated: ...\"). | [optional] | +| **last_run_submitted** | **int** | Unix timestamp when the most recent run was submitted | [optional] | +| **name** | **str** | Human-readable job name | +| **definition** | [**JobDefinition**](JobDefinition.md) | | [optional] | + +## Example + +```python +from notehub_py.models.job_detail import JobDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of JobDetail from a JSON string +job_detail_instance = JobDetail.from_json(json) +# print the JSON string representation of the object +print(JobDetail.to_json()) + +# convert the object into a dict +job_detail_dict = job_detail_instance.to_dict() +# create an instance of JobDetail from a dict +job_detail_from_dict = JobDetail.from_dict(job_detail_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/JobsApi.md b/src/docs/JobsApi.md index 1572c7f..77e9a08 100644 --- a/src/docs/JobsApi.md +++ b/src/docs/JobsApi.md @@ -7,6 +7,7 @@ All URIs are relative to *https://api.notefile.net* | [**cancel_job_run**](JobsApi.md#cancel_job_run) | **POST** /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel | | [**create_job**](JobsApi.md#create_job) | **POST** /v1/projects/{projectOrProductUID}/jobs | | [**delete_job**](JobsApi.md#delete_job) | **DELETE** /v1/projects/{projectOrProductUID}/jobs/{jobUID} | +| [**delete_job_run**](JobsApi.md#delete_job_run) | **DELETE** /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID} | | [**get_job**](JobsApi.md#get_job) | **GET** /v1/projects/{projectOrProductUID}/jobs/{jobUID} | | [**get_job_run**](JobsApi.md#get_job_run) | **GET** /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID} | | [**get_job_runs**](JobsApi.md#get_job_runs) | **GET** /v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs | @@ -66,7 +67,7 @@ with notehub_py.ApiClient(configuration) as api_client: ## create_job -> CreateJob201Response create_job(project_or_product_uid, name, body) +> CreateJob201Response create_job(project_or_product_uid, name, job_definition) Create a new batch job with an optional name @@ -75,6 +76,7 @@ Create a new batch job with an optional name ```python import notehub_py from notehub_py.models.create_job201_response import CreateJob201Response +from notehub_py.models.job_definition import JobDefinition from notehub_py.rest import ApiException from pprint import pprint @@ -86,10 +88,14 @@ with notehub_py.ApiClient(configuration) as api_client: api_instance = notehub_py.JobsApi(api_client) project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | name = "name_example" # str | Name for the job - body = None # object | The job definition as raw JSON + job_definition = ( + notehub_py.JobDefinition() + ) # JobDefinition | The batch job definition try: - api_response = api_instance.create_job(project_or_product_uid, name, body) + api_response = api_instance.create_job( + project_or_product_uid, name, job_definition + ) print("The response of JobsApi->create_job:\n") pprint(api_response) except Exception as e: @@ -98,11 +104,11 @@ with notehub_py.ApiClient(configuration) as api_client: ### Parameters -| Name | Type | Description | Notes | -| -------------------------- | ---------- | ------------------------------ | ----- | -| **project_or_product_uid** | **str** | | -| **name** | **str** | Name for the job | -| **body** | **object** | The job definition as raw JSON | +| Name | Type | Description | Notes | +| -------------------------- | ------------------------------------- | ------------------------ | ----- | +| **project_or_product_uid** | **str** | | +| **name** | **str** | Name for the job | +| **job_definition** | [**JobDefinition**](JobDefinition.md) | The batch job definition | ### Return type @@ -168,9 +174,57 @@ with notehub_py.ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json +## delete_job_run + +> delete_job_run(project_or_product_uid, report_uid) + +Delete the results of a job run + +### Example + +```python +import notehub_py +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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.JobsApi(api_client) + project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | + report_uid = "my-reconciliation-job-1707654321000" # str | Unique identifier for a job run report + + try: + api_instance.delete_job_run(project_or_product_uid, report_uid) + except Exception as e: + print("Exception when calling JobsApi->delete_job_run: %s\n" % e) +``` + +### Parameters + +| Name | Type | Description | Notes | +| -------------------------- | ------- | -------------------------------------- | ----- | +| **project_or_product_uid** | **str** | | +| **report_uid** | **str** | Unique identifier for a job run report | + +### Return type + +void (empty response body) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + ## get_job -> Job get_job(project_or_product_uid, job_uid) +> JobDetail get_job(project_or_product_uid, job_uid) Get a specific batch job definition @@ -178,7 +232,7 @@ Get a specific batch job definition ```python import notehub_py -from notehub_py.models.job import Job +from notehub_py.models.job_detail import JobDetail from notehub_py.rest import ApiException from pprint import pprint @@ -208,7 +262,7 @@ with notehub_py.ApiClient(configuration) as api_client: ### Return type -[**Job**](Job.md) +[**JobDetail**](JobDetail.md) ### Authorization @@ -221,7 +275,7 @@ with notehub_py.ApiClient(configuration) as api_client: ## get_job_run -> JobRun get_job_run(project_or_product_uid, report_uid) +> JobRun get_job_run(project_or_product_uid, report_uid, view=view) Get the result of a job execution @@ -241,9 +295,12 @@ with notehub_py.ApiClient(configuration) as api_client: api_instance = notehub_py.JobsApi(api_client) project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | report_uid = "my-reconciliation-job-1707654321000" # str | Unique identifier for a job run report + view = "summary" # str | Controls the level of detail returned: 'summary' returns metadata only, 'detail' returns the full result payload (optional) (default to 'summary') try: - api_response = api_instance.get_job_run(project_or_product_uid, report_uid) + api_response = api_instance.get_job_run( + project_or_product_uid, report_uid, view=view + ) print("The response of JobsApi->get_job_run:\n") pprint(api_response) except Exception as e: @@ -252,10 +309,11 @@ with notehub_py.ApiClient(configuration) as api_client: ### Parameters -| Name | Type | Description | Notes | -| -------------------------- | ------- | -------------------------------------- | ----- | -| **project_or_product_uid** | **str** | | -| **report_uid** | **str** | Unique identifier for a job run report | +| Name | Type | Description | Notes | +| -------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | +| **project_or_product_uid** | **str** | | +| **report_uid** | **str** | Unique identifier for a job run report | +| **view** | **str** | Controls the level of detail returned: 'summary' returns metadata only, 'detail' returns the full result payload | [optional] [default to 'summary'] | ### Return type diff --git a/src/docs/Monitor.md b/src/docs/Monitor.md index 913822d..6e4b92e 100644 --- a/src/docs/Monitor.md +++ b/src/docs/Monitor.md @@ -22,6 +22,9 @@ | **source_type** | **str** | The type of source to monitor. Supported values are \"event\" and \"heartbeat\". | [optional] | | **threshold** | **int** | The type of condition to apply to the value selected by the source_selector | [optional] | | **uid** | **str** | | [optional] | +| **usage_scope** | **str** | For usage monitors: the scope of aggregation. Supported values are \"device\" and \"fleet\". | [optional] | +| **usage_type** | **str** | For usage monitors: the type of data usage to monitor. Supported values are \"cellular\" and \"satellite\". | [optional] | +| **usage_window** | **int** | For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days). | [optional] | ## Example diff --git a/src/docs/ProjectApi.md b/src/docs/ProjectApi.md index 721bc82..050081d 100644 --- a/src/docs/ProjectApi.md +++ b/src/docs/ProjectApi.md @@ -9,6 +9,7 @@ All URIs are relative to *https://api.notefile.net* | [**create_fleet**](ProjectApi.md#create_fleet) | **POST** /v1/projects/{projectOrProductUID}/fleets | | [**create_product**](ProjectApi.md#create_product) | **POST** /v1/projects/{projectOrProductUID}/products | | [**create_project**](ProjectApi.md#create_project) | **POST** /v1/projects | +| [**create_project_secret**](ProjectApi.md#create_project_secret) | **POST** /v1/projects/{projectOrProductUID}/secrets | | [**delete_device_from_fleets**](ProjectApi.md#delete_device_from_fleets) | **DELETE** /v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets | | [**delete_firmware**](ProjectApi.md#delete_firmware) | **DELETE** /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename} | | [**delete_fleet**](ProjectApi.md#delete_fleet) | **DELETE** /v1/projects/{projectOrProductUID}/fleets/{fleetUID} | @@ -16,6 +17,7 @@ All URIs are relative to *https://api.notefile.net* | [**delete_product**](ProjectApi.md#delete_product) | **DELETE** /v1/projects/{projectOrProductUID}/products/{productUID} | | [**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} | +| [**delete_project_secret**](ProjectApi.md#delete_project_secret) | **DELETE** /v1/projects/{projectOrProductUID}/secrets/{secretName} | | [**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 | @@ -37,6 +39,7 @@ All URIs are relative to *https://api.notefile.net* | [**get_project_environment_hierarchy**](ProjectApi.md#get_project_environment_hierarchy) | **GET** /v1/projects/{projectOrProductUID}/environment_hierarchy | Get environment variable hierarchy for a device | | [**get_project_environment_variables**](ProjectApi.md#get_project_environment_variables) | **GET** /v1/projects/{projectOrProductUID}/environment_variables | | [**get_project_members**](ProjectApi.md#get_project_members) | **GET** /v1/projects/{projectOrProductUID}/members | +| [**get_project_secrets**](ProjectApi.md#get_project_secrets) | **GET** /v1/projects/{projectOrProductUID}/secrets | | [**get_projects**](ProjectApi.md#get_projects) | **GET** /v1/projects | | [**perform_dfu_action**](ProjectApi.md#perform_dfu_action) | **POST** /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action} | | [**set_fleet_environment_variables**](ProjectApi.md#set_fleet_environment_variables) | **PUT** /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables | @@ -44,6 +47,7 @@ All URIs are relative to *https://api.notefile.net* | [**set_project_environment_variables**](ProjectApi.md#set_project_environment_variables) | **PUT** /v1/projects/{projectOrProductUID}/environment_variables | | [**update_firmware**](ProjectApi.md#update_firmware) | **POST** /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename} | | [**update_fleet**](ProjectApi.md#update_fleet) | **PUT** /v1/projects/{projectOrProductUID}/fleets/{fleetUID} | +| [**update_project_secret**](ProjectApi.md#update_project_secret) | **PUT** /v1/projects/{projectOrProductUID}/secrets/{secretName} | | [**upload_firmware**](ProjectApi.md#upload_firmware) | **PUT** /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename} | ## add_device_to_fleets @@ -324,6 +328,62 @@ with notehub_py.ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json +## create_project_secret + +> ProjectSecret create_project_secret(project_or_product_uid, create_project_secret_request) + +Create a new project secret + +### Example + +```python +import notehub_py +from notehub_py.models.create_project_secret_request import CreateProjectSecretRequest +from notehub_py.models.project_secret import ProjectSecret +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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 | + create_project_secret_request = ( + notehub_py.CreateProjectSecretRequest() + ) # CreateProjectSecretRequest | + + try: + api_response = api_instance.create_project_secret( + project_or_product_uid, create_project_secret_request + ) + print("The response of ProjectApi->create_project_secret:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectApi->create_project_secret: %s\n" % e) +``` + +### Parameters + +| Name | Type | Description | Notes | +| --------------------------------- | --------------------------------------------------------------- | ----------- | ----- | +| **project_or_product_uid** | **str** | | +| **create_project_secret_request** | [**CreateProjectSecretRequest**](CreateProjectSecretRequest.md) | | + +### Return type + +[**ProjectSecret**](ProjectSecret.md) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + ## delete_device_from_fleets > GetDeviceFleets200Response delete_device_from_fleets(project_or_product_uid, device_uid, delete_device_from_fleets_request) @@ -690,6 +750,54 @@ with notehub_py.ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json +## delete_project_secret + +> delete_project_secret(project_or_product_uid, secret_name) + +Delete a project secret by name + +### Example + +```python +import notehub_py +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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 | + secret_name = "secret_name_example" # str | The name of the secret. + + try: + api_instance.delete_project_secret(project_or_product_uid, secret_name) + except Exception as e: + print("Exception when calling ProjectApi->delete_project_secret: %s\n" % e) +``` + +### Parameters + +| Name | Type | Description | Notes | +| -------------------------- | ------- | ----------------------- | ----- | +| **project_or_product_uid** | **str** | | +| **secret_name** | **str** | The name of the secret. | + +### Return type + +void (empty response body) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + ## disable_global_event_transformation > disable_global_event_transformation(project_or_product_uid) @@ -1560,6 +1668,7 @@ from notehub_py.models.notefile_schema import NotefileSchema from notehub_py.rest import ApiException from pprint import pprint +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_TOKEN") # Enter a context with an instance of the API client with notehub_py.ApiClient(configuration) as api_client: @@ -1588,7 +1697,7 @@ with notehub_py.ApiClient(configuration) as api_client: ### Authorization -No authorization required +[personalAccessToken](../README.md#personalAccessToken) ### HTTP request headers @@ -1902,6 +2011,55 @@ with notehub_py.ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json +## get_project_secrets + +> GetProjectSecretsResponse get_project_secrets(project_or_product_uid) + +Get all secrets for a project (metadata only, values are never returned) + +### Example + +```python +import notehub_py +from notehub_py.models.get_project_secrets_response import GetProjectSecretsResponse +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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 | + + try: + api_response = api_instance.get_project_secrets(project_or_product_uid) + print("The response of ProjectApi->get_project_secrets:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectApi->get_project_secrets: %s\n" % e) +``` + +### Parameters + +| Name | Type | Description | Notes | +| -------------------------- | ------- | ----------- | ----- | +| **project_or_product_uid** | **str** | | + +### Return type + +[**GetProjectSecretsResponse**](GetProjectSecretsResponse.md) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + ## get_projects > GetProjects200Response get_projects() @@ -2121,7 +2279,7 @@ 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 | - body = None # object | JSONata expression which will be applied to each event before it is persisted and routed + body = "body_example" # str | JSONata expression which will be applied to each event before it is persisted and routed try: api_instance.set_global_event_transformation(project_or_product_uid, body) @@ -2134,10 +2292,10 @@ with notehub_py.ApiClient(configuration) as api_client: ### Parameters -| Name | Type | Description | Notes | -| -------------------------- | ---------- | ---------------------------------------------------------------------------------------- | ----- | -| **project_or_product_uid** | **str** | | -| **body** | **object** | JSONata expression which will be applied to each event before it is persisted and routed | +| Name | Type | Description | Notes | +| -------------------------- | ------- | ---------------------------------------------------------------------------------------- | ----- | +| **project_or_product_uid** | **str** | | +| **body** | **str** | JSONata expression which will be applied to each event before it is persisted and routed | ### Return type @@ -2149,7 +2307,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: text/plain - **Accept**: application/json ## set_project_environment_variables @@ -2331,6 +2489,64 @@ with notehub_py.ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json +## update_project_secret + +> ProjectSecret update_project_secret(project_or_product_uid, secret_name, update_project_secret_request) + +Update the value of an existing project secret + +### Example + +```python +import notehub_py +from notehub_py.models.project_secret import ProjectSecret +from notehub_py.models.update_project_secret_request import UpdateProjectSecretRequest +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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 | + secret_name = "secret_name_example" # str | The name of the secret. + update_project_secret_request = ( + notehub_py.UpdateProjectSecretRequest() + ) # UpdateProjectSecretRequest | + + try: + api_response = api_instance.update_project_secret( + project_or_product_uid, secret_name, update_project_secret_request + ) + print("The response of ProjectApi->update_project_secret:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectApi->update_project_secret: %s\n" % e) +``` + +### Parameters + +| Name | Type | Description | Notes | +| --------------------------------- | --------------------------------------------------------------- | ----------------------- | ----- | +| **project_or_product_uid** | **str** | | +| **secret_name** | **str** | The name of the secret. | +| **update_project_secret_request** | [**UpdateProjectSecretRequest**](UpdateProjectSecretRequest.md) | | + +### Return type + +[**ProjectSecret**](ProjectSecret.md) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + ## upload_firmware > FirmwareInfo upload_firmware(project_or_product_uid, firmware_type, filename, body, version=version, notes=notes) diff --git a/src/docs/ProjectSecret.md b/src/docs/ProjectSecret.md new file mode 100644 index 0000000..b0edb71 --- /dev/null +++ b/src/docs/ProjectSecret.md @@ -0,0 +1,33 @@ +# ProjectSecret + +Metadata for a project secret. The value is never returned. + +## Properties + +| Name | Type | Description | Notes | +| --------------- | ------------ | ---------------------------------------------------- | ---------- | +| **created** | **datetime** | When the secret was first created. | +| **created_by** | **str** | The actor who created the secret. | +| **modified** | **datetime** | When the secret was last updated. | [optional] | +| **modified_by** | **str** | The actor who last updated the secret. | [optional] | +| **name** | **str** | The secret name (alphanumeric and underscores only). | + +## Example + +```python +from notehub_py.models.project_secret import ProjectSecret + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectSecret from a JSON string +project_secret_instance = ProjectSecret.from_json(json) +# print the JSON string representation of the object +print(ProjectSecret.to_json()) + +# convert the object into a dict +project_secret_dict = project_secret_instance.to_dict() +# create an instance of ProjectSecret from a dict +project_secret_from_dict = ProjectSecret.from_dict(project_secret_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/RepositoryListResponse.md b/src/docs/RepositoryListResponse.md new file mode 100644 index 0000000..34ad5a4 --- /dev/null +++ b/src/docs/RepositoryListResponse.md @@ -0,0 +1,29 @@ +# RepositoryListResponse + +## Properties + +| Name | Type | Description | Notes | +| ---------------- | ------------------------------------- | ----------- | ----- | +| **repositories** | [**List[Repository]**](Repository.md) | | + +## Example + +```python +from notehub_py.models.repository_list_response import RepositoryListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RepositoryListResponse from a JSON string +repository_list_response_instance = RepositoryListResponse.from_json(json) +# print the JSON string representation of the object +print(RepositoryListResponse.to_json()) + +# convert the object into a dict +repository_list_response_dict = repository_list_response_instance.to_dict() +# create an instance of RepositoryListResponse from a dict +repository_list_response_from_dict = RepositoryListResponse.from_dict( + repository_list_response_dict +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/RepositoryTokenRequest.md b/src/docs/RepositoryTokenRequest.md new file mode 100644 index 0000000..718d613 --- /dev/null +++ b/src/docs/RepositoryTokenRequest.md @@ -0,0 +1,30 @@ +# RepositoryTokenRequest + +## Properties + +| Name | Type | Description | Notes | +| --------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | +| **intent** | **str** | Access intent for the vended credentials. Only `read` is supported today; `write` and `admin` are reserved for future use. | [optional] [default to 'read'] | +| **ttl_seconds** | **int** | Requested credential lifetime in seconds. Clamped server-side to [60, 3600]. Defaults to 900 (15 minutes) if omitted. | [optional] [default to 900] | + +## Example + +```python +from notehub_py.models.repository_token_request import RepositoryTokenRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RepositoryTokenRequest from a JSON string +repository_token_request_instance = RepositoryTokenRequest.from_json(json) +# print the JSON string representation of the object +print(RepositoryTokenRequest.to_json()) + +# convert the object into a dict +repository_token_request_dict = repository_token_request_instance.to_dict() +# create an instance of RepositoryTokenRequest from a dict +repository_token_request_from_dict = RepositoryTokenRequest.from_dict( + repository_token_request_dict +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/RepositoryTokenResponse.md b/src/docs/RepositoryTokenResponse.md new file mode 100644 index 0000000..a25877c --- /dev/null +++ b/src/docs/RepositoryTokenResponse.md @@ -0,0 +1,34 @@ +# RepositoryTokenResponse + +## Properties + +| Name | Type | Description | Notes | +| -------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------- | ----- | +| **database** | **str** | Storage service database name scoped to this repository | +| **expires_at** | **datetime** | Absolute expiration time of the ephemeral user. The storage service will reject connections and queries after this instant. | +| **host** | **str** | Storage service hostname the caller should connect to | +| **password** | **str** | Ephemeral password. Returned once; not stored by Notehub. Hold this in memory only and discard after `expires_at`. | +| **port** | **int** | Storage service port | +| **username** | **str** | Ephemeral storage service username (prefixed with `u\_`) | + +## Example + +```python +from notehub_py.models.repository_token_response import RepositoryTokenResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RepositoryTokenResponse from a JSON string +repository_token_response_instance = RepositoryTokenResponse.from_json(json) +# print the JSON string representation of the object +print(RepositoryTokenResponse.to_json()) + +# convert the object into a dict +repository_token_response_dict = repository_token_response_instance.to_dict() +# create an instance of RepositoryTokenResponse from a dict +repository_token_response_from_dict = RepositoryTokenResponse.from_dict( + repository_token_response_dict +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/UpdateProjectSecretRequest.md b/src/docs/UpdateProjectSecretRequest.md new file mode 100644 index 0000000..b19c30d --- /dev/null +++ b/src/docs/UpdateProjectSecretRequest.md @@ -0,0 +1,29 @@ +# UpdateProjectSecretRequest + +## Properties + +| Name | Type | Description | Notes | +| --------- | ------- | --------------------------------------------------------- | ----- | +| **value** | **str** | The new secret value (encrypted at rest, never returned). | + +## Example + +```python +from notehub_py.models.update_project_secret_request import UpdateProjectSecretRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateProjectSecretRequest from a JSON string +update_project_secret_request_instance = UpdateProjectSecretRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateProjectSecretRequest.to_json()) + +# convert the object into a dict +update_project_secret_request_dict = update_project_secret_request_instance.to_dict() +# create an instance of UpdateProjectSecretRequest from a dict +update_project_secret_request_from_dict = UpdateProjectSecretRequest.from_dict( + update_project_secret_request_dict +) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/WebhookApi.md b/src/docs/WebhookApi.md index cb9dc11..7c87fc0 100644 --- a/src/docs/WebhookApi.md +++ b/src/docs/WebhookApi.md @@ -2,13 +2,80 @@ All URIs are relative to *https://api.notefile.net* -| Method | HTTP request | Description | -| -------------------------------------------------- | ------------------------------------------------------------------- | ----------- | -| [**create_webhook**](WebhookApi.md#create_webhook) | **POST** /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | -| [**delete_webhook**](WebhookApi.md#delete_webhook) | **DELETE** /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | -| [**get_webhook**](WebhookApi.md#get_webhook) | **GET** /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | -| [**get_webhooks**](WebhookApi.md#get_webhooks) | **GET** /v1/projects/{projectOrProductUID}/webhooks | -| [**update_webhook**](WebhookApi.md#update_webhook) | **PUT** /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | +| Method | HTTP request | Description | +| -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ----------- | +| [**create_legacy_webhook_event**](WebhookApi.md#create_legacy_webhook_event) | **POST** /v1/products/{productUID}/devices/{deviceUID}/webhook-event | +| [**create_webhook**](WebhookApi.md#create_webhook) | **POST** /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | +| [**create_webhook_device_event_by_product**](WebhookApi.md#create_webhook_device_event_by_product) | **POST** /v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event | +| [**create_webhook_event_by_product**](WebhookApi.md#create_webhook_event_by_product) | **POST** /v1/products/{productUID}/webhooks/{webhookUID}/event | +| [**delete_webhook**](WebhookApi.md#delete_webhook) | **DELETE** /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | +| [**get_webhook**](WebhookApi.md#get_webhook) | **GET** /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | +| [**get_webhook_settings_by_product**](WebhookApi.md#get_webhook_settings_by_product) | **GET** /v1/products/{productUID}/webhooks/{webhookUID}/settings | +| [**get_webhooks**](WebhookApi.md#get_webhooks) | **GET** /v1/projects/{projectOrProductUID}/webhooks | +| [**update_legacy_webhook_session**](WebhookApi.md#update_legacy_webhook_session) | **PUT** /v1/products/{productUID}/devices/{deviceUID}/webhook-session | +| [**update_webhook**](WebhookApi.md#update_webhook) | **PUT** /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | +| [**update_webhook_settings_by_product**](WebhookApi.md#update_webhook_settings_by_product) | **PUT** /v1/products/{productUID}/webhooks/{webhookUID}/settings | + +## create_legacy_webhook_event + +> create_legacy_webhook_event(product_uid, device_uid, create_legacy_webhook_event_request) + +Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload. + +### Example + +```python +import notehub_py +from notehub_py.models.create_legacy_webhook_event_request import ( + CreateLegacyWebhookEventRequest, +) +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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.WebhookApi(api_client) + product_uid = "com.blues.bridge:sensors" # str | + device_uid = "dev:000000000000000" # str | + create_legacy_webhook_event_request = { + "body": {"key": "value"}, + "file": "data.qo", + "payload": "SGVsbG8sIFdvcmxkIQ==", + } # CreateLegacyWebhookEventRequest | A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload. + + try: + api_instance.create_legacy_webhook_event( + product_uid, device_uid, create_legacy_webhook_event_request + ) + except Exception as e: + print( + "Exception when calling WebhookApi->create_legacy_webhook_event: %s\n" % e + ) +``` + +### Parameters + +| Name | Type | Description | Notes | +| --------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ----- | +| **product_uid** | **str** | | +| **device_uid** | **str** | | +| **create_legacy_webhook_event_request** | [**CreateLegacyWebhookEventRequest**](CreateLegacyWebhookEventRequest.md) | A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload. | + +### Return type + +void (empty response body) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json ## create_webhook @@ -69,6 +136,118 @@ void (empty response body) - **Content-Type**: application/json - **Accept**: application/json +## create_webhook_device_event_by_product + +> create_webhook_device_event_by_product(product_uid, webhook_uid, device_uid, request_body) + +Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. + +### Example + +```python +import notehub_py +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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.WebhookApi(api_client) + product_uid = "com.blues.bridge:sensors" # str | + webhook_uid = "Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8" # str | Webhook UID + device_uid = "dev:000000000000000" # str | + request_body = None # Dict[str, object] | The event body (arbitrary JSON) + + try: + api_instance.create_webhook_device_event_by_product( + product_uid, webhook_uid, device_uid, request_body + ) + except Exception as e: + print( + "Exception when calling WebhookApi->create_webhook_device_event_by_product: %s\n" + % e + ) +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---------------- | ---------------------------------- | ------------------------------- | ----- | +| **product_uid** | **str** | | +| **webhook_uid** | **str** | Webhook UID | +| **device_uid** | **str** | | +| **request_body** | [**Dict[str, object]**](object.md) | The event body (arbitrary JSON) | + +### Return type + +void (empty response body) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +## create_webhook_event_by_product + +> create_webhook_event_by_product(product_uid, webhook_uid, request_body) + +Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device. + +### Example + +```python +import notehub_py +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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.WebhookApi(api_client) + product_uid = "com.blues.bridge:sensors" # str | + webhook_uid = "Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8" # str | Webhook UID + request_body = None # Dict[str, object] | The event body (arbitrary JSON) + + try: + api_instance.create_webhook_event_by_product( + product_uid, webhook_uid, request_body + ) + except Exception as e: + print( + "Exception when calling WebhookApi->create_webhook_event_by_product: %s\n" + % e + ) +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---------------- | ---------------------------------- | ------------------------------- | ----- | +| **product_uid** | **str** | | +| **webhook_uid** | **str** | Webhook UID | +| **request_body** | [**Dict[str, object]**](object.md) | The event body (arbitrary JSON) | + +### Return type + +void (empty response body) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + ## delete_webhook > delete_webhook(project_or_product_uid, webhook_uid) @@ -168,6 +347,62 @@ with notehub_py.ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json +## get_webhook_settings_by_product + +> WebhookSettings get_webhook_settings_by_product(product_uid, webhook_uid) + +Retrieves the configuration settings for the specified webhook, addressed by productUID. + +### Example + +```python +import notehub_py +from notehub_py.models.webhook_settings import WebhookSettings +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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.WebhookApi(api_client) + product_uid = "com.blues.bridge:sensors" # str | + webhook_uid = "Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8" # str | Webhook UID + + try: + api_response = api_instance.get_webhook_settings_by_product( + product_uid, webhook_uid + ) + print("The response of WebhookApi->get_webhook_settings_by_product:\n") + pprint(api_response) + except Exception as e: + print( + "Exception when calling WebhookApi->get_webhook_settings_by_product: %s\n" + % e + ) +``` + +### Parameters + +| Name | Type | Description | Notes | +| --------------- | ------- | ----------- | ----- | +| **product_uid** | **str** | | +| **webhook_uid** | **str** | Webhook UID | + +### Return type + +[**WebhookSettings**](WebhookSettings.md) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + ## get_webhooks > GetWebhooks200Response get_webhooks(project_or_product_uid) @@ -217,6 +452,60 @@ with notehub_py.ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json +## update_legacy_webhook_session + +> update_legacy_webhook_session(product_uid, device_uid, request_body=request_body) + +Legacy endpoint for opening or updating a webhook session for the given device (provisioning the device if necessary). Used by external services that need to maintain a callable session against a device behind a webhook. + +### Example + +```python +import notehub_py +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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.WebhookApi(api_client) + product_uid = "com.blues.bridge:sensors" # str | + device_uid = "dev:000000000000000" # str | + request_body = None # Dict[str, object] | Optional session metadata. (optional) + + try: + api_instance.update_legacy_webhook_session( + product_uid, device_uid, request_body=request_body + ) + except Exception as e: + print( + "Exception when calling WebhookApi->update_legacy_webhook_session: %s\n" % e + ) +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---------------- | ---------------------------------- | -------------------------- | ---------- | +| **product_uid** | **str** | | +| **device_uid** | **str** | | +| **request_body** | [**Dict[str, object]**](object.md) | Optional session metadata. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + ## update_webhook > update_webhook(project_or_product_uid, webhook_uid, webhook_settings) @@ -272,3 +561,62 @@ void (empty response body) - **Content-Type**: application/json - **Accept**: application/json + +## update_webhook_settings_by_product + +> update_webhook_settings_by_product(product_uid, webhook_uid, webhook_settings) + +Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings. + +### Example + +```python +import notehub_py +from notehub_py.models.webhook_settings import WebhookSettings +from notehub_py.rest import ApiException +from pprint import pprint + +configuration = notehub_py.Configuration(access_token="PERSONAL_ACCESS_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.WebhookApi(api_client) + product_uid = "com.blues.bridge:sensors" # str | + webhook_uid = "Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8" # str | Webhook UID + webhook_settings = { + "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}', + } # WebhookSettings | + + try: + api_instance.update_webhook_settings_by_product( + product_uid, webhook_uid, webhook_settings + ) + except Exception as e: + print( + "Exception when calling WebhookApi->update_webhook_settings_by_product: %s\n" + % e + ) +``` + +### Parameters + +| Name | Type | Description | Notes | +| -------------------- | ----------------------------------------- | ----------- | ----- | +| **product_uid** | **str** | | +| **webhook_uid** | **str** | Webhook UID | +| **webhook_settings** | [**WebhookSettings**](WebhookSettings.md) | | + +### Return type + +void (empty response body) + +### Authorization + +[personalAccessToken](../README.md#personalAccessToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json diff --git a/src/notehub_py/__init__.py b/src/notehub_py/__init__.py index 160a6cf..bac2c26 100644 --- a/src/notehub_py/__init__.py +++ b/src/notehub_py/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "6.2.0" +__version__ = "6.3.0" # import apis into sdk package from notehub_py.api.alert_api import AlertApi @@ -50,6 +50,7 @@ from notehub_py.models.alert_notifications_inner import AlertNotificationsInner from notehub_py.models.aws_route import AwsRoute from notehub_py.models.azure_route import AzureRoute +from notehub_py.models.batch_job_requests import BatchJobRequests from notehub_py.models.billing_account import BillingAccount from notehub_py.models.billing_account_role import BillingAccountRole from notehub_py.models.blynk_route import BlynkRoute @@ -60,9 +61,13 @@ from notehub_py.models.contact import Contact from notehub_py.models.create_fleet_request import CreateFleetRequest from notehub_py.models.create_job201_response import CreateJob201Response +from notehub_py.models.create_legacy_webhook_event_request import ( + CreateLegacyWebhookEventRequest, +) from notehub_py.models.create_monitor import CreateMonitor from notehub_py.models.create_product_request import CreateProductRequest from notehub_py.models.create_project_request import CreateProjectRequest +from notehub_py.models.create_project_secret_request import CreateProjectSecretRequest from notehub_py.models.create_update_repository import CreateUpdateRepository from notehub_py.models.current_firmware import CurrentFirmware from notehub_py.models.dfu_env import DFUEnv @@ -130,6 +135,16 @@ from notehub_py.models.get_device_health_log200_response_health_log_inner import ( GetDeviceHealthLog200ResponseHealthLogInner, ) +from notehub_py.models.get_device_journey200_response import GetDeviceJourney200Response +from notehub_py.models.get_device_journey200_response_journey import ( + GetDeviceJourney200ResponseJourney, +) +from notehub_py.models.get_device_journeys200_response import ( + GetDeviceJourneys200Response, +) +from notehub_py.models.get_device_journeys200_response_journeys_inner import ( + GetDeviceJourneys200ResponseJourneysInner, +) from notehub_py.models.get_device_latest_events200_response import ( GetDeviceLatestEvents200Response, ) @@ -158,6 +173,7 @@ from notehub_py.models.get_project_members200_response import ( GetProjectMembers200Response, ) +from notehub_py.models.get_project_secrets_response import GetProjectSecretsResponse from notehub_py.models.get_projects200_response import GetProjects200Response from notehub_py.models.get_route_logs_usage200_response import ( GetRouteLogsUsage200Response, @@ -167,6 +183,10 @@ from notehub_py.models.google_route import GoogleRoute from notehub_py.models.http_route import HttpRoute from notehub_py.models.job import Job +from notehub_py.models.job_definition import JobDefinition +from notehub_py.models.job_definition_report_options import JobDefinitionReportOptions +from notehub_py.models.job_definition_select import JobDefinitionSelect +from notehub_py.models.job_detail import JobDetail from notehub_py.models.job_run import JobRun from notehub_py.models.location import Location from notehub_py.models.login200_response import Login200Response @@ -191,11 +211,15 @@ from notehub_py.models.product import Product from notehub_py.models.project import Project from notehub_py.models.project_member import ProjectMember +from notehub_py.models.project_secret import ProjectSecret from notehub_py.models.provision_device_request import ProvisionDeviceRequest from notehub_py.models.proxy_route import ProxyRoute from notehub_py.models.qubitro_route import QubitroRoute from notehub_py.models.rad_route import RadRoute from notehub_py.models.repository import Repository +from notehub_py.models.repository_list_response import RepositoryListResponse +from notehub_py.models.repository_token_request import RepositoryTokenRequest +from notehub_py.models.repository_token_response import RepositoryTokenResponse from notehub_py.models.role import Role from notehub_py.models.route_log import RouteLog from notehub_py.models.route_transform_settings import RouteTransformSettings @@ -216,6 +240,7 @@ from notehub_py.models.twilio_route import TwilioRoute from notehub_py.models.update_fleet_request import UpdateFleetRequest from notehub_py.models.update_host_firmware_request import UpdateHostFirmwareRequest +from notehub_py.models.update_project_secret_request import UpdateProjectSecretRequest from notehub_py.models.upload_metadata import UploadMetadata from notehub_py.models.usage_data import UsageData from notehub_py.models.usage_events_data import UsageEventsData diff --git a/src/notehub_py/api/device_api.py b/src/notehub_py/api/device_api.py index c04a911..f60bc36 100644 --- a/src/notehub_py/api/device_api.py +++ b/src/notehub_py/api/device_api.py @@ -32,6 +32,10 @@ from notehub_py.models.get_device_health_log200_response import ( GetDeviceHealthLog200Response, ) +from notehub_py.models.get_device_journey200_response import GetDeviceJourney200Response +from notehub_py.models.get_device_journeys200_response import ( + GetDeviceJourneys200Response, +) from notehub_py.models.get_device_latest_events200_response import ( GetDeviceLatestEvents200Response, ) @@ -3915,7 +3919,7 @@ def _get_device_environment_variables_by_pin_serialize( ) # authentication setting - _auth_settings: List[str] = [] + _auth_settings: List[str] = ["personalAccessToken"] return self.api_client.param_serialize( method="GET", @@ -4279,10 +4283,18 @@ def _get_device_health_log_serialize( ) @validate_call - def get_device_latest_events( + def get_device_journey( self, project_or_product_uid: StrictStr, device_uid: StrictStr, + journey_id: Annotated[ + StrictInt, + Field( + description="Identifier of the journey, taken from the `journey` field on `_track.qo` events (a Unix timestamp marking the start of the journey). " + ), + ], + page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, + page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4294,15 +4306,21 @@ def get_device_latest_events( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetDeviceLatestEvents200Response: - """get_device_latest_events + ) -> GetDeviceJourney200Response: + """get_device_journey - Get Device Latest Events + Get a single journey for a device along with its `_track.qo` events. The events array is paginated via `pageSize` / `pageNum`; use `journey.has_more` to detect additional pages. :param project_or_product_uid: (required) :type project_or_product_uid: str :param device_uid: (required) :type device_uid: str + :param journey_id: Identifier of the journey, taken from the `journey` field on `_track.qo` events (a Unix timestamp marking the start of the journey). (required) + :type journey_id: int + :param page_size: + :type page_size: int + :param page_num: + :type page_num: int :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 @@ -4325,9 +4343,12 @@ def get_device_latest_events( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_latest_events_serialize( + _param = self._get_device_journey_serialize( project_or_product_uid=project_or_product_uid, device_uid=device_uid, + journey_id=journey_id, + page_size=page_size, + page_num=page_num, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4335,7 +4356,7 @@ def get_device_latest_events( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeviceLatestEvents200Response", + "200": "GetDeviceJourney200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -4347,10 +4368,18 @@ def get_device_latest_events( ).data @validate_call - def get_device_latest_events_with_http_info( + def get_device_journey_with_http_info( self, project_or_product_uid: StrictStr, device_uid: StrictStr, + journey_id: Annotated[ + StrictInt, + Field( + description="Identifier of the journey, taken from the `journey` field on `_track.qo` events (a Unix timestamp marking the start of the journey). " + ), + ], + page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, + page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4362,15 +4391,21 @@ def get_device_latest_events_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetDeviceLatestEvents200Response]: - """get_device_latest_events + ) -> ApiResponse[GetDeviceJourney200Response]: + """get_device_journey - Get Device Latest Events + Get a single journey for a device along with its `_track.qo` events. The events array is paginated via `pageSize` / `pageNum`; use `journey.has_more` to detect additional pages. :param project_or_product_uid: (required) :type project_or_product_uid: str :param device_uid: (required) :type device_uid: str + :param journey_id: Identifier of the journey, taken from the `journey` field on `_track.qo` events (a Unix timestamp marking the start of the journey). (required) + :type journey_id: int + :param page_size: + :type page_size: int + :param page_num: + :type page_num: int :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 @@ -4393,9 +4428,12 @@ def get_device_latest_events_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_latest_events_serialize( + _param = self._get_device_journey_serialize( project_or_product_uid=project_or_product_uid, device_uid=device_uid, + journey_id=journey_id, + page_size=page_size, + page_num=page_num, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4403,7 +4441,7 @@ def get_device_latest_events_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeviceLatestEvents200Response", + "200": "GetDeviceJourney200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -4415,10 +4453,18 @@ def get_device_latest_events_with_http_info( ) @validate_call - def get_device_latest_events_without_preload_content( + def get_device_journey_without_preload_content( self, project_or_product_uid: StrictStr, device_uid: StrictStr, + journey_id: Annotated[ + StrictInt, + Field( + description="Identifier of the journey, taken from the `journey` field on `_track.qo` events (a Unix timestamp marking the start of the journey). " + ), + ], + page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, + page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4431,14 +4477,20 @@ def get_device_latest_events_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_device_latest_events + """get_device_journey - Get Device Latest Events + Get a single journey for a device along with its `_track.qo` events. The events array is paginated via `pageSize` / `pageNum`; use `journey.has_more` to detect additional pages. :param project_or_product_uid: (required) :type project_or_product_uid: str :param device_uid: (required) :type device_uid: str + :param journey_id: Identifier of the journey, taken from the `journey` field on `_track.qo` events (a Unix timestamp marking the start of the journey). (required) + :type journey_id: int + :param page_size: + :type page_size: int + :param page_num: + :type page_num: int :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 @@ -4461,9 +4513,12 @@ def get_device_latest_events_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_latest_events_serialize( + _param = self._get_device_journey_serialize( project_or_product_uid=project_or_product_uid, device_uid=device_uid, + journey_id=journey_id, + page_size=page_size, + page_num=page_num, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4471,17 +4526,20 @@ def get_device_latest_events_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeviceLatestEvents200Response", + "200": "GetDeviceJourney200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_device_latest_events_serialize( + def _get_device_journey_serialize( self, project_or_product_uid, device_uid, + journey_id, + page_size, + page_num, _request_auth, _content_type, _headers, @@ -4504,7 +4562,17 @@ def _get_device_latest_events_serialize( _path_params["projectOrProductUID"] = project_or_product_uid if device_uid is not None: _path_params["deviceUID"] = device_uid + if journey_id is not None: + _path_params["journeyID"] = journey_id # process the query parameters + if page_size is not None: + + _query_params.append(("pageSize", page_size)) + + if page_num is not None: + + _query_params.append(("pageNum", page_num)) + # process the header parameters # process the form parameters # process the body parameter @@ -4519,7 +4587,7 @@ def _get_device_latest_events_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest", + resource_path="/v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys/{journeyID}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4533,10 +4601,22 @@ def _get_device_latest_events_serialize( ) @validate_call - def get_device_plans( + def get_device_journeys( self, project_or_product_uid: StrictStr, device_uid: StrictStr, + start_date: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field( + description="Start date for filtering results, specified as a Unix timestamp" + ), + ] = None, + end_date: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field( + description="End date for filtering results, specified as a Unix timestamp" + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4548,15 +4628,19 @@ def get_device_plans( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetDevicePlans200Response: - """get_device_plans + ) -> GetDeviceJourneys200Response: + """get_device_journeys - Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections. + Get the list of journeys for a device, derived from `_track.qo` events. Returns journey metadata only (no event payloads). Capped at 100 most recent journeys; `has_more` is true when the cap is hit. :param project_or_product_uid: (required) :type project_or_product_uid: str :param device_uid: (required) :type device_uid: str + :param start_date: Start date for filtering results, specified as a Unix timestamp + :type start_date: int + :param end_date: End date for filtering results, specified as a Unix timestamp + :type end_date: int :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 @@ -4579,9 +4663,11 @@ def get_device_plans( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_plans_serialize( + _param = self._get_device_journeys_serialize( project_or_product_uid=project_or_product_uid, device_uid=device_uid, + start_date=start_date, + end_date=end_date, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4589,7 +4675,7 @@ def get_device_plans( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDevicePlans200Response", + "200": "GetDeviceJourneys200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -4601,10 +4687,22 @@ def get_device_plans( ).data @validate_call - def get_device_plans_with_http_info( + def get_device_journeys_with_http_info( self, project_or_product_uid: StrictStr, device_uid: StrictStr, + start_date: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field( + description="Start date for filtering results, specified as a Unix timestamp" + ), + ] = None, + end_date: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field( + description="End date for filtering results, specified as a Unix timestamp" + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4616,15 +4714,19 @@ def get_device_plans_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetDevicePlans200Response]: - """get_device_plans + ) -> ApiResponse[GetDeviceJourneys200Response]: + """get_device_journeys - Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections. + Get the list of journeys for a device, derived from `_track.qo` events. Returns journey metadata only (no event payloads). Capped at 100 most recent journeys; `has_more` is true when the cap is hit. :param project_or_product_uid: (required) :type project_or_product_uid: str :param device_uid: (required) :type device_uid: str + :param start_date: Start date for filtering results, specified as a Unix timestamp + :type start_date: int + :param end_date: End date for filtering results, specified as a Unix timestamp + :type end_date: int :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 @@ -4647,9 +4749,11 @@ def get_device_plans_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_plans_serialize( + _param = self._get_device_journeys_serialize( project_or_product_uid=project_or_product_uid, device_uid=device_uid, + start_date=start_date, + end_date=end_date, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4657,7 +4761,7 @@ def get_device_plans_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDevicePlans200Response", + "200": "GetDeviceJourneys200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -4669,10 +4773,22 @@ def get_device_plans_with_http_info( ) @validate_call - def get_device_plans_without_preload_content( + def get_device_journeys_without_preload_content( self, project_or_product_uid: StrictStr, device_uid: StrictStr, + start_date: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field( + description="Start date for filtering results, specified as a Unix timestamp" + ), + ] = None, + end_date: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field( + description="End date for filtering results, specified as a Unix timestamp" + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4685,14 +4801,18 @@ def get_device_plans_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_device_plans + """get_device_journeys - Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections. + Get the list of journeys for a device, derived from `_track.qo` events. Returns journey metadata only (no event payloads). Capped at 100 most recent journeys; `has_more` is true when the cap is hit. :param project_or_product_uid: (required) :type project_or_product_uid: str :param device_uid: (required) :type device_uid: str + :param start_date: Start date for filtering results, specified as a Unix timestamp + :type start_date: int + :param end_date: End date for filtering results, specified as a Unix timestamp + :type end_date: int :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 @@ -4715,9 +4835,11 @@ def get_device_plans_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_plans_serialize( + _param = self._get_device_journeys_serialize( project_or_product_uid=project_or_product_uid, device_uid=device_uid, + start_date=start_date, + end_date=end_date, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4725,17 +4847,19 @@ def get_device_plans_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDevicePlans200Response", + "200": "GetDeviceJourneys200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_device_plans_serialize( + def _get_device_journeys_serialize( self, project_or_product_uid, device_uid, + start_date, + end_date, _request_auth, _content_type, _headers, @@ -4759,6 +4883,14 @@ def _get_device_plans_serialize( if device_uid is not None: _path_params["deviceUID"] = device_uid # process the query parameters + if start_date is not None: + + _query_params.append(("startDate", start_date)) + + if end_date is not None: + + _query_params.append(("endDate", end_date)) + # process the header parameters # process the form parameters # process the body parameter @@ -4773,7 +4905,7 @@ def _get_device_plans_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans", + resource_path="/v1/projects/{projectOrProductUID}/devices/{deviceUID}/journeys", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4787,7 +4919,7 @@ def _get_device_plans_serialize( ) @validate_call - def get_device_public_key( + def get_device_latest_events( self, project_or_product_uid: StrictStr, device_uid: StrictStr, @@ -4802,10 +4934,10 @@ def get_device_public_key( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetDevicePublicKey200Response: - """get_device_public_key + ) -> GetDeviceLatestEvents200Response: + """get_device_latest_events - Get Device Public Key + Get Device Latest Events :param project_or_product_uid: (required) :type project_or_product_uid: str @@ -4833,7 +4965,7 @@ def get_device_public_key( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_public_key_serialize( + _param = self._get_device_latest_events_serialize( project_or_product_uid=project_or_product_uid, device_uid=device_uid, _request_auth=_request_auth, @@ -4843,7 +4975,7 @@ def get_device_public_key( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDevicePublicKey200Response", + "200": "GetDeviceLatestEvents200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -4855,7 +4987,7 @@ def get_device_public_key( ).data @validate_call - def get_device_public_key_with_http_info( + def get_device_latest_events_with_http_info( self, project_or_product_uid: StrictStr, device_uid: StrictStr, @@ -4870,10 +5002,10 @@ def get_device_public_key_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetDevicePublicKey200Response]: - """get_device_public_key + ) -> ApiResponse[GetDeviceLatestEvents200Response]: + """get_device_latest_events - Get Device Public Key + Get Device Latest Events :param project_or_product_uid: (required) :type project_or_product_uid: str @@ -4901,7 +5033,7 @@ def get_device_public_key_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_public_key_serialize( + _param = self._get_device_latest_events_serialize( project_or_product_uid=project_or_product_uid, device_uid=device_uid, _request_auth=_request_auth, @@ -4911,7 +5043,7 @@ def get_device_public_key_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDevicePublicKey200Response", + "200": "GetDeviceLatestEvents200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -4923,7 +5055,7 @@ def get_device_public_key_with_http_info( ) @validate_call - def get_device_public_key_without_preload_content( + def get_device_latest_events_without_preload_content( self, project_or_product_uid: StrictStr, device_uid: StrictStr, @@ -4939,9 +5071,9 @@ def get_device_public_key_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_device_public_key + """get_device_latest_events - Get Device Public Key + Get Device Latest Events :param project_or_product_uid: (required) :type project_or_product_uid: str @@ -4969,7 +5101,7 @@ def get_device_public_key_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_public_key_serialize( + _param = self._get_device_latest_events_serialize( project_or_product_uid=project_or_product_uid, device_uid=device_uid, _request_auth=_request_auth, @@ -4979,14 +5111,14 @@ def get_device_public_key_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDevicePublicKey200Response", + "200": "GetDeviceLatestEvents200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_device_public_key_serialize( + def _get_device_latest_events_serialize( self, project_or_product_uid, device_uid, @@ -5027,7 +5159,7 @@ def _get_device_public_key_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key", + resource_path="/v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5041,11 +5173,10 @@ def _get_device_public_key_serialize( ) @validate_call - def get_device_public_keys( + def get_device_plans( self, project_or_product_uid: StrictStr, - page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, - page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, + device_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5057,17 +5188,15 @@ def get_device_public_keys( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetDevicePublicKeys200Response: - """get_device_public_keys + ) -> GetDevicePlans200Response: + """get_device_plans - Get Device Public Keys of a Project + Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections. :param project_or_product_uid: (required) :type project_or_product_uid: str - :param page_size: - :type page_size: int - :param page_num: - :type page_num: int + :param device_uid: (required) + :type device_uid: 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 @@ -5090,10 +5219,9 @@ def get_device_public_keys( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_public_keys_serialize( + _param = self._get_device_plans_serialize( project_or_product_uid=project_or_product_uid, - page_size=page_size, - page_num=page_num, + device_uid=device_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5101,7 +5229,7 @@ def get_device_public_keys( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDevicePublicKeys200Response", + "200": "GetDevicePlans200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -5113,11 +5241,10 @@ def get_device_public_keys( ).data @validate_call - def get_device_public_keys_with_http_info( + def get_device_plans_with_http_info( self, project_or_product_uid: StrictStr, - page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, - page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, + device_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5129,17 +5256,15 @@ def get_device_public_keys_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetDevicePublicKeys200Response]: - """get_device_public_keys + ) -> ApiResponse[GetDevicePlans200Response]: + """get_device_plans - Get Device Public Keys of a Project + Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections. :param project_or_product_uid: (required) :type project_or_product_uid: str - :param page_size: - :type page_size: int - :param page_num: - :type page_num: int + :param device_uid: (required) + :type device_uid: 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 @@ -5162,10 +5287,9 @@ def get_device_public_keys_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_public_keys_serialize( + _param = self._get_device_plans_serialize( project_or_product_uid=project_or_product_uid, - page_size=page_size, - page_num=page_num, + device_uid=device_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5173,7 +5297,7 @@ def get_device_public_keys_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDevicePublicKeys200Response", + "200": "GetDevicePlans200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -5185,11 +5309,10 @@ def get_device_public_keys_with_http_info( ) @validate_call - def get_device_public_keys_without_preload_content( + def get_device_plans_without_preload_content( self, project_or_product_uid: StrictStr, - page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, - page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, + device_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5202,16 +5325,14 @@ def get_device_public_keys_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_device_public_keys + """get_device_plans - Get Device Public Keys of a Project + Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections. :param project_or_product_uid: (required) :type project_or_product_uid: str - :param page_size: - :type page_size: int - :param page_num: - :type page_num: int + :param device_uid: (required) + :type device_uid: 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 @@ -5234,10 +5355,9 @@ def get_device_public_keys_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_public_keys_serialize( + _param = self._get_device_plans_serialize( project_or_product_uid=project_or_product_uid, - page_size=page_size, - page_num=page_num, + device_uid=device_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5245,14 +5365,534 @@ def get_device_public_keys_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDevicePublicKeys200Response", + "200": "GetDevicePlans200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_device_public_keys_serialize( + def _get_device_plans_serialize( + self, + project_or_product_uid, + device_uid, + _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 device_uid is not None: + _path_params["deviceUID"] = device_uid + # 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/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans", + 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 get_device_public_key( + self, + project_or_product_uid: StrictStr, + device_uid: 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, + ) -> GetDevicePublicKey200Response: + """get_device_public_key + + Get Device Public Key + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param device_uid: (required) + :type device_uid: 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._get_device_public_key_serialize( + project_or_product_uid=project_or_product_uid, + device_uid=device_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetDevicePublicKey200Response", + } + 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 get_device_public_key_with_http_info( + self, + project_or_product_uid: StrictStr, + device_uid: 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[GetDevicePublicKey200Response]: + """get_device_public_key + + Get Device Public Key + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param device_uid: (required) + :type device_uid: 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._get_device_public_key_serialize( + project_or_product_uid=project_or_product_uid, + device_uid=device_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetDevicePublicKey200Response", + } + 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 get_device_public_key_without_preload_content( + self, + project_or_product_uid: StrictStr, + device_uid: 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: + """get_device_public_key + + Get Device Public Key + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param device_uid: (required) + :type device_uid: 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._get_device_public_key_serialize( + project_or_product_uid=project_or_product_uid, + device_uid=device_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetDevicePublicKey200Response", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_device_public_key_serialize( + self, + project_or_product_uid, + device_uid, + _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 device_uid is not None: + _path_params["deviceUID"] = device_uid + # 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/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key", + 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 get_device_public_keys( + self, + project_or_product_uid: StrictStr, + page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, + page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, + _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, + ) -> GetDevicePublicKeys200Response: + """get_device_public_keys + + Get Device Public Keys of a Project + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param page_size: + :type page_size: int + :param page_num: + :type page_num: int + :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._get_device_public_keys_serialize( + project_or_product_uid=project_or_product_uid, + page_size=page_size, + page_num=page_num, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetDevicePublicKeys200Response", + } + 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 get_device_public_keys_with_http_info( + self, + project_or_product_uid: StrictStr, + page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, + page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, + _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[GetDevicePublicKeys200Response]: + """get_device_public_keys + + Get Device Public Keys of a Project + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param page_size: + :type page_size: int + :param page_num: + :type page_num: int + :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._get_device_public_keys_serialize( + project_or_product_uid=project_or_product_uid, + page_size=page_size, + page_num=page_num, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetDevicePublicKeys200Response", + } + 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 get_device_public_keys_without_preload_content( + self, + project_or_product_uid: StrictStr, + page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, + page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, + _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: + """get_device_public_keys + + Get Device Public Keys of a Project + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param page_size: + :type page_size: int + :param page_num: + :type page_num: int + :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._get_device_public_keys_serialize( + project_or_product_uid=project_or_product_uid, + page_size=page_size, + page_num=page_num, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetDevicePublicKeys200Response", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_device_public_keys_serialize( self, project_or_product_uid, page_size, @@ -8170,7 +8810,7 @@ def _set_device_environment_variables_by_pin_serialize( _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [] + _auth_settings: List[str] = ["personalAccessToken"] return self.api_client.param_serialize( method="PUT", diff --git a/src/notehub_py/api/jobs_api.py b/src/notehub_py/api/jobs_api.py index 8cc1d68..ff8e60f 100644 --- a/src/notehub_py/api/jobs_api.py +++ b/src/notehub_py/api/jobs_api.py @@ -17,15 +17,16 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Any, Dict, Optional +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional from typing_extensions import Annotated from notehub_py.models.cancel_job_run200_response import CancelJobRun200Response from notehub_py.models.create_job201_response import CreateJob201Response from notehub_py.models.delete_job200_response import DeleteJob200Response from notehub_py.models.get_job_runs200_response import GetJobRuns200Response from notehub_py.models.get_jobs200_response import GetJobs200Response -from notehub_py.models.job import Job +from notehub_py.models.job_definition import JobDefinition +from notehub_py.models.job_detail import JobDetail from notehub_py.models.job_run import JobRun from notehub_py.models.run_job200_response import RunJob200Response @@ -314,8 +315,8 @@ def create_job( self, project_or_product_uid: StrictStr, name: Annotated[StrictStr, Field(description="Name for the job")], - body: Annotated[ - Dict[str, Any], Field(description="The job definition as raw JSON") + job_definition: Annotated[ + JobDefinition, Field(description="The batch job definition") ], _request_timeout: Union[ None, @@ -337,8 +338,8 @@ def create_job( :type project_or_product_uid: str :param name: Name for the job (required) :type name: str - :param body: The job definition as raw JSON (required) - :type body: object + :param job_definition: The batch job definition (required) + :type job_definition: JobDefinition :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 @@ -364,7 +365,7 @@ def create_job( _param = self._create_job_serialize( project_or_product_uid=project_or_product_uid, name=name, - body=body, + job_definition=job_definition, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -389,8 +390,8 @@ def create_job_with_http_info( self, project_or_product_uid: StrictStr, name: Annotated[StrictStr, Field(description="Name for the job")], - body: Annotated[ - Dict[str, Any], Field(description="The job definition as raw JSON") + job_definition: Annotated[ + JobDefinition, Field(description="The batch job definition") ], _request_timeout: Union[ None, @@ -412,8 +413,8 @@ def create_job_with_http_info( :type project_or_product_uid: str :param name: Name for the job (required) :type name: str - :param body: The job definition as raw JSON (required) - :type body: object + :param job_definition: The batch job definition (required) + :type job_definition: JobDefinition :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 @@ -439,7 +440,7 @@ def create_job_with_http_info( _param = self._create_job_serialize( project_or_product_uid=project_or_product_uid, name=name, - body=body, + job_definition=job_definition, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -464,8 +465,8 @@ def create_job_without_preload_content( self, project_or_product_uid: StrictStr, name: Annotated[StrictStr, Field(description="Name for the job")], - body: Annotated[ - Dict[str, Any], Field(description="The job definition as raw JSON") + job_definition: Annotated[ + JobDefinition, Field(description="The batch job definition") ], _request_timeout: Union[ None, @@ -487,8 +488,8 @@ def create_job_without_preload_content( :type project_or_product_uid: str :param name: Name for the job (required) :type name: str - :param body: The job definition as raw JSON (required) - :type body: object + :param job_definition: The batch job definition (required) + :type job_definition: JobDefinition :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 @@ -514,7 +515,7 @@ def create_job_without_preload_content( _param = self._create_job_serialize( project_or_product_uid=project_or_product_uid, name=name, - body=body, + job_definition=job_definition, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -534,7 +535,7 @@ def _create_job_serialize( self, project_or_product_uid, name, - body, + job_definition, _request_auth, _content_type, _headers, @@ -563,8 +564,8 @@ def _create_job_serialize( # process the header parameters # process the form parameters # process the body parameter - if body is not None: - _body_params = body + if job_definition is not None: + _body_params = job_definition # set the HTTP header `Accept` _header_params["Accept"] = self.api_client.select_header_accept( @@ -862,6 +863,269 @@ def _delete_job_serialize( _request_auth=_request_auth, ) + @validate_call + def delete_job_run( + self, + project_or_product_uid: StrictStr, + report_uid: Annotated[ + StrictStr, Field(description="Unique identifier for a job run report") + ], + _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, + ) -> None: + """delete_job_run + + Delete the results of a job run + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param report_uid: Unique identifier for a job run report (required) + :type report_uid: 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._delete_job_run_serialize( + project_or_product_uid=project_or_product_uid, + report_uid=report_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": None, + "404": None, + } + 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 delete_job_run_with_http_info( + self, + project_or_product_uid: StrictStr, + report_uid: Annotated[ + StrictStr, Field(description="Unique identifier for a job run report") + ], + _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[None]: + """delete_job_run + + Delete the results of a job run + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param report_uid: Unique identifier for a job run report (required) + :type report_uid: 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._delete_job_run_serialize( + project_or_product_uid=project_or_product_uid, + report_uid=report_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": None, + "404": None, + } + 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 delete_job_run_without_preload_content( + self, + project_or_product_uid: StrictStr, + report_uid: Annotated[ + StrictStr, Field(description="Unique identifier for a job run report") + ], + _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: + """delete_job_run + + Delete the results of a job run + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param report_uid: Unique identifier for a job run report (required) + :type report_uid: 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._delete_job_run_serialize( + project_or_product_uid=project_or_product_uid, + report_uid=report_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": None, + "404": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _delete_job_run_serialize( + self, + project_or_product_uid, + report_uid, + _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 report_uid is not None: + _path_params["reportUID"] = report_uid + # 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/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}", + 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 get_job( self, @@ -880,7 +1144,7 @@ def get_job( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Job: + ) -> JobDetail: """get_job Get a specific batch job definition @@ -921,7 +1185,7 @@ def get_job( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + "200": "JobDetail", "404": None, } response_data = self.api_client.call_api( @@ -951,7 +1215,7 @@ def get_job_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Job]: + ) -> ApiResponse[JobDetail]: """get_job Get a specific batch job definition @@ -992,7 +1256,7 @@ def get_job_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + "200": "JobDetail", "404": None, } response_data = self.api_client.call_api( @@ -1063,7 +1327,7 @@ def get_job_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Job", + "200": "JobDetail", "404": None, } response_data = self.api_client.call_api( @@ -1132,6 +1396,12 @@ def get_job_run( report_uid: Annotated[ StrictStr, Field(description="Unique identifier for a job run report") ], + view: Annotated[ + Optional[StrictStr], + Field( + description="Controls the level of detail returned: 'summary' returns metadata only, 'detail' returns the full result payload" + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1152,6 +1422,8 @@ def get_job_run( :type project_or_product_uid: str :param report_uid: Unique identifier for a job run report (required) :type report_uid: str + :param view: Controls the level of detail returned: 'summary' returns metadata only, 'detail' returns the full result payload + :type view: 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 @@ -1177,6 +1449,7 @@ def get_job_run( _param = self._get_job_run_serialize( project_or_product_uid=project_or_product_uid, report_uid=report_uid, + view=view, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1203,6 +1476,12 @@ def get_job_run_with_http_info( report_uid: Annotated[ StrictStr, Field(description="Unique identifier for a job run report") ], + view: Annotated[ + Optional[StrictStr], + Field( + description="Controls the level of detail returned: 'summary' returns metadata only, 'detail' returns the full result payload" + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1223,6 +1502,8 @@ def get_job_run_with_http_info( :type project_or_product_uid: str :param report_uid: Unique identifier for a job run report (required) :type report_uid: str + :param view: Controls the level of detail returned: 'summary' returns metadata only, 'detail' returns the full result payload + :type view: 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 @@ -1248,6 +1529,7 @@ def get_job_run_with_http_info( _param = self._get_job_run_serialize( project_or_product_uid=project_or_product_uid, report_uid=report_uid, + view=view, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1274,6 +1556,12 @@ def get_job_run_without_preload_content( report_uid: Annotated[ StrictStr, Field(description="Unique identifier for a job run report") ], + view: Annotated[ + Optional[StrictStr], + Field( + description="Controls the level of detail returned: 'summary' returns metadata only, 'detail' returns the full result payload" + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1294,6 +1582,8 @@ def get_job_run_without_preload_content( :type project_or_product_uid: str :param report_uid: Unique identifier for a job run report (required) :type report_uid: str + :param view: Controls the level of detail returned: 'summary' returns metadata only, 'detail' returns the full result payload + :type view: 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 @@ -1319,6 +1609,7 @@ def get_job_run_without_preload_content( _param = self._get_job_run_serialize( project_or_product_uid=project_or_product_uid, report_uid=report_uid, + view=view, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1338,6 +1629,7 @@ def _get_job_run_serialize( self, project_or_product_uid, report_uid, + view, _request_auth, _content_type, _headers, @@ -1361,6 +1653,10 @@ def _get_job_run_serialize( if report_uid is not None: _path_params["reportUID"] = report_uid # process the query parameters + if view is not None: + + _query_params.append(("view", view)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/src/notehub_py/api/project_api.py b/src/notehub_py/api/project_api.py index f45d10a..3cf5205 100644 --- a/src/notehub_py/api/project_api.py +++ b/src/notehub_py/api/project_api.py @@ -18,7 +18,7 @@ from typing_extensions import Annotated from pydantic import Field, StrictBool, StrictBytes, StrictStr, field_validator -from typing import Any, Dict, List, Optional, Union +from typing import List, Optional, Union from typing_extensions import Annotated from notehub_py.models.aws_role_config import AWSRoleConfig from notehub_py.models.add_device_to_fleets_request import AddDeviceToFleetsRequest @@ -26,6 +26,7 @@ from notehub_py.models.create_fleet_request import CreateFleetRequest from notehub_py.models.create_product_request import CreateProductRequest from notehub_py.models.create_project_request import CreateProjectRequest +from notehub_py.models.create_project_secret_request import CreateProjectSecretRequest from notehub_py.models.delete_device_from_fleets_request import ( DeleteDeviceFromFleetsRequest, ) @@ -43,12 +44,15 @@ from notehub_py.models.get_project_members200_response import ( GetProjectMembers200Response, ) +from notehub_py.models.get_project_secrets_response import GetProjectSecretsResponse from notehub_py.models.get_projects200_response import GetProjects200Response from notehub_py.models.notefile_schema import NotefileSchema from notehub_py.models.product import Product from notehub_py.models.project import Project +from notehub_py.models.project_secret import ProjectSecret from notehub_py.models.update_fleet_request import UpdateFleetRequest from notehub_py.models.update_host_firmware_request import UpdateHostFirmwareRequest +from notehub_py.models.update_project_secret_request import UpdateProjectSecretRequest from notehub_py.api_client import ApiClient, RequestSerialized from notehub_py.api_response import ApiResponse @@ -1426,6 +1430,276 @@ def _create_project_serialize( _request_auth=_request_auth, ) + @validate_call + def create_project_secret( + self, + project_or_product_uid: StrictStr, + create_project_secret_request: CreateProjectSecretRequest, + _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, + ) -> ProjectSecret: + """create_project_secret + + Create a new project secret + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param create_project_secret_request: (required) + :type create_project_secret_request: CreateProjectSecretRequest + :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._create_project_secret_serialize( + project_or_product_uid=project_or_product_uid, + create_project_secret_request=create_project_secret_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "ProjectSecret", + "400": "Error", + "409": "Error", + } + 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 create_project_secret_with_http_info( + self, + project_or_product_uid: StrictStr, + create_project_secret_request: CreateProjectSecretRequest, + _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[ProjectSecret]: + """create_project_secret + + Create a new project secret + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param create_project_secret_request: (required) + :type create_project_secret_request: CreateProjectSecretRequest + :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._create_project_secret_serialize( + project_or_product_uid=project_or_product_uid, + create_project_secret_request=create_project_secret_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "ProjectSecret", + "400": "Error", + "409": "Error", + } + 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 create_project_secret_without_preload_content( + self, + project_or_product_uid: StrictStr, + create_project_secret_request: CreateProjectSecretRequest, + _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: + """create_project_secret + + Create a new project secret + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param create_project_secret_request: (required) + :type create_project_secret_request: CreateProjectSecretRequest + :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._create_project_secret_serialize( + project_or_product_uid=project_or_product_uid, + create_project_secret_request=create_project_secret_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "ProjectSecret", + "400": "Error", + "409": "Error", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _create_project_secret_serialize( + self, + project_or_product_uid, + create_project_secret_request, + _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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_project_secret_request is not None: + _body_params = create_project_secret_request + + # set the HTTP header `Accept` + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v1/projects/{projectOrProductUID}/secrets", + 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 delete_device_from_fleets( self, @@ -3155,9 +3429,265 @@ def delete_project_environment_variable_with_http_info( def delete_project_environment_variable_without_preload_content( self, project_or_product_uid: StrictStr, - key: Annotated[ - StrictStr, Field(description="The environment variable key to delete.") - ], + key: Annotated[ + StrictStr, Field(description="The environment variable key to delete.") + ], + _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: + """delete_project_environment_variable + + Delete an environment variable of a project by key + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param key: The environment variable key to delete. (required) + :type key: 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._delete_project_environment_variable_serialize( + project_or_product_uid=project_or_product_uid, + key=key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "EnvironmentVariables", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _delete_project_environment_variable_serialize( + self, + project_or_product_uid, + key, + _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 key is not None: + _path_params["key"] = key + # 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/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/projects/{projectOrProductUID}/environment_variables/{key}", + 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 delete_project_secret( + self, + project_or_product_uid: StrictStr, + secret_name: Annotated[StrictStr, Field(description="The name of the secret.")], + _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, + ) -> None: + """delete_project_secret + + Delete a project secret by name + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param secret_name: The name of the secret. (required) + :type secret_name: 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._delete_project_secret_serialize( + project_or_product_uid=project_or_product_uid, + secret_name=secret_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "404": "Error", + } + 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 delete_project_secret_with_http_info( + self, + project_or_product_uid: StrictStr, + secret_name: Annotated[StrictStr, Field(description="The name of the secret.")], + _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[None]: + """delete_project_secret + + Delete a project secret by name + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param secret_name: The name of the secret. (required) + :type secret_name: 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._delete_project_secret_serialize( + project_or_product_uid=project_or_product_uid, + secret_name=secret_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "404": "Error", + } + 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 delete_project_secret_without_preload_content( + self, + project_or_product_uid: StrictStr, + secret_name: Annotated[StrictStr, Field(description="The name of the secret.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3170,14 +3700,14 @@ def delete_project_environment_variable_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_project_environment_variable + """delete_project_secret - Delete an environment variable of a project by key + Delete a project secret by name :param project_or_product_uid: (required) :type project_or_product_uid: str - :param key: The environment variable key to delete. (required) - :type key: str + :param secret_name: The name of the secret. (required) + :type secret_name: 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 @@ -3200,9 +3730,9 @@ def delete_project_environment_variable_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_project_environment_variable_serialize( + _param = self._delete_project_secret_serialize( project_or_product_uid=project_or_product_uid, - key=key, + secret_name=secret_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3210,17 +3740,18 @@ def delete_project_environment_variable_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "EnvironmentVariables", + "204": None, + "404": "Error", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) return response_data.response - def _delete_project_environment_variable_serialize( + def _delete_project_secret_serialize( self, project_or_product_uid, - key, + secret_name, _request_auth, _content_type, _headers, @@ -3241,8 +3772,8 @@ def _delete_project_environment_variable_serialize( # process the path parameters if project_or_product_uid is not None: _path_params["projectOrProductUID"] = project_or_product_uid - if key is not None: - _path_params["key"] = key + if secret_name is not None: + _path_params["secretName"] = secret_name # process the query parameters # process the header parameters # process the form parameters @@ -3258,7 +3789,7 @@ def _delete_project_environment_variable_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectOrProductUID}/environment_variables/{key}", + resource_path="/v1/projects/{projectOrProductUID}/secrets/{secretName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7731,7 +8262,7 @@ def _get_notefile_schemas_serialize( ) # authentication setting - _auth_settings: List[str] = [] + _auth_settings: List[str] = ["personalAccessToken"] return self.api_client.param_serialize( method="GET", @@ -8888,14 +9419,253 @@ def get_project_environment_variables_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "EnvironmentVariables", + "200": "EnvironmentVariables", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_project_environment_variables_serialize( + self, + project_or_product_uid, + _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 + # 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/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/v1/projects/{projectOrProductUID}/environment_variables", + 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 get_project_members( + self, + project_or_product_uid: 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, + ) -> GetProjectMembers200Response: + """get_project_members + + Get Project Members + + :param project_or_product_uid: (required) + :type project_or_product_uid: 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._get_project_members_serialize( + project_or_product_uid=project_or_product_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetProjectMembers200Response", + } + 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 get_project_members_with_http_info( + self, + project_or_product_uid: 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[GetProjectMembers200Response]: + """get_project_members + + Get Project Members + + :param project_or_product_uid: (required) + :type project_or_product_uid: 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._get_project_members_serialize( + project_or_product_uid=project_or_product_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetProjectMembers200Response", + } + 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 get_project_members_without_preload_content( + self, + project_or_product_uid: 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: + """get_project_members + + Get Project Members + + :param project_or_product_uid: (required) + :type project_or_product_uid: 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._get_project_members_serialize( + project_or_product_uid=project_or_product_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetProjectMembers200Response", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_project_environment_variables_serialize( + def _get_project_members_serialize( self, project_or_product_uid, _request_auth, @@ -8933,7 +9703,7 @@ def _get_project_environment_variables_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectOrProductUID}/environment_variables", + resource_path="/v1/projects/{projectOrProductUID}/members", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8947,7 +9717,7 @@ def _get_project_environment_variables_serialize( ) @validate_call - def get_project_members( + def get_project_secrets( self, project_or_product_uid: StrictStr, _request_timeout: Union[ @@ -8961,10 +9731,10 @@ def get_project_members( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetProjectMembers200Response: - """get_project_members + ) -> GetProjectSecretsResponse: + """get_project_secrets - Get Project Members + Get all secrets for a project (metadata only, values are never returned) :param project_or_product_uid: (required) :type project_or_product_uid: str @@ -8990,7 +9760,7 @@ def get_project_members( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_members_serialize( + _param = self._get_project_secrets_serialize( project_or_product_uid=project_or_product_uid, _request_auth=_request_auth, _content_type=_content_type, @@ -8999,7 +9769,7 @@ def get_project_members( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetProjectMembers200Response", + "200": "GetProjectSecretsResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -9011,7 +9781,7 @@ def get_project_members( ).data @validate_call - def get_project_members_with_http_info( + def get_project_secrets_with_http_info( self, project_or_product_uid: StrictStr, _request_timeout: Union[ @@ -9025,10 +9795,10 @@ def get_project_members_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetProjectMembers200Response]: - """get_project_members + ) -> ApiResponse[GetProjectSecretsResponse]: + """get_project_secrets - Get Project Members + Get all secrets for a project (metadata only, values are never returned) :param project_or_product_uid: (required) :type project_or_product_uid: str @@ -9054,7 +9824,7 @@ def get_project_members_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_members_serialize( + _param = self._get_project_secrets_serialize( project_or_product_uid=project_or_product_uid, _request_auth=_request_auth, _content_type=_content_type, @@ -9063,7 +9833,7 @@ def get_project_members_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetProjectMembers200Response", + "200": "GetProjectSecretsResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -9075,7 +9845,7 @@ def get_project_members_with_http_info( ) @validate_call - def get_project_members_without_preload_content( + def get_project_secrets_without_preload_content( self, project_or_product_uid: StrictStr, _request_timeout: Union[ @@ -9090,9 +9860,9 @@ def get_project_members_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_project_members + """get_project_secrets - Get Project Members + Get all secrets for a project (metadata only, values are never returned) :param project_or_product_uid: (required) :type project_or_product_uid: str @@ -9118,7 +9888,7 @@ def get_project_members_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_members_serialize( + _param = self._get_project_secrets_serialize( project_or_product_uid=project_or_product_uid, _request_auth=_request_auth, _content_type=_content_type, @@ -9127,14 +9897,14 @@ def get_project_members_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetProjectMembers200Response", + "200": "GetProjectSecretsResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_project_members_serialize( + def _get_project_secrets_serialize( self, project_or_product_uid, _request_auth, @@ -9172,7 +9942,7 @@ def _get_project_members_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectOrProductUID}/members", + resource_path="/v1/projects/{projectOrProductUID}/secrets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10209,7 +10979,7 @@ def set_global_event_transformation( self, project_or_product_uid: StrictStr, body: Annotated[ - Dict[str, Any], + StrictStr, Field( description="JSONata expression which will be applied to each event before it is persisted and routed" ), @@ -10233,7 +11003,7 @@ def set_global_event_transformation( :param project_or_product_uid: (required) :type project_or_product_uid: str :param body: JSONata expression which will be applied to each event before it is persisted and routed (required) - :type body: object + :type body: 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 @@ -10282,7 +11052,7 @@ def set_global_event_transformation_with_http_info( self, project_or_product_uid: StrictStr, body: Annotated[ - Dict[str, Any], + StrictStr, Field( description="JSONata expression which will be applied to each event before it is persisted and routed" ), @@ -10306,7 +11076,7 @@ def set_global_event_transformation_with_http_info( :param project_or_product_uid: (required) :type project_or_product_uid: str :param body: JSONata expression which will be applied to each event before it is persisted and routed (required) - :type body: object + :type body: 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 @@ -10355,7 +11125,7 @@ def set_global_event_transformation_without_preload_content( self, project_or_product_uid: StrictStr, body: Annotated[ - Dict[str, Any], + StrictStr, Field( description="JSONata expression which will be applied to each event before it is persisted and routed" ), @@ -10379,7 +11149,7 @@ def set_global_event_transformation_without_preload_content( :param project_or_product_uid: (required) :type project_or_product_uid: str :param body: JSONata expression which will be applied to each event before it is persisted and routed (required) - :type body: object + :type body: 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 @@ -10460,7 +11230,7 @@ def _set_global_event_transformation_serialize( _header_params["Content-Type"] = _content_type else: _default_content_type = self.api_client.select_header_content_type( - ["application/json"] + ["text/plain"] ) if _default_content_type is not None: _header_params["Content-Type"] = _default_content_type @@ -11341,6 +12111,288 @@ def _update_fleet_serialize( _request_auth=_request_auth, ) + @validate_call + def update_project_secret( + self, + project_or_product_uid: StrictStr, + secret_name: Annotated[StrictStr, Field(description="The name of the secret.")], + update_project_secret_request: UpdateProjectSecretRequest, + _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, + ) -> ProjectSecret: + """update_project_secret + + Update the value of an existing project secret + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param secret_name: The name of the secret. (required) + :type secret_name: str + :param update_project_secret_request: (required) + :type update_project_secret_request: UpdateProjectSecretRequest + :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._update_project_secret_serialize( + project_or_product_uid=project_or_product_uid, + secret_name=secret_name, + update_project_secret_request=update_project_secret_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ProjectSecret", + "404": "Error", + } + 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 update_project_secret_with_http_info( + self, + project_or_product_uid: StrictStr, + secret_name: Annotated[StrictStr, Field(description="The name of the secret.")], + update_project_secret_request: UpdateProjectSecretRequest, + _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[ProjectSecret]: + """update_project_secret + + Update the value of an existing project secret + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param secret_name: The name of the secret. (required) + :type secret_name: str + :param update_project_secret_request: (required) + :type update_project_secret_request: UpdateProjectSecretRequest + :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._update_project_secret_serialize( + project_or_product_uid=project_or_product_uid, + secret_name=secret_name, + update_project_secret_request=update_project_secret_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ProjectSecret", + "404": "Error", + } + 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 update_project_secret_without_preload_content( + self, + project_or_product_uid: StrictStr, + secret_name: Annotated[StrictStr, Field(description="The name of the secret.")], + update_project_secret_request: UpdateProjectSecretRequest, + _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: + """update_project_secret + + Update the value of an existing project secret + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param secret_name: The name of the secret. (required) + :type secret_name: str + :param update_project_secret_request: (required) + :type update_project_secret_request: UpdateProjectSecretRequest + :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._update_project_secret_serialize( + project_or_product_uid=project_or_product_uid, + secret_name=secret_name, + update_project_secret_request=update_project_secret_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ProjectSecret", + "404": "Error", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _update_project_secret_serialize( + self, + project_or_product_uid, + secret_name, + update_project_secret_request, + _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 secret_name is not None: + _path_params["secretName"] = secret_name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_project_secret_request is not None: + _body_params = update_project_secret_request + + # set the HTTP header `Accept` + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/v1/projects/{projectOrProductUID}/secrets/{secretName}", + 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 upload_firmware( self, diff --git a/src/notehub_py/api/webhook_api.py b/src/notehub_py/api/webhook_api.py index aa8279b..b1bf0a2 100644 --- a/src/notehub_py/api/webhook_api.py +++ b/src/notehub_py/api/webhook_api.py @@ -18,7 +18,11 @@ from typing_extensions import Annotated from pydantic import Field, StrictStr +from typing import Any, Dict, Optional from typing_extensions import Annotated +from notehub_py.models.create_legacy_webhook_event_request import ( + CreateLegacyWebhookEventRequest, +) from notehub_py.models.get_webhooks200_response import GetWebhooks200Response from notehub_py.models.webhook_settings import WebhookSettings @@ -40,11 +44,16 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client @validate_call - def create_webhook( + def create_legacy_webhook_event( self, - project_or_product_uid: StrictStr, - webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], - webhook_settings: WebhookSettings, + product_uid: StrictStr, + device_uid: StrictStr, + create_legacy_webhook_event_request: Annotated[ + CreateLegacyWebhookEventRequest, + Field( + description="A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload." + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -57,16 +66,16 @@ def create_webhook( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """create_webhook + """create_legacy_webhook_event - Creates a webhook for the specified product with the given name. The name | must be unique within the project. + Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload. - :param project_or_product_uid: (required) - :type project_or_product_uid: str - :param webhook_uid: Webhook UID (required) - :type webhook_uid: str - :param webhook_settings: (required) - :type webhook_settings: WebhookSettings + :param product_uid: (required) + :type product_uid: str + :param device_uid: (required) + :type device_uid: str + :param create_legacy_webhook_event_request: A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload. (required) + :type create_legacy_webhook_event_request: CreateLegacyWebhookEventRequest :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 @@ -89,10 +98,10 @@ def create_webhook( :return: Returns the result object. """ # noqa: E501 - _param = self._create_webhook_serialize( - project_or_product_uid=project_or_product_uid, - webhook_uid=webhook_uid, - webhook_settings=webhook_settings, + _param = self._create_legacy_webhook_event_serialize( + product_uid=product_uid, + device_uid=device_uid, + create_legacy_webhook_event_request=create_legacy_webhook_event_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -112,11 +121,16 @@ def create_webhook( ).data @validate_call - def create_webhook_with_http_info( + def create_legacy_webhook_event_with_http_info( self, - project_or_product_uid: StrictStr, - webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], - webhook_settings: WebhookSettings, + product_uid: StrictStr, + device_uid: StrictStr, + create_legacy_webhook_event_request: Annotated[ + CreateLegacyWebhookEventRequest, + Field( + description="A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload." + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -129,16 +143,16 @@ def create_webhook_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """create_webhook + """create_legacy_webhook_event - Creates a webhook for the specified product with the given name. The name | must be unique within the project. + Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload. - :param project_or_product_uid: (required) - :type project_or_product_uid: str - :param webhook_uid: Webhook UID (required) - :type webhook_uid: str - :param webhook_settings: (required) - :type webhook_settings: WebhookSettings + :param product_uid: (required) + :type product_uid: str + :param device_uid: (required) + :type device_uid: str + :param create_legacy_webhook_event_request: A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload. (required) + :type create_legacy_webhook_event_request: CreateLegacyWebhookEventRequest :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 @@ -161,10 +175,10 @@ def create_webhook_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_webhook_serialize( - project_or_product_uid=project_or_product_uid, - webhook_uid=webhook_uid, - webhook_settings=webhook_settings, + _param = self._create_legacy_webhook_event_serialize( + product_uid=product_uid, + device_uid=device_uid, + create_legacy_webhook_event_request=create_legacy_webhook_event_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -184,11 +198,16 @@ def create_webhook_with_http_info( ) @validate_call - def create_webhook_without_preload_content( + def create_legacy_webhook_event_without_preload_content( self, - project_or_product_uid: StrictStr, - webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], - webhook_settings: WebhookSettings, + product_uid: StrictStr, + device_uid: StrictStr, + create_legacy_webhook_event_request: Annotated[ + CreateLegacyWebhookEventRequest, + Field( + description="A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload." + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -201,16 +220,16 @@ def create_webhook_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """create_webhook + """create_legacy_webhook_event - Creates a webhook for the specified product with the given name. The name | must be unique within the project. + Legacy endpoint for sending an event from a webhook, associated with the given device (provisioning it if necessary). The request body is a Note-shaped object containing the notefile name, body, and optional payload. - :param project_or_product_uid: (required) - :type project_or_product_uid: str - :param webhook_uid: Webhook UID (required) - :type webhook_uid: str - :param webhook_settings: (required) - :type webhook_settings: WebhookSettings + :param product_uid: (required) + :type product_uid: str + :param device_uid: (required) + :type device_uid: str + :param create_legacy_webhook_event_request: A Note-shaped event with notefile name, JSON body, and optional base64-encoded payload. (required) + :type create_legacy_webhook_event_request: CreateLegacyWebhookEventRequest :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 @@ -233,10 +252,10 @@ def create_webhook_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_webhook_serialize( - project_or_product_uid=project_or_product_uid, - webhook_uid=webhook_uid, - webhook_settings=webhook_settings, + _param = self._create_legacy_webhook_event_serialize( + product_uid=product_uid, + device_uid=device_uid, + create_legacy_webhook_event_request=create_legacy_webhook_event_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -251,11 +270,11 @@ def create_webhook_without_preload_content( ) return response_data.response - def _create_webhook_serialize( + def _create_legacy_webhook_event_serialize( self, - project_or_product_uid, - webhook_uid, - webhook_settings, + product_uid, + device_uid, + create_legacy_webhook_event_request, _request_auth, _content_type, _headers, @@ -274,16 +293,16 @@ def _create_webhook_serialize( _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 webhook_uid is not None: - _path_params["webhookUID"] = webhook_uid + if product_uid is not None: + _path_params["productUID"] = product_uid + if device_uid is not None: + _path_params["deviceUID"] = device_uid # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if webhook_settings is not None: - _body_params = webhook_settings + if create_legacy_webhook_event_request is not None: + _body_params = create_legacy_webhook_event_request # set the HTTP header `Accept` _header_params["Accept"] = self.api_client.select_header_accept( @@ -305,7 +324,7 @@ def _create_webhook_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}", + resource_path="/v1/products/{productUID}/devices/{deviceUID}/webhook-event", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -319,10 +338,11 @@ def _create_webhook_serialize( ) @validate_call - def delete_webhook( + def create_webhook( self, project_or_product_uid: StrictStr, webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + webhook_settings: WebhookSettings, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -335,14 +355,16 @@ def delete_webhook( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """delete_webhook + """create_webhook - Deletes the specified webhook + Creates a webhook for the specified product with the given name. The name | must be unique within the project. :param project_or_product_uid: (required) :type project_or_product_uid: str :param webhook_uid: Webhook UID (required) :type webhook_uid: str + :param webhook_settings: (required) + :type webhook_settings: WebhookSettings :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 @@ -365,9 +387,10 @@ def delete_webhook( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_webhook_serialize( + _param = self._create_webhook_serialize( project_or_product_uid=project_or_product_uid, webhook_uid=webhook_uid, + webhook_settings=webhook_settings, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -387,10 +410,11 @@ def delete_webhook( ).data @validate_call - def delete_webhook_with_http_info( + def create_webhook_with_http_info( self, project_or_product_uid: StrictStr, webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + webhook_settings: WebhookSettings, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -403,14 +427,16 @@ def delete_webhook_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """delete_webhook + """create_webhook - Deletes the specified webhook + Creates a webhook for the specified product with the given name. The name | must be unique within the project. :param project_or_product_uid: (required) :type project_or_product_uid: str :param webhook_uid: Webhook UID (required) :type webhook_uid: str + :param webhook_settings: (required) + :type webhook_settings: WebhookSettings :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 @@ -433,9 +459,10 @@ def delete_webhook_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_webhook_serialize( + _param = self._create_webhook_serialize( project_or_product_uid=project_or_product_uid, webhook_uid=webhook_uid, + webhook_settings=webhook_settings, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -455,10 +482,11 @@ def delete_webhook_with_http_info( ) @validate_call - def delete_webhook_without_preload_content( + def create_webhook_without_preload_content( self, project_or_product_uid: StrictStr, webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + webhook_settings: WebhookSettings, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -471,14 +499,16 @@ def delete_webhook_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_webhook + """create_webhook - Deletes the specified webhook + Creates a webhook for the specified product with the given name. The name | must be unique within the project. :param project_or_product_uid: (required) :type project_or_product_uid: str :param webhook_uid: Webhook UID (required) :type webhook_uid: str + :param webhook_settings: (required) + :type webhook_settings: WebhookSettings :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 @@ -501,9 +531,10 @@ def delete_webhook_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_webhook_serialize( + _param = self._create_webhook_serialize( project_or_product_uid=project_or_product_uid, webhook_uid=webhook_uid, + webhook_settings=webhook_settings, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -518,10 +549,11 @@ def delete_webhook_without_preload_content( ) return response_data.response - def _delete_webhook_serialize( + def _create_webhook_serialize( self, project_or_product_uid, webhook_uid, + webhook_settings, _request_auth, _content_type, _headers, @@ -548,17 +580,29 @@ def _delete_webhook_serialize( # process the header parameters # process the form parameters # process the body parameter + if webhook_settings is not None: + _body_params = webhook_settings # set the HTTP header `Accept` _header_params["Accept"] = self.api_client.select_header_accept( ["application/json"] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = ["personalAccessToken"] return self.api_client.param_serialize( - method="DELETE", + method="POST", resource_path="/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}", path_params=_path_params, query_params=_query_params, @@ -573,10 +617,14 @@ def _delete_webhook_serialize( ) @validate_call - def get_webhook( + def create_webhook_device_event_by_product( self, - project_or_product_uid: StrictStr, + product_uid: StrictStr, webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + device_uid: StrictStr, + request_body: Annotated[ + Dict[str, Any], Field(description="The event body (arbitrary JSON)") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -588,15 +636,19 @@ def get_webhook( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WebhookSettings: - """get_webhook + ) -> None: + """create_webhook_device_event_by_product - Retrieves the configuration settings for the specified webhook + Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. - :param project_or_product_uid: (required) - :type project_or_product_uid: str + :param product_uid: (required) + :type product_uid: str :param webhook_uid: Webhook UID (required) :type webhook_uid: str + :param device_uid: (required) + :type device_uid: str + :param request_body: The event body (arbitrary JSON) (required) + :type request_body: Dict[str, object] :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 @@ -619,9 +671,11 @@ def get_webhook( :return: Returns the result object. """ # noqa: E501 - _param = self._get_webhook_serialize( - project_or_product_uid=project_or_product_uid, + _param = self._create_webhook_device_event_by_product_serialize( + product_uid=product_uid, webhook_uid=webhook_uid, + device_uid=device_uid, + request_body=request_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -629,7 +683,7 @@ def get_webhook( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WebhookSettings", + "200": None, } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -641,10 +695,14 @@ def get_webhook( ).data @validate_call - def get_webhook_with_http_info( + def create_webhook_device_event_by_product_with_http_info( self, - project_or_product_uid: StrictStr, + product_uid: StrictStr, webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + device_uid: StrictStr, + request_body: Annotated[ + Dict[str, Any], Field(description="The event body (arbitrary JSON)") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -656,15 +714,19 @@ def get_webhook_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WebhookSettings]: - """get_webhook + ) -> ApiResponse[None]: + """create_webhook_device_event_by_product - Retrieves the configuration settings for the specified webhook + Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. - :param project_or_product_uid: (required) - :type project_or_product_uid: str + :param product_uid: (required) + :type product_uid: str :param webhook_uid: Webhook UID (required) :type webhook_uid: str + :param device_uid: (required) + :type device_uid: str + :param request_body: The event body (arbitrary JSON) (required) + :type request_body: Dict[str, object] :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 @@ -687,9 +749,11 @@ def get_webhook_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_webhook_serialize( - project_or_product_uid=project_or_product_uid, + _param = self._create_webhook_device_event_by_product_serialize( + product_uid=product_uid, webhook_uid=webhook_uid, + device_uid=device_uid, + request_body=request_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -697,7 +761,7 @@ def get_webhook_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WebhookSettings", + "200": None, } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -709,10 +773,14 @@ def get_webhook_with_http_info( ) @validate_call - def get_webhook_without_preload_content( + def create_webhook_device_event_by_product_without_preload_content( self, - project_or_product_uid: StrictStr, + product_uid: StrictStr, webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + device_uid: StrictStr, + request_body: Annotated[ + Dict[str, Any], Field(description="The event body (arbitrary JSON)") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -725,14 +793,18 @@ def get_webhook_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_webhook + """create_webhook_device_event_by_product - Retrieves the configuration settings for the specified webhook + Sends an event to be processed by the specified webhook, addressed by productUID, associated with the given device (provisioning it if necessary). The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. - :param project_or_product_uid: (required) - :type project_or_product_uid: str + :param product_uid: (required) + :type product_uid: str :param webhook_uid: Webhook UID (required) :type webhook_uid: str + :param device_uid: (required) + :type device_uid: str + :param request_body: The event body (arbitrary JSON) (required) + :type request_body: Dict[str, object] :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 @@ -755,9 +827,11 @@ def get_webhook_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_webhook_serialize( - project_or_product_uid=project_or_product_uid, + _param = self._create_webhook_device_event_by_product_serialize( + product_uid=product_uid, webhook_uid=webhook_uid, + device_uid=device_uid, + request_body=request_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -765,17 +839,19 @@ def get_webhook_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "WebhookSettings", + "200": None, } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_webhook_serialize( + def _create_webhook_device_event_by_product_serialize( self, - project_or_product_uid, + product_uid, webhook_uid, + device_uid, + request_body, _request_auth, _content_type, _headers, @@ -794,26 +870,40 @@ def _get_webhook_serialize( _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 product_uid is not None: + _path_params["productUID"] = product_uid if webhook_uid is not None: _path_params["webhookUID"] = webhook_uid + if device_uid is not None: + _path_params["deviceUID"] = device_uid # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if request_body is not None: + _body_params = request_body # set the HTTP header `Accept` _header_params["Accept"] = self.api_client.select_header_accept( ["application/json"] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = ["personalAccessToken"] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}", + method="POST", + resource_path="/v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -827,9 +917,13 @@ def _get_webhook_serialize( ) @validate_call - def get_webhooks( + def create_webhook_event_by_product( self, - project_or_product_uid: StrictStr, + product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + request_body: Annotated[ + Dict[str, Any], Field(description="The event body (arbitrary JSON)") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -841,13 +935,17 @@ def get_webhooks( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetWebhooks200Response: - """get_webhooks + ) -> None: + """create_webhook_event_by_product - Retrieves all webhooks for the specified project + Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device. - :param project_or_product_uid: (required) - :type project_or_product_uid: str + :param product_uid: (required) + :type product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: str + :param request_body: The event body (arbitrary JSON) (required) + :type request_body: Dict[str, object] :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 @@ -870,8 +968,10 @@ def get_webhooks( :return: Returns the result object. """ # noqa: E501 - _param = self._get_webhooks_serialize( - project_or_product_uid=project_or_product_uid, + _param = self._create_webhook_event_by_product_serialize( + product_uid=product_uid, + webhook_uid=webhook_uid, + request_body=request_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -879,7 +979,7 @@ def get_webhooks( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetWebhooks200Response", + "200": None, } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -891,9 +991,13 @@ def get_webhooks( ).data @validate_call - def get_webhooks_with_http_info( + def create_webhook_event_by_product_with_http_info( self, - project_or_product_uid: StrictStr, + product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + request_body: Annotated[ + Dict[str, Any], Field(description="The event body (arbitrary JSON)") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -905,13 +1009,17 @@ def get_webhooks_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetWebhooks200Response]: - """get_webhooks + ) -> ApiResponse[None]: + """create_webhook_event_by_product - Retrieves all webhooks for the specified project + Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device. - :param project_or_product_uid: (required) - :type project_or_product_uid: str + :param product_uid: (required) + :type product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: str + :param request_body: The event body (arbitrary JSON) (required) + :type request_body: Dict[str, object] :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 @@ -934,8 +1042,10 @@ def get_webhooks_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_webhooks_serialize( - project_or_product_uid=project_or_product_uid, + _param = self._create_webhook_event_by_product_serialize( + product_uid=product_uid, + webhook_uid=webhook_uid, + request_body=request_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -943,7 +1053,7 @@ def get_webhooks_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetWebhooks200Response", + "200": None, } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -955,9 +1065,13 @@ def get_webhooks_with_http_info( ) @validate_call - def get_webhooks_without_preload_content( + def create_webhook_event_by_product_without_preload_content( self, - project_or_product_uid: StrictStr, + product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + request_body: Annotated[ + Dict[str, Any], Field(description="The event body (arbitrary JSON)") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -970,12 +1084,16 @@ def get_webhooks_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_webhooks + """create_webhook_event_by_product - Retrieves all webhooks for the specified project + Sends an event to be processed by the specified webhook, addressed by productUID. The entire request body becomes the event body. The webhook's configured JSONata transform, if any, is applied before routing. The event is not associated with a specific device. - :param project_or_product_uid: (required) - :type project_or_product_uid: str + :param product_uid: (required) + :type product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: str + :param request_body: The event body (arbitrary JSON) (required) + :type request_body: Dict[str, object] :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 @@ -998,8 +1116,10 @@ def get_webhooks_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_webhooks_serialize( - project_or_product_uid=project_or_product_uid, + _param = self._create_webhook_event_by_product_serialize( + product_uid=product_uid, + webhook_uid=webhook_uid, + request_body=request_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1007,16 +1127,18 @@ def get_webhooks_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetWebhooks200Response", + "200": None, } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_webhooks_serialize( + def _create_webhook_event_by_product_serialize( self, - project_or_product_uid, + product_uid, + webhook_uid, + request_body, _request_auth, _content_type, _headers, @@ -1035,24 +1157,38 @@ def _get_webhooks_serialize( _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 product_uid is not None: + _path_params["productUID"] = product_uid + if webhook_uid is not None: + _path_params["webhookUID"] = webhook_uid # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if request_body is not None: + _body_params = request_body # set the HTTP header `Accept` _header_params["Accept"] = self.api_client.select_header_accept( ["application/json"] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = ["personalAccessToken"] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectOrProductUID}/webhooks", + method="POST", + resource_path="/v1/products/{productUID}/webhooks/{webhookUID}/event", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1066,11 +1202,10 @@ def _get_webhooks_serialize( ) @validate_call - def update_webhook( + def delete_webhook( self, project_or_product_uid: StrictStr, webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], - webhook_settings: WebhookSettings, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1083,16 +1218,14 @@ def update_webhook( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """update_webhook + """delete_webhook - 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. + Deletes the specified webhook :param project_or_product_uid: (required) :type project_or_product_uid: str :param webhook_uid: Webhook UID (required) :type webhook_uid: str - :param webhook_settings: (required) - :type webhook_settings: WebhookSettings :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 @@ -1115,10 +1248,9 @@ def update_webhook( :return: Returns the result object. """ # noqa: E501 - _param = self._update_webhook_serialize( + _param = self._delete_webhook_serialize( project_or_product_uid=project_or_product_uid, webhook_uid=webhook_uid, - webhook_settings=webhook_settings, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1138,11 +1270,10 @@ def update_webhook( ).data @validate_call - def update_webhook_with_http_info( + def delete_webhook_with_http_info( self, project_or_product_uid: StrictStr, webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], - webhook_settings: WebhookSettings, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1155,16 +1286,14 @@ def update_webhook_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """update_webhook + """delete_webhook - 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. + Deletes the specified webhook :param project_or_product_uid: (required) :type project_or_product_uid: str :param webhook_uid: Webhook UID (required) :type webhook_uid: str - :param webhook_settings: (required) - :type webhook_settings: WebhookSettings :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 @@ -1187,10 +1316,9 @@ def update_webhook_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_webhook_serialize( + _param = self._delete_webhook_serialize( project_or_product_uid=project_or_product_uid, webhook_uid=webhook_uid, - webhook_settings=webhook_settings, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1210,11 +1338,1305 @@ def update_webhook_with_http_info( ) @validate_call - def update_webhook_without_preload_content( + def delete_webhook_without_preload_content( self, project_or_product_uid: StrictStr, webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], - webhook_settings: WebhookSettings, + _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: + """delete_webhook + + Deletes the specified webhook + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: 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._delete_webhook_serialize( + project_or_product_uid=project_or_product_uid, + webhook_uid=webhook_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _delete_webhook_serialize( + self, + project_or_product_uid, + webhook_uid, + _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 webhook_uid is not None: + _path_params["webhookUID"] = webhook_uid + # 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/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}", + 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 get_webhook( + self, + project_or_product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + _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, + ) -> WebhookSettings: + """get_webhook + + Retrieves the configuration settings for the specified webhook + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: 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._get_webhook_serialize( + project_or_product_uid=project_or_product_uid, + webhook_uid=webhook_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "WebhookSettings", + } + 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 get_webhook_with_http_info( + self, + project_or_product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + _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[WebhookSettings]: + """get_webhook + + Retrieves the configuration settings for the specified webhook + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: 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._get_webhook_serialize( + project_or_product_uid=project_or_product_uid, + webhook_uid=webhook_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "WebhookSettings", + } + 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 get_webhook_without_preload_content( + self, + project_or_product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + _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: + """get_webhook + + Retrieves the configuration settings for the specified webhook + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: 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._get_webhook_serialize( + project_or_product_uid=project_or_product_uid, + webhook_uid=webhook_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "WebhookSettings", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_webhook_serialize( + self, + project_or_product_uid, + webhook_uid, + _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 webhook_uid is not None: + _path_params["webhookUID"] = webhook_uid + # 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/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}", + 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 get_webhook_settings_by_product( + self, + product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + _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, + ) -> WebhookSettings: + """get_webhook_settings_by_product + + Retrieves the configuration settings for the specified webhook, addressed by productUID. + + :param product_uid: (required) + :type product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: 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._get_webhook_settings_by_product_serialize( + product_uid=product_uid, + webhook_uid=webhook_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "WebhookSettings", + } + 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 get_webhook_settings_by_product_with_http_info( + self, + product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + _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[WebhookSettings]: + """get_webhook_settings_by_product + + Retrieves the configuration settings for the specified webhook, addressed by productUID. + + :param product_uid: (required) + :type product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: 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._get_webhook_settings_by_product_serialize( + product_uid=product_uid, + webhook_uid=webhook_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "WebhookSettings", + } + 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 get_webhook_settings_by_product_without_preload_content( + self, + product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + _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: + """get_webhook_settings_by_product + + Retrieves the configuration settings for the specified webhook, addressed by productUID. + + :param product_uid: (required) + :type product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: 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._get_webhook_settings_by_product_serialize( + product_uid=product_uid, + webhook_uid=webhook_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "WebhookSettings", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_webhook_settings_by_product_serialize( + self, + product_uid, + webhook_uid, + _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 product_uid is not None: + _path_params["productUID"] = product_uid + if webhook_uid is not None: + _path_params["webhookUID"] = webhook_uid + # 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/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/v1/products/{productUID}/webhooks/{webhookUID}/settings", + 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 get_webhooks( + self, + project_or_product_uid: 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, + ) -> GetWebhooks200Response: + """get_webhooks + + Retrieves all webhooks for the specified project + + :param project_or_product_uid: (required) + :type project_or_product_uid: 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._get_webhooks_serialize( + project_or_product_uid=project_or_product_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetWebhooks200Response", + } + 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 get_webhooks_with_http_info( + self, + project_or_product_uid: 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[GetWebhooks200Response]: + """get_webhooks + + Retrieves all webhooks for the specified project + + :param project_or_product_uid: (required) + :type project_or_product_uid: 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._get_webhooks_serialize( + project_or_product_uid=project_or_product_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetWebhooks200Response", + } + 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 get_webhooks_without_preload_content( + self, + project_or_product_uid: 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: + """get_webhooks + + Retrieves all webhooks for the specified project + + :param project_or_product_uid: (required) + :type project_or_product_uid: 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._get_webhooks_serialize( + project_or_product_uid=project_or_product_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetWebhooks200Response", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_webhooks_serialize( + self, + project_or_product_uid, + _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 + # 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/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/v1/projects/{projectOrProductUID}/webhooks", + 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 update_legacy_webhook_session( + self, + product_uid: StrictStr, + device_uid: StrictStr, + request_body: Annotated[ + Optional[Dict[str, Any]], Field(description="Optional session metadata.") + ] = None, + _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, + ) -> None: + """update_legacy_webhook_session + + Legacy endpoint for opening or updating a webhook session for the given device (provisioning the device if necessary). Used by external services that need to maintain a callable session against a device behind a webhook. + + :param product_uid: (required) + :type product_uid: str + :param device_uid: (required) + :type device_uid: str + :param request_body: Optional session metadata. + :type request_body: Dict[str, object] + :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._update_legacy_webhook_session_serialize( + product_uid=product_uid, + device_uid=device_uid, + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": None, + } + 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 update_legacy_webhook_session_with_http_info( + self, + product_uid: StrictStr, + device_uid: StrictStr, + request_body: Annotated[ + Optional[Dict[str, Any]], Field(description="Optional session metadata.") + ] = None, + _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[None]: + """update_legacy_webhook_session + + Legacy endpoint for opening or updating a webhook session for the given device (provisioning the device if necessary). Used by external services that need to maintain a callable session against a device behind a webhook. + + :param product_uid: (required) + :type product_uid: str + :param device_uid: (required) + :type device_uid: str + :param request_body: Optional session metadata. + :type request_body: Dict[str, object] + :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._update_legacy_webhook_session_serialize( + product_uid=product_uid, + device_uid=device_uid, + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": None, + } + 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 update_legacy_webhook_session_without_preload_content( + self, + product_uid: StrictStr, + device_uid: StrictStr, + request_body: Annotated[ + Optional[Dict[str, Any]], Field(description="Optional session metadata.") + ] = None, + _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: + """update_legacy_webhook_session + + Legacy endpoint for opening or updating a webhook session for the given device (provisioning the device if necessary). Used by external services that need to maintain a callable session against a device behind a webhook. + + :param product_uid: (required) + :type product_uid: str + :param device_uid: (required) + :type device_uid: str + :param request_body: Optional session metadata. + :type request_body: Dict[str, object] + :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._update_legacy_webhook_session_serialize( + product_uid=product_uid, + device_uid=device_uid, + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _update_legacy_webhook_session_serialize( + self, + product_uid, + device_uid, + request_body, + _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 product_uid is not None: + _path_params["productUID"] = product_uid + if device_uid is not None: + _path_params["deviceUID"] = device_uid + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if request_body is not None: + _body_params = request_body + + # set the HTTP header `Accept` + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/v1/products/{productUID}/devices/{deviceUID}/webhook-session", + 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 update_webhook( + self, + project_or_product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + webhook_settings: WebhookSettings, + _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, + ) -> None: + """update_webhook + + 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. + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: str + :param webhook_settings: (required) + :type webhook_settings: WebhookSettings + :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._update_webhook_serialize( + project_or_product_uid=project_or_product_uid, + webhook_uid=webhook_uid, + webhook_settings=webhook_settings, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": None, + } + 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 update_webhook_with_http_info( + self, + project_or_product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + webhook_settings: WebhookSettings, + _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[None]: + """update_webhook + + 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. + + :param project_or_product_uid: (required) + :type project_or_product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: str + :param webhook_settings: (required) + :type webhook_settings: WebhookSettings + :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._update_webhook_serialize( + project_or_product_uid=project_or_product_uid, + webhook_uid=webhook_uid, + webhook_settings=webhook_settings, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": None, + } + 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 update_webhook_without_preload_content( + self, + project_or_product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + webhook_settings: WebhookSettings, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1343,3 +2765,282 @@ def _update_webhook_serialize( _host=_host, _request_auth=_request_auth, ) + + @validate_call + def update_webhook_settings_by_product( + self, + product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + webhook_settings: WebhookSettings, + _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, + ) -> None: + """update_webhook_settings_by_product + + Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings. + + :param product_uid: (required) + :type product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: str + :param webhook_settings: (required) + :type webhook_settings: WebhookSettings + :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._update_webhook_settings_by_product_serialize( + product_uid=product_uid, + webhook_uid=webhook_uid, + webhook_settings=webhook_settings, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": None, + } + 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 update_webhook_settings_by_product_with_http_info( + self, + product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + webhook_settings: WebhookSettings, + _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[None]: + """update_webhook_settings_by_product + + Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings. + + :param product_uid: (required) + :type product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: str + :param webhook_settings: (required) + :type webhook_settings: WebhookSettings + :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._update_webhook_settings_by_product_serialize( + product_uid=product_uid, + webhook_uid=webhook_uid, + webhook_settings=webhook_settings, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": None, + } + 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 update_webhook_settings_by_product_without_preload_content( + self, + product_uid: StrictStr, + webhook_uid: Annotated[StrictStr, Field(description="Webhook UID")], + webhook_settings: WebhookSettings, + _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: + """update_webhook_settings_by_product + + Updates the configuration settings for the specified webhook, addressed by productUID. Update body will completely replace the existing settings. + + :param product_uid: (required) + :type product_uid: str + :param webhook_uid: Webhook UID (required) + :type webhook_uid: str + :param webhook_settings: (required) + :type webhook_settings: WebhookSettings + :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._update_webhook_settings_by_product_serialize( + product_uid=product_uid, + webhook_uid=webhook_uid, + webhook_settings=webhook_settings, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _update_webhook_settings_by_product_serialize( + self, + product_uid, + webhook_uid, + webhook_settings, + _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 product_uid is not None: + _path_params["productUID"] = product_uid + if webhook_uid is not None: + _path_params["webhookUID"] = webhook_uid + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if webhook_settings is not None: + _body_params = webhook_settings + + # set the HTTP header `Accept` + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["personalAccessToken"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/v1/products/{productUID}/webhooks/{webhookUID}/settings", + 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, + ) diff --git a/src/notehub_py/api_client.py b/src/notehub_py/api_client.py index fc2187a..3bdff5a 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.2.0/python" + self.user_agent = "OpenAPI-Generator/6.3.0/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 39f1328..49556ea 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.2.0".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 6.3.0".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self): diff --git a/src/notehub_py/models/__init__.py b/src/notehub_py/models/__init__.py index d88a6ef..b5bed01 100644 --- a/src/notehub_py/models/__init__.py +++ b/src/notehub_py/models/__init__.py @@ -22,6 +22,7 @@ from notehub_py.models.alert_notifications_inner import AlertNotificationsInner from notehub_py.models.aws_route import AwsRoute from notehub_py.models.azure_route import AzureRoute +from notehub_py.models.batch_job_requests import BatchJobRequests from notehub_py.models.billing_account import BillingAccount from notehub_py.models.billing_account_role import BillingAccountRole from notehub_py.models.blynk_route import BlynkRoute @@ -32,9 +33,13 @@ from notehub_py.models.contact import Contact from notehub_py.models.create_fleet_request import CreateFleetRequest from notehub_py.models.create_job201_response import CreateJob201Response +from notehub_py.models.create_legacy_webhook_event_request import ( + CreateLegacyWebhookEventRequest, +) from notehub_py.models.create_monitor import CreateMonitor from notehub_py.models.create_product_request import CreateProductRequest from notehub_py.models.create_project_request import CreateProjectRequest +from notehub_py.models.create_project_secret_request import CreateProjectSecretRequest from notehub_py.models.create_update_repository import CreateUpdateRepository from notehub_py.models.current_firmware import CurrentFirmware from notehub_py.models.dfu_env import DFUEnv @@ -102,6 +107,16 @@ from notehub_py.models.get_device_health_log200_response_health_log_inner import ( GetDeviceHealthLog200ResponseHealthLogInner, ) +from notehub_py.models.get_device_journey200_response import GetDeviceJourney200Response +from notehub_py.models.get_device_journey200_response_journey import ( + GetDeviceJourney200ResponseJourney, +) +from notehub_py.models.get_device_journeys200_response import ( + GetDeviceJourneys200Response, +) +from notehub_py.models.get_device_journeys200_response_journeys_inner import ( + GetDeviceJourneys200ResponseJourneysInner, +) from notehub_py.models.get_device_latest_events200_response import ( GetDeviceLatestEvents200Response, ) @@ -130,6 +145,7 @@ from notehub_py.models.get_project_members200_response import ( GetProjectMembers200Response, ) +from notehub_py.models.get_project_secrets_response import GetProjectSecretsResponse from notehub_py.models.get_projects200_response import GetProjects200Response from notehub_py.models.get_route_logs_usage200_response import ( GetRouteLogsUsage200Response, @@ -139,6 +155,10 @@ from notehub_py.models.google_route import GoogleRoute from notehub_py.models.http_route import HttpRoute from notehub_py.models.job import Job +from notehub_py.models.job_definition import JobDefinition +from notehub_py.models.job_definition_report_options import JobDefinitionReportOptions +from notehub_py.models.job_definition_select import JobDefinitionSelect +from notehub_py.models.job_detail import JobDetail from notehub_py.models.job_run import JobRun from notehub_py.models.location import Location from notehub_py.models.login200_response import Login200Response @@ -163,11 +183,15 @@ from notehub_py.models.product import Product from notehub_py.models.project import Project from notehub_py.models.project_member import ProjectMember +from notehub_py.models.project_secret import ProjectSecret from notehub_py.models.provision_device_request import ProvisionDeviceRequest from notehub_py.models.proxy_route import ProxyRoute from notehub_py.models.qubitro_route import QubitroRoute from notehub_py.models.rad_route import RadRoute from notehub_py.models.repository import Repository +from notehub_py.models.repository_list_response import RepositoryListResponse +from notehub_py.models.repository_token_request import RepositoryTokenRequest +from notehub_py.models.repository_token_response import RepositoryTokenResponse from notehub_py.models.role import Role from notehub_py.models.route_log import RouteLog from notehub_py.models.route_transform_settings import RouteTransformSettings @@ -188,6 +212,7 @@ from notehub_py.models.twilio_route import TwilioRoute from notehub_py.models.update_fleet_request import UpdateFleetRequest from notehub_py.models.update_host_firmware_request import UpdateHostFirmwareRequest +from notehub_py.models.update_project_secret_request import UpdateProjectSecretRequest from notehub_py.models.upload_metadata import UploadMetadata from notehub_py.models.usage_data import UsageData from notehub_py.models.usage_events_data import UsageEventsData diff --git a/src/notehub_py/models/batch_job_requests.py b/src/notehub_py/models/batch_job_requests.py new file mode 100644 index 0000000..23f0b0d --- /dev/null +++ b/src/notehub_py/models/batch_job_requests.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + + +class BatchJobRequests(BaseModel): + """ + Operations to apply to a device + """ # noqa: E501 + + comment: Optional[StrictStr] = None + connectivity_assurance_disable: Optional[StrictBool] = Field( + default=None, description="Disable connectivity assurance for the device" + ) + connectivity_assurance_enable: Optional[StrictBool] = Field( + default=None, description="Enable connectivity assurance for the device" + ) + disable: Optional[StrictBool] = Field( + default=None, description="Disable the device" + ) + enable: Optional[StrictBool] = Field(default=None, description="Enable the device") + fleets_to_default: Optional[List[StrictStr]] = Field( + default=None, + description="Fleet UIDs to assign to the device if it has no fleets", + ) + fleets_to_join: Optional[List[StrictStr]] = Field( + default=None, description="Fleet UIDs to add the device to" + ) + fleets_to_leave: Optional[List[StrictStr]] = Field( + default=None, description="Fleet UIDs to remove the device from" + ) + provision_product: Optional[StrictStr] = Field( + default=None, + description="Product UID to provision the device with if not already provisioned", + ) + sn_to_default: Optional[StrictStr] = Field( + default=None, description="Set the device serial number only if not already set" + ) + sn_to_set: Optional[StrictStr] = Field( + default=None, description='Set the device serial number ("-" to clear)' + ) + vars_to_default: Optional[Dict[str, StrictStr]] = Field( + default=None, description="Environment variables to set only if not already set" + ) + vars_to_set: Optional[Dict[str, StrictStr]] = Field( + default=None, + description='Environment variables to set (use "-" as value to clear)', + ) + __properties: ClassVar[List[str]] = [ + "comment", + "connectivity_assurance_disable", + "connectivity_assurance_enable", + "disable", + "enable", + "fleets_to_default", + "fleets_to_join", + "fleets_to_leave", + "provision_product", + "sn_to_default", + "sn_to_set", + "vars_to_default", + "vars_to_set", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BatchJobRequests from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BatchJobRequests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "comment": obj.get("comment"), + "connectivity_assurance_disable": obj.get( + "connectivity_assurance_disable" + ), + "connectivity_assurance_enable": obj.get( + "connectivity_assurance_enable" + ), + "disable": obj.get("disable"), + "enable": obj.get("enable"), + "fleets_to_default": obj.get("fleets_to_default"), + "fleets_to_join": obj.get("fleets_to_join"), + "fleets_to_leave": obj.get("fleets_to_leave"), + "provision_product": obj.get("provision_product"), + "sn_to_default": obj.get("sn_to_default"), + "sn_to_set": obj.get("sn_to_set"), + "vars_to_default": obj.get("vars_to_default"), + "vars_to_set": obj.get("vars_to_set"), + } + ) + return _obj diff --git a/src/notehub_py/models/billing_account_role.py b/src/notehub_py/models/billing_account_role.py index e86e782..b4756cf 100644 --- a/src/notehub_py/models/billing_account_role.py +++ b/src/notehub_py/models/billing_account_role.py @@ -30,6 +30,7 @@ class BillingAccountRole(str, Enum): BILLING_ADMIN = "billing_admin" BILLING_MANAGER = "billing_manager" PROJECT_CREATOR = "project_creator" + BILLING_MEMBER = "billing_member" @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/src/notehub_py/models/create_legacy_webhook_event_request.py b/src/notehub_py/models/create_legacy_webhook_event_request.py new file mode 100644 index 0000000..6a1c37f --- /dev/null +++ b/src/notehub_py/models/create_legacy_webhook_event_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + + +class CreateLegacyWebhookEventRequest(BaseModel): + """ + CreateLegacyWebhookEventRequest + """ # noqa: E501 + + body: Optional[Dict[str, Any]] = Field( + default=None, description="Arbitrary JSON event body." + ) + file: Optional[StrictStr] = Field( + default=None, description="The notefile to which the event should be written." + ) + payload: Optional[StrictStr] = Field( + default=None, description="Optional base64-encoded binary payload." + ) + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["body", "file", "payload"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateLegacyWebhookEventRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set( + [ + "additional_properties", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateLegacyWebhookEventRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "body": obj.get("body"), + "file": obj.get("file"), + "payload": obj.get("payload"), + } + ) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/src/notehub_py/models/create_monitor.py b/src/notehub_py/models/create_monitor.py index a7739f6..56bb4f7 100644 --- a/src/notehub_py/models/create_monitor.py +++ b/src/notehub_py/models/create_monitor.py @@ -88,6 +88,18 @@ class CreateMonitor(BaseModel): description="The type of condition to apply to the value selected by the source_selector" ) uid: Optional[StrictStr] = None + usage_scope: Optional[StrictStr] = Field( + default=None, + description='For usage monitors: the scope of aggregation. Supported values are "device" and "fleet".', + ) + usage_type: Optional[StrictStr] = Field( + default=None, + description='For usage monitors: the type of data usage to monitor. Supported values are "cellular" and "satellite".', + ) + usage_window: Optional[StrictInt] = Field( + default=None, + description="For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days).", + ) __properties: ClassVar[List[str]] = [ "aggregate_function", "aggregate_window", @@ -107,6 +119,9 @@ class CreateMonitor(BaseModel): "source_type", "threshold", "uid", + "usage_scope", + "usage_type", + "usage_window", ] @field_validator("aggregate_function") @@ -252,6 +267,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_type": obj.get("source_type"), "threshold": obj.get("threshold"), "uid": obj.get("uid"), + "usage_scope": obj.get("usage_scope"), + "usage_type": obj.get("usage_type"), + "usage_window": obj.get("usage_window"), } ) return _obj diff --git a/src/notehub_py/models/create_project_secret_request.py b/src/notehub_py/models/create_project_secret_request.py new file mode 100644 index 0000000..54b3292 --- /dev/null +++ b/src/notehub_py/models/create_project_secret_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + + +class CreateProjectSecretRequest(BaseModel): + """ + CreateProjectSecretRequest + """ # noqa: E501 + + name: StrictStr = Field( + description="The secret name (alphanumeric and underscores only)." + ) + value: StrictStr = Field( + description="The secret value (encrypted at rest, never returned after creation)." + ) + __properties: ClassVar[List[str]] = ["name", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateProjectSecretRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateProjectSecretRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"name": obj.get("name"), "value": obj.get("value")}) + return _obj diff --git a/src/notehub_py/models/get_device_journey200_response.py b/src/notehub_py/models/get_device_journey200_response.py new file mode 100644 index 0000000..4074fd1 --- /dev/null +++ b/src/notehub_py/models/get_device_journey200_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from notehub_py.models.get_device_journey200_response_journey import ( + GetDeviceJourney200ResponseJourney, +) +from typing import Optional, Set +from typing_extensions import Self + + +class GetDeviceJourney200Response(BaseModel): + """ + GetDeviceJourney200Response + """ # noqa: E501 + + end_date: datetime = Field(description="Latest event time within the journey.") + journey: GetDeviceJourney200ResponseJourney + journey_id: StrictInt = Field(description="Identifier of the journey.") + start_date: datetime = Field(description="Earliest event time within the journey.") + __properties: ClassVar[List[str]] = [ + "end_date", + "journey", + "journey_id", + "start_date", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDeviceJourney200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of journey + if self.journey: + _dict["journey"] = self.journey.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetDeviceJourney200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "end_date": obj.get("end_date"), + "journey": ( + GetDeviceJourney200ResponseJourney.from_dict(obj["journey"]) + if obj.get("journey") is not None + else None + ), + "journey_id": obj.get("journey_id"), + "start_date": obj.get("start_date"), + } + ) + return _obj diff --git a/src/notehub_py/models/get_device_journey200_response_journey.py b/src/notehub_py/models/get_device_journey200_response_journey.py new file mode 100644 index 0000000..51fc4c3 --- /dev/null +++ b/src/notehub_py/models/get_device_journey200_response_journey.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List +from notehub_py.models.event import Event +from typing import Optional, Set +from typing_extensions import Self + + +class GetDeviceJourney200ResponseJourney(BaseModel): + """ + Paginated `_track.qo` events for the journey. + """ # noqa: E501 + + events: List[Event] + has_more: StrictBool + __properties: ClassVar[List[str]] = ["events", "has_more"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDeviceJourney200ResponseJourney from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in events (list) + _items = [] + if self.events: + for _item in self.events: + if _item: + _items.append(_item.to_dict()) + _dict["events"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetDeviceJourney200ResponseJourney from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "events": ( + [Event.from_dict(_item) for _item in obj["events"]] + if obj.get("events") is not None + else None + ), + "has_more": obj.get("has_more"), + } + ) + return _obj diff --git a/src/notehub_py/models/get_device_journeys200_response.py b/src/notehub_py/models/get_device_journeys200_response.py new file mode 100644 index 0000000..0e2a557 --- /dev/null +++ b/src/notehub_py/models/get_device_journeys200_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List +from notehub_py.models.get_device_journeys200_response_journeys_inner import ( + GetDeviceJourneys200ResponseJourneysInner, +) +from typing import Optional, Set +from typing_extensions import Self + + +class GetDeviceJourneys200Response(BaseModel): + """ + GetDeviceJourneys200Response + """ # noqa: E501 + + has_more: StrictBool + journeys: List[GetDeviceJourneys200ResponseJourneysInner] + __properties: ClassVar[List[str]] = ["has_more", "journeys"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDeviceJourneys200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in journeys (list) + _items = [] + if self.journeys: + for _item in self.journeys: + if _item: + _items.append(_item.to_dict()) + _dict["journeys"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetDeviceJourneys200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "has_more": obj.get("has_more"), + "journeys": ( + [ + GetDeviceJourneys200ResponseJourneysInner.from_dict(_item) + for _item in obj["journeys"] + ] + if obj.get("journeys") is not None + else None + ), + } + ) + return _obj diff --git a/src/notehub_py/models/get_device_journeys200_response_journeys_inner.py b/src/notehub_py/models/get_device_journeys200_response_journeys_inner.py new file mode 100644 index 0000000..a2c848a --- /dev/null +++ b/src/notehub_py/models/get_device_journeys200_response_journeys_inner.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + + +class GetDeviceJourneys200ResponseJourneysInner(BaseModel): + """ + GetDeviceJourneys200ResponseJourneysInner + """ # noqa: E501 + + end_date: datetime = Field(description="Latest event time within the journey.") + journey_id: StrictInt = Field( + description="Identifier of the journey, taken from the `journey` field on `_track.qo` events. This value is itself a Unix timestamp marking the start of the journey. " + ) + start_date: datetime = Field(description="Earliest event time within the journey.") + total_events: StrictInt = Field( + description="The number of _track.qo events in the journey." + ) + __properties: ClassVar[List[str]] = [ + "end_date", + "journey_id", + "start_date", + "total_events", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDeviceJourneys200ResponseJourneysInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetDeviceJourneys200ResponseJourneysInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "end_date": obj.get("end_date"), + "journey_id": obj.get("journey_id"), + "start_date": obj.get("start_date"), + "total_events": obj.get("total_events"), + } + ) + return _obj diff --git a/src/notehub_py/models/get_project_secrets_response.py b/src/notehub_py/models/get_project_secrets_response.py new file mode 100644 index 0000000..1299e77 --- /dev/null +++ b/src/notehub_py/models/get_project_secrets_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from notehub_py.models.project_secret import ProjectSecret +from typing import Optional, Set +from typing_extensions import Self + + +class GetProjectSecretsResponse(BaseModel): + """ + GetProjectSecretsResponse + """ # noqa: E501 + + secrets: List[ProjectSecret] + __properties: ClassVar[List[str]] = ["secrets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetProjectSecretsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in secrets (list) + _items = [] + if self.secrets: + for _item in self.secrets: + if _item: + _items.append(_item.to_dict()) + _dict["secrets"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetProjectSecretsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "secrets": ( + [ProjectSecret.from_dict(_item) for _item in obj["secrets"]] + if obj.get("secrets") is not None + else None + ) + } + ) + return _obj diff --git a/src/notehub_py/models/job.py b/src/notehub_py/models/job.py index 41020c4..2060c56 100644 --- a/src/notehub_py/models/job.py +++ b/src/notehub_py/models/job.py @@ -31,16 +31,27 @@ class Job(BaseModel): created: StrictInt = Field(description="Unix timestamp when job was created") created_by: StrictStr = Field(description="User who created the job") - definition: Optional[Dict[str, Any]] = Field( - default=None, description="Full job definition (only in detail view)" - ) job_uid: StrictStr = Field(description="Unique identifier for the job") + last_run_completed: Optional[StrictInt] = Field( + default=None, + description="Unix timestamp when the most recent run completed (0 if still in progress)", + ) + last_run_status: Optional[StrictStr] = Field( + default=None, + description='Status of the most recent job run. Terminal values are: "submitted", "completed successfully", "dry run completed successfully", "completed with errors", "cancelled". While a job is running, intermediate per-device progress updates may appear (e.g. "dev:000000000000000 completed", "dev:000000000000000 updated: ...").', + ) + last_run_submitted: Optional[StrictInt] = Field( + default=None, + description="Unix timestamp when the most recent run was submitted", + ) name: StrictStr = Field(description="Human-readable job name") __properties: ClassVar[List[str]] = [ "created", "created_by", - "definition", "job_uid", + "last_run_completed", + "last_run_status", + "last_run_submitted", "name", ] @@ -96,8 +107,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: { "created": obj.get("created"), "created_by": obj.get("created_by"), - "definition": obj.get("definition"), "job_uid": obj.get("job_uid"), + "last_run_completed": obj.get("last_run_completed"), + "last_run_status": obj.get("last_run_status"), + "last_run_submitted": obj.get("last_run_submitted"), "name": obj.get("name"), } ) diff --git a/src/notehub_py/models/job_definition.py b/src/notehub_py/models/job_definition.py new file mode 100644 index 0000000..ed22028 --- /dev/null +++ b/src/notehub_py/models/job_definition.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from notehub_py.models.batch_job_requests import BatchJobRequests +from notehub_py.models.job_definition_report_options import JobDefinitionReportOptions +from notehub_py.models.job_definition_select import JobDefinitionSelect +from typing import Optional, Set +from typing_extensions import Self + + +class JobDefinition(BaseModel): + """ + Batch job definition + """ # noqa: E501 + + comment: Optional[StrictStr] = Field( + default=None, description="Human-readable description of the job" + ) + default_requests: Optional[BatchJobRequests] = None + device_requests: Optional[Dict[str, BatchJobRequests]] = Field( + default=None, + description="Device-specific request overrides, keyed by device UID", + ) + report_options: Optional[JobDefinitionReportOptions] = None + select: Optional[JobDefinitionSelect] = None + __properties: ClassVar[List[str]] = [ + "comment", + "default_requests", + "device_requests", + "report_options", + "select", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of JobDefinition from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of default_requests + if self.default_requests: + _dict["default_requests"] = self.default_requests.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in device_requests (dict) + _field_dict = {} + if self.device_requests: + for _key in self.device_requests: + if self.device_requests[_key]: + _field_dict[_key] = self.device_requests[_key].to_dict() + _dict["device_requests"] = _field_dict + # override the default output from pydantic by calling `to_dict()` of report_options + if self.report_options: + _dict["report_options"] = self.report_options.to_dict() + # override the default output from pydantic by calling `to_dict()` of select + if self.select: + _dict["select"] = self.select.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JobDefinition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "comment": obj.get("comment"), + "default_requests": ( + BatchJobRequests.from_dict(obj["default_requests"]) + if obj.get("default_requests") is not None + else None + ), + "device_requests": ( + dict( + (_k, BatchJobRequests.from_dict(_v)) + for _k, _v in obj["device_requests"].items() + ) + if obj.get("device_requests") is not None + else None + ), + "report_options": ( + JobDefinitionReportOptions.from_dict(obj["report_options"]) + if obj.get("report_options") is not None + else None + ), + "select": ( + JobDefinitionSelect.from_dict(obj["select"]) + if obj.get("select") is not None + else None + ), + } + ) + return _obj diff --git a/src/notehub_py/models/job_definition_report_options.py b/src/notehub_py/models/job_definition_report_options.py new file mode 100644 index 0000000..622589d --- /dev/null +++ b/src/notehub_py/models/job_definition_report_options.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + + +class JobDefinitionReportOptions(BaseModel): + """ + Controls what data is included in the job report + """ # noqa: E501 + + app_fleets: Optional[StrictBool] = Field( + default=None, description="Include project fleets in the report" + ) + app_info: Optional[StrictBool] = Field( + default=None, description="Include project info in the report" + ) + app_vars: Optional[StrictBool] = Field( + default=None, description="Include project environment variables in the report" + ) + comment: Optional[StrictStr] = None + device_activity: Optional[StrictBool] = Field( + default=None, description="Include device activity data in the report" + ) + device_health: Optional[StrictBool] = Field( + default=None, description="Include device health data in the report" + ) + device_info: Optional[StrictBool] = Field( + default=None, description="Include device info in the report" + ) + device_vars: Optional[StrictBool] = Field( + default=None, description="Include device environment variables in the report" + ) + __properties: ClassVar[List[str]] = [ + "app_fleets", + "app_info", + "app_vars", + "comment", + "device_activity", + "device_health", + "device_info", + "device_vars", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of JobDefinitionReportOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JobDefinitionReportOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "app_fleets": obj.get("app_fleets"), + "app_info": obj.get("app_info"), + "app_vars": obj.get("app_vars"), + "comment": obj.get("comment"), + "device_activity": obj.get("device_activity"), + "device_health": obj.get("device_health"), + "device_info": obj.get("device_info"), + "device_vars": obj.get("device_vars"), + } + ) + return _obj diff --git a/src/notehub_py/models/job_definition_select.py b/src/notehub_py/models/job_definition_select.py new file mode 100644 index 0000000..b7b7435 --- /dev/null +++ b/src/notehub_py/models/job_definition_select.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + + +class JobDefinitionSelect(BaseModel): + """ + Device selection criteria + """ # noqa: E501 + + all_devices: Optional[StrictBool] = Field( + default=None, description="Select all devices in the project" + ) + comment: Optional[StrictStr] = None + devices: Optional[List[StrictStr]] = Field( + default=None, description="Specific device UIDs to include" + ) + devices_by_sn: Optional[List[StrictStr]] = Field( + default=None, + description="Serial number patterns to match (supports glob wildcards *, ?, [...])", + ) + devices_in_fleets: Optional[List[StrictStr]] = Field( + default=None, description="Fleet UIDs whose devices should be included" + ) + __properties: ClassVar[List[str]] = [ + "all_devices", + "comment", + "devices", + "devices_by_sn", + "devices_in_fleets", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of JobDefinitionSelect from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JobDefinitionSelect from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "all_devices": obj.get("all_devices"), + "comment": obj.get("comment"), + "devices": obj.get("devices"), + "devices_by_sn": obj.get("devices_by_sn"), + "devices_in_fleets": obj.get("devices_in_fleets"), + } + ) + return _obj diff --git a/src/notehub_py/models/job_detail.py b/src/notehub_py/models/job_detail.py new file mode 100644 index 0000000..7397bf7 --- /dev/null +++ b/src/notehub_py/models/job_detail.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from notehub_py.models.job_definition import JobDefinition +from typing import Optional, Set +from typing_extensions import Self + + +class JobDetail(BaseModel): + """ + Batch job with full definition + """ # noqa: E501 + + created: StrictInt = Field(description="Unix timestamp when job was created") + created_by: StrictStr = Field(description="User who created the job") + job_uid: StrictStr = Field(description="Unique identifier for the job") + last_run_completed: Optional[StrictInt] = Field( + default=None, + description="Unix timestamp when the most recent run completed (0 if still in progress)", + ) + last_run_status: Optional[StrictStr] = Field( + default=None, + description='Status of the most recent job run. Terminal values are: "submitted", "completed successfully", "dry run completed successfully", "completed with errors", "cancelled". While a job is running, intermediate per-device progress updates may appear (e.g. "dev:000000000000000 completed", "dev:000000000000000 updated: ...").', + ) + last_run_submitted: Optional[StrictInt] = Field( + default=None, + description="Unix timestamp when the most recent run was submitted", + ) + name: StrictStr = Field(description="Human-readable job name") + definition: Optional[JobDefinition] = None + __properties: ClassVar[List[str]] = [ + "created", + "created_by", + "job_uid", + "last_run_completed", + "last_run_status", + "last_run_submitted", + "name", + "definition", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of JobDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of definition + if self.definition: + _dict["definition"] = self.definition.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JobDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "created": obj.get("created"), + "created_by": obj.get("created_by"), + "job_uid": obj.get("job_uid"), + "last_run_completed": obj.get("last_run_completed"), + "last_run_status": obj.get("last_run_status"), + "last_run_submitted": obj.get("last_run_submitted"), + "name": obj.get("name"), + "definition": ( + JobDefinition.from_dict(obj["definition"]) + if obj.get("definition") is not None + else None + ), + } + ) + return _obj diff --git a/src/notehub_py/models/monitor.py b/src/notehub_py/models/monitor.py index 9b09779..15b715e 100644 --- a/src/notehub_py/models/monitor.py +++ b/src/notehub_py/models/monitor.py @@ -90,6 +90,18 @@ class Monitor(BaseModel): description="The type of condition to apply to the value selected by the source_selector", ) uid: Optional[StrictStr] = None + usage_scope: Optional[StrictStr] = Field( + default=None, + description='For usage monitors: the scope of aggregation. Supported values are "device" and "fleet".', + ) + usage_type: Optional[StrictStr] = Field( + default=None, + description='For usage monitors: the type of data usage to monitor. Supported values are "cellular" and "satellite".', + ) + usage_window: Optional[StrictInt] = Field( + default=None, + description="For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days).", + ) __properties: ClassVar[List[str]] = [ "aggregate_function", "aggregate_window", @@ -109,6 +121,9 @@ class Monitor(BaseModel): "source_type", "threshold", "uid", + "usage_scope", + "usage_type", + "usage_window", ] @field_validator("aggregate_function") @@ -257,6 +272,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_type": obj.get("source_type"), "threshold": obj.get("threshold"), "uid": obj.get("uid"), + "usage_scope": obj.get("usage_scope"), + "usage_type": obj.get("usage_type"), + "usage_window": obj.get("usage_window"), } ) return _obj diff --git a/src/notehub_py/models/project_secret.py b/src/notehub_py/models/project_secret.py new file mode 100644 index 0000000..a8d1e3e --- /dev/null +++ b/src/notehub_py/models/project_secret.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + + +class ProjectSecret(BaseModel): + """ + Metadata for a project secret. The value is never returned. + """ # noqa: E501 + + created: datetime = Field(description="When the secret was first created.") + created_by: StrictStr = Field(description="The actor who created the secret.") + modified: Optional[datetime] = Field( + default=None, description="When the secret was last updated." + ) + modified_by: Optional[StrictStr] = Field( + default=None, description="The actor who last updated the secret." + ) + name: StrictStr = Field( + description="The secret name (alphanumeric and underscores only)." + ) + __properties: ClassVar[List[str]] = [ + "created", + "created_by", + "modified", + "modified_by", + "name", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectSecret from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectSecret from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "created": obj.get("created"), + "created_by": obj.get("created_by"), + "modified": obj.get("modified"), + "modified_by": obj.get("modified_by"), + "name": obj.get("name"), + } + ) + return _obj diff --git a/src/notehub_py/models/repository_list_response.py b/src/notehub_py/models/repository_list_response.py new file mode 100644 index 0000000..f13cfa0 --- /dev/null +++ b/src/notehub_py/models/repository_list_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from notehub_py.models.repository import Repository +from typing import Optional, Set +from typing_extensions import Self + + +class RepositoryListResponse(BaseModel): + """ + RepositoryListResponse + """ # noqa: E501 + + repositories: List[Repository] + __properties: ClassVar[List[str]] = ["repositories"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RepositoryListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in repositories (list) + _items = [] + if self.repositories: + for _item in self.repositories: + if _item: + _items.append(_item.to_dict()) + _dict["repositories"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RepositoryListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "repositories": ( + [Repository.from_dict(_item) for _item in obj["repositories"]] + if obj.get("repositories") is not None + else None + ) + } + ) + return _obj diff --git a/src/notehub_py/models/repository_token_request.py b/src/notehub_py/models/repository_token_request.py new file mode 100644 index 0000000..01cbf6d --- /dev/null +++ b/src/notehub_py/models/repository_token_request.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + + +class RepositoryTokenRequest(BaseModel): + """ + RepositoryTokenRequest + """ # noqa: E501 + + intent: Optional[StrictStr] = Field( + default="read", + description="Access intent for the vended credentials. Only `read` is supported today; `write` and `admin` are reserved for future use. ", + ) + ttl_seconds: Optional[Annotated[int, Field(le=3600, strict=True, ge=60)]] = Field( + default=900, + description="Requested credential lifetime in seconds. Clamped server-side to [60, 3600]. Defaults to 900 (15 minutes) if omitted. ", + ) + __properties: ClassVar[List[str]] = ["intent", "ttl_seconds"] + + @field_validator("intent") + def intent_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["read"]): + raise ValueError("must be one of enum values ('read')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RepositoryTokenRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RepositoryTokenRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "intent": ( + obj.get("intent") if obj.get("intent") is not None else "read" + ), + "ttl_seconds": ( + obj.get("ttl_seconds") + if obj.get("ttl_seconds") is not None + else 900 + ), + } + ) + return _obj diff --git a/src/notehub_py/models/repository_token_response.py b/src/notehub_py/models/repository_token_response.py new file mode 100644 index 0000000..76ca36a --- /dev/null +++ b/src/notehub_py/models/repository_token_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + + +class RepositoryTokenResponse(BaseModel): + """ + RepositoryTokenResponse + """ # noqa: E501 + + database: StrictStr = Field( + description="Storage service database name scoped to this repository" + ) + expires_at: datetime = Field( + description="Absolute expiration time of the ephemeral user. The storage service will reject connections and queries after this instant. " + ) + host: StrictStr = Field( + description="Storage service hostname the caller should connect to" + ) + password: StrictStr = Field( + description="Ephemeral password. Returned once; not stored by Notehub. Hold this in memory only and discard after `expires_at`. " + ) + port: StrictInt = Field(description="Storage service port") + username: StrictStr = Field( + description="Ephemeral storage service username (prefixed with `u_`)" + ) + __properties: ClassVar[List[str]] = [ + "database", + "expires_at", + "host", + "password", + "port", + "username", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RepositoryTokenResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RepositoryTokenResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "database": obj.get("database"), + "expires_at": obj.get("expires_at"), + "host": obj.get("host"), + "password": obj.get("password"), + "port": obj.get("port"), + "username": obj.get("username"), + } + ) + return _obj diff --git a/src/notehub_py/models/update_project_secret_request.py b/src/notehub_py/models/update_project_secret_request.py new file mode 100644 index 0000000..7588304 --- /dev/null +++ b/src/notehub_py/models/update_project_secret_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + + +class UpdateProjectSecretRequest(BaseModel): + """ + UpdateProjectSecretRequest + """ # noqa: E501 + + value: StrictStr = Field( + description="The new secret value (encrypted at rest, never returned)." + ) + __properties: ClassVar[List[str]] = ["value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateProjectSecretRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateProjectSecretRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"value": obj.get("value")}) + return _obj diff --git a/src/pyproject.toml b/src/pyproject.toml index bf91336..d476b77 100644 --- a/src/pyproject.toml +++ b/src/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "notehub_py" -version = "6.2.0" +version = "6.3.0" description = "Notehub API" authors = ["Blues Engineering "] license = "MIT" diff --git a/src/setup.py b/src/setup.py index 7693316..1da97ea 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.2.0" +VERSION = "6.3.0" PYTHON_REQUIRES = ">=3.10" REQUIRES = [ "urllib3 >= 2.5.0", diff --git a/src/test/test_batch_job_requests.py b/src/test/test_batch_job_requests.py new file mode 100644 index 0000000..70ef059 --- /dev/null +++ b/src/test/test_batch_job_requests.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.batch_job_requests import BatchJobRequests + + +class TestBatchJobRequests(unittest.TestCase): + """BatchJobRequests unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BatchJobRequests: + """Test BatchJobRequests + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `BatchJobRequests` + """ + model = BatchJobRequests() + if include_optional: + return BatchJobRequests( + comment = '', + connectivity_assurance_disable = True, + connectivity_assurance_enable = True, + disable = True, + enable = True, + fleets_to_default = [ + '' + ], + fleets_to_join = [ + '' + ], + fleets_to_leave = [ + '' + ], + provision_product = '', + sn_to_default = '', + sn_to_set = '', + vars_to_default = { + 'key' : '' + }, + vars_to_set = { + 'key' : '' + } + ) + else: + return BatchJobRequests( + ) + """ + + def testBatchJobRequests(self): + """Test BatchJobRequests""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_create_legacy_webhook_event_request.py b/src/test/test_create_legacy_webhook_event_request.py new file mode 100644 index 0000000..474218a --- /dev/null +++ b/src/test/test_create_legacy_webhook_event_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.create_legacy_webhook_event_request import ( + CreateLegacyWebhookEventRequest, +) + + +class TestCreateLegacyWebhookEventRequest(unittest.TestCase): + """CreateLegacyWebhookEventRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateLegacyWebhookEventRequest: + """Test CreateLegacyWebhookEventRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `CreateLegacyWebhookEventRequest` + """ + model = CreateLegacyWebhookEventRequest() + if include_optional: + return CreateLegacyWebhookEventRequest( + body = { }, + file = '', + payload = '' + ) + else: + return CreateLegacyWebhookEventRequest( + ) + """ + + def testCreateLegacyWebhookEventRequest(self): + """Test CreateLegacyWebhookEventRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_create_project_secret_request.py b/src/test/test_create_project_secret_request.py new file mode 100644 index 0000000..09d48ce --- /dev/null +++ b/src/test/test_create_project_secret_request.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.create_project_secret_request import CreateProjectSecretRequest + + +class TestCreateProjectSecretRequest(unittest.TestCase): + """CreateProjectSecretRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateProjectSecretRequest: + """Test CreateProjectSecretRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `CreateProjectSecretRequest` + """ + model = CreateProjectSecretRequest() + if include_optional: + return CreateProjectSecretRequest( + name = '', + value = '' + ) + else: + return CreateProjectSecretRequest( + name = '', + value = '', + ) + """ + + def testCreateProjectSecretRequest(self): + """Test CreateProjectSecretRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_get_device_journey200_response.py b/src/test/test_get_device_journey200_response.py new file mode 100644 index 0000000..2120d31 --- /dev/null +++ b/src/test/test_get_device_journey200_response.py @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.get_device_journey200_response import GetDeviceJourney200Response + + +class TestGetDeviceJourney200Response(unittest.TestCase): + """GetDeviceJourney200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetDeviceJourney200Response: + """Test GetDeviceJourney200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `GetDeviceJourney200Response` + """ + model = GetDeviceJourney200Response() + if include_optional: + return GetDeviceJourney200Response( + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + journey = notehub_py.models.get_device_journey_200_response_journey.GetDeviceJourney_200_response_journey( + events = [ + notehub_py.models.event.Event( + app = '', + bars = 1.337, + best_country = '', + best_id = '', + best_lat = 1.337, + best_location = '', + best_location_type = '', + best_location_when = 1.337, + best_lon = 1.337, + best_timezone = '', + body = notehub_py.models.body.body(), + bssid = '', + device = '', + environment = notehub_py.models.environment.environment(), + event = '', + file = '', + moved = 1.337, + note = '', + ordering_code = '', + orientation = '', + payload = '', + product = '', + rat = '', + received = 1.337, + req = '', + rsrp = 1.337, + rsrq = 1.337, + rssi = 1.337, + session = '', + sinr = 1.337, + sku = '', + sn = '', + ssid = '', + temp = 1.337, + tls = True, + tower_country = '', + tower_id = '', + tower_lat = 1.337, + tower_location = '', + tower_lon = 1.337, + tower_timezone = '', + tower_when = 1.337, + transport = '', + tri_country = '', + tri_lat = 1.337, + tri_location = '', + tri_lon = 1.337, + tri_points = 1.337, + tri_timezone = '', + tri_when = 1.337, + updates = 1.337, + voltage = 1.337, + when = 1.337, + where_country = '', + where_lat = 1.337, + where_location = '', + where_lon = 1.337, + where_olc = '', + where_timezone = '', + where_when = 1.337, ) + ], + has_more = True, ), + journey_id = 56, + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return GetDeviceJourney200Response( + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + journey = notehub_py.models.get_device_journey_200_response_journey.GetDeviceJourney_200_response_journey( + events = [ + notehub_py.models.event.Event( + app = '', + bars = 1.337, + best_country = '', + best_id = '', + best_lat = 1.337, + best_location = '', + best_location_type = '', + best_location_when = 1.337, + best_lon = 1.337, + best_timezone = '', + body = notehub_py.models.body.body(), + bssid = '', + device = '', + environment = notehub_py.models.environment.environment(), + event = '', + file = '', + moved = 1.337, + note = '', + ordering_code = '', + orientation = '', + payload = '', + product = '', + rat = '', + received = 1.337, + req = '', + rsrp = 1.337, + rsrq = 1.337, + rssi = 1.337, + session = '', + sinr = 1.337, + sku = '', + sn = '', + ssid = '', + temp = 1.337, + tls = True, + tower_country = '', + tower_id = '', + tower_lat = 1.337, + tower_location = '', + tower_lon = 1.337, + tower_timezone = '', + tower_when = 1.337, + transport = '', + tri_country = '', + tri_lat = 1.337, + tri_location = '', + tri_lon = 1.337, + tri_points = 1.337, + tri_timezone = '', + tri_when = 1.337, + updates = 1.337, + voltage = 1.337, + when = 1.337, + where_country = '', + where_lat = 1.337, + where_location = '', + where_lon = 1.337, + where_olc = '', + where_timezone = '', + where_when = 1.337, ) + ], + has_more = True, ), + journey_id = 56, + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testGetDeviceJourney200Response(self): + """Test GetDeviceJourney200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_get_device_journey200_response_journey.py b/src/test/test_get_device_journey200_response_journey.py new file mode 100644 index 0000000..28647c1 --- /dev/null +++ b/src/test/test_get_device_journey200_response_journey.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.get_device_journey200_response_journey import ( + GetDeviceJourney200ResponseJourney, +) + + +class TestGetDeviceJourney200ResponseJourney(unittest.TestCase): + """GetDeviceJourney200ResponseJourney unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetDeviceJourney200ResponseJourney: + """Test GetDeviceJourney200ResponseJourney + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `GetDeviceJourney200ResponseJourney` + """ + model = GetDeviceJourney200ResponseJourney() + if include_optional: + return GetDeviceJourney200ResponseJourney( + events = [ + notehub_py.models.event.Event( + app = '', + bars = 1.337, + best_country = '', + best_id = '', + best_lat = 1.337, + best_location = '', + best_location_type = '', + best_location_when = 1.337, + best_lon = 1.337, + best_timezone = '', + body = notehub_py.models.body.body(), + bssid = '', + device = '', + environment = notehub_py.models.environment.environment(), + event = '', + file = '', + moved = 1.337, + note = '', + ordering_code = '', + orientation = '', + payload = '', + product = '', + rat = '', + received = 1.337, + req = '', + rsrp = 1.337, + rsrq = 1.337, + rssi = 1.337, + session = '', + sinr = 1.337, + sku = '', + sn = '', + ssid = '', + temp = 1.337, + tls = True, + tower_country = '', + tower_id = '', + tower_lat = 1.337, + tower_location = '', + tower_lon = 1.337, + tower_timezone = '', + tower_when = 1.337, + transport = '', + tri_country = '', + tri_lat = 1.337, + tri_location = '', + tri_lon = 1.337, + tri_points = 1.337, + tri_timezone = '', + tri_when = 1.337, + updates = 1.337, + voltage = 1.337, + when = 1.337, + where_country = '', + where_lat = 1.337, + where_location = '', + where_lon = 1.337, + where_olc = '', + where_timezone = '', + where_when = 1.337, ) + ], + has_more = True + ) + else: + return GetDeviceJourney200ResponseJourney( + events = [ + notehub_py.models.event.Event( + app = '', + bars = 1.337, + best_country = '', + best_id = '', + best_lat = 1.337, + best_location = '', + best_location_type = '', + best_location_when = 1.337, + best_lon = 1.337, + best_timezone = '', + body = notehub_py.models.body.body(), + bssid = '', + device = '', + environment = notehub_py.models.environment.environment(), + event = '', + file = '', + moved = 1.337, + note = '', + ordering_code = '', + orientation = '', + payload = '', + product = '', + rat = '', + received = 1.337, + req = '', + rsrp = 1.337, + rsrq = 1.337, + rssi = 1.337, + session = '', + sinr = 1.337, + sku = '', + sn = '', + ssid = '', + temp = 1.337, + tls = True, + tower_country = '', + tower_id = '', + tower_lat = 1.337, + tower_location = '', + tower_lon = 1.337, + tower_timezone = '', + tower_when = 1.337, + transport = '', + tri_country = '', + tri_lat = 1.337, + tri_location = '', + tri_lon = 1.337, + tri_points = 1.337, + tri_timezone = '', + tri_when = 1.337, + updates = 1.337, + voltage = 1.337, + when = 1.337, + where_country = '', + where_lat = 1.337, + where_location = '', + where_lon = 1.337, + where_olc = '', + where_timezone = '', + where_when = 1.337, ) + ], + has_more = True, + ) + """ + + def testGetDeviceJourney200ResponseJourney(self): + """Test GetDeviceJourney200ResponseJourney""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_get_device_journeys200_response.py b/src/test/test_get_device_journeys200_response.py new file mode 100644 index 0000000..8e5e29b --- /dev/null +++ b/src/test/test_get_device_journeys200_response.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.get_device_journeys200_response import ( + GetDeviceJourneys200Response, +) + + +class TestGetDeviceJourneys200Response(unittest.TestCase): + """GetDeviceJourneys200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetDeviceJourneys200Response: + """Test GetDeviceJourneys200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `GetDeviceJourneys200Response` + """ + model = GetDeviceJourneys200Response() + if include_optional: + return GetDeviceJourneys200Response( + has_more = True, + journeys = [ + notehub_py.models.get_device_journeys_200_response_journeys_inner.GetDeviceJourneys_200_response_journeys_inner( + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + journey_id = 56, + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + total_events = 56, ) + ] + ) + else: + return GetDeviceJourneys200Response( + has_more = True, + journeys = [ + notehub_py.models.get_device_journeys_200_response_journeys_inner.GetDeviceJourneys_200_response_journeys_inner( + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + journey_id = 56, + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + total_events = 56, ) + ], + ) + """ + + def testGetDeviceJourneys200Response(self): + """Test GetDeviceJourneys200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_get_device_journeys200_response_journeys_inner.py b/src/test/test_get_device_journeys200_response_journeys_inner.py new file mode 100644 index 0000000..d85d82a --- /dev/null +++ b/src/test/test_get_device_journeys200_response_journeys_inner.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.get_device_journeys200_response_journeys_inner import ( + GetDeviceJourneys200ResponseJourneysInner, +) + + +class TestGetDeviceJourneys200ResponseJourneysInner(unittest.TestCase): + """GetDeviceJourneys200ResponseJourneysInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance( + self, include_optional + ) -> GetDeviceJourneys200ResponseJourneysInner: + """Test GetDeviceJourneys200ResponseJourneysInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `GetDeviceJourneys200ResponseJourneysInner` + """ + model = GetDeviceJourneys200ResponseJourneysInner() + if include_optional: + return GetDeviceJourneys200ResponseJourneysInner( + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + journey_id = 56, + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + total_events = 56 + ) + else: + return GetDeviceJourneys200ResponseJourneysInner( + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + journey_id = 56, + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + total_events = 56, + ) + """ + + def testGetDeviceJourneys200ResponseJourneysInner(self): + """Test GetDeviceJourneys200ResponseJourneysInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_get_project_secrets_response.py b/src/test/test_get_project_secrets_response.py new file mode 100644 index 0000000..d330da9 --- /dev/null +++ b/src/test/test_get_project_secrets_response.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.get_project_secrets_response import GetProjectSecretsResponse + + +class TestGetProjectSecretsResponse(unittest.TestCase): + """GetProjectSecretsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetProjectSecretsResponse: + """Test GetProjectSecretsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `GetProjectSecretsResponse` + """ + model = GetProjectSecretsResponse() + if include_optional: + return GetProjectSecretsResponse( + secrets = [ + notehub_py.models.project_secret.ProjectSecret( + created = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_by = '', + modified = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + modified_by = '', + name = '', ) + ] + ) + else: + return GetProjectSecretsResponse( + secrets = [ + notehub_py.models.project_secret.ProjectSecret( + created = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_by = '', + modified = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + modified_by = '', + name = '', ) + ], + ) + """ + + def testGetProjectSecretsResponse(self): + """Test GetProjectSecretsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_job_definition.py b/src/test/test_job_definition.py new file mode 100644 index 0000000..038faf4 --- /dev/null +++ b/src/test/test_job_definition.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.job_definition import JobDefinition + + +class TestJobDefinition(unittest.TestCase): + """JobDefinition unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> JobDefinition: + """Test JobDefinition + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `JobDefinition` + """ + model = JobDefinition() + if include_optional: + return JobDefinition( + comment = '', + default_requests = notehub_py.models.batch_job_requests.BatchJobRequests( + comment = '', + connectivity_assurance_disable = True, + connectivity_assurance_enable = True, + disable = True, + enable = True, + fleets_to_default = [ + '' + ], + fleets_to_join = [ + '' + ], + fleets_to_leave = [ + '' + ], + provision_product = '', + sn_to_default = '', + sn_to_set = '', + vars_to_default = { + 'key' : '' + }, + vars_to_set = { + 'key' : '' + }, ), + device_requests = { + 'key' : notehub_py.models.batch_job_requests.BatchJobRequests( + comment = '', + connectivity_assurance_disable = True, + connectivity_assurance_enable = True, + disable = True, + enable = True, + fleets_to_default = [ + '' + ], + fleets_to_join = [ + '' + ], + fleets_to_leave = [ + '' + ], + provision_product = '', + sn_to_default = '', + sn_to_set = '', + vars_to_default = { + 'key' : '' + }, + vars_to_set = { + 'key' : '' + }, ) + }, + report_options = notehub_py.models.job_definition_report_options.JobDefinition_report_options( + app_fleets = True, + app_info = True, + app_vars = True, + comment = '', + device_activity = True, + device_health = True, + device_info = True, + device_vars = True, ), + select = notehub_py.models.job_definition_select.JobDefinition_select( + all_devices = True, + comment = '', + devices = [ + '' + ], + devices_by_sn = [ + '' + ], + devices_in_fleets = [ + '' + ], ) + ) + else: + return JobDefinition( + ) + """ + + def testJobDefinition(self): + """Test JobDefinition""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_job_definition_report_options.py b/src/test/test_job_definition_report_options.py new file mode 100644 index 0000000..be3de14 --- /dev/null +++ b/src/test/test_job_definition_report_options.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.job_definition_report_options import JobDefinitionReportOptions + + +class TestJobDefinitionReportOptions(unittest.TestCase): + """JobDefinitionReportOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> JobDefinitionReportOptions: + """Test JobDefinitionReportOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `JobDefinitionReportOptions` + """ + model = JobDefinitionReportOptions() + if include_optional: + return JobDefinitionReportOptions( + app_fleets = True, + app_info = True, + app_vars = True, + comment = '', + device_activity = True, + device_health = True, + device_info = True, + device_vars = True + ) + else: + return JobDefinitionReportOptions( + ) + """ + + def testJobDefinitionReportOptions(self): + """Test JobDefinitionReportOptions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_job_definition_select.py b/src/test/test_job_definition_select.py new file mode 100644 index 0000000..a579ecf --- /dev/null +++ b/src/test/test_job_definition_select.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.job_definition_select import JobDefinitionSelect + + +class TestJobDefinitionSelect(unittest.TestCase): + """JobDefinitionSelect unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> JobDefinitionSelect: + """Test JobDefinitionSelect + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `JobDefinitionSelect` + """ + model = JobDefinitionSelect() + if include_optional: + return JobDefinitionSelect( + all_devices = True, + comment = '', + devices = [ + '' + ], + devices_by_sn = [ + '' + ], + devices_in_fleets = [ + '' + ] + ) + else: + return JobDefinitionSelect( + ) + """ + + def testJobDefinitionSelect(self): + """Test JobDefinitionSelect""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_job_detail.py b/src/test/test_job_detail.py new file mode 100644 index 0000000..0e8df56 --- /dev/null +++ b/src/test/test_job_detail.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.job_detail import JobDetail + + +class TestJobDetail(unittest.TestCase): + """JobDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> JobDetail: + """Test JobDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `JobDetail` + """ + model = JobDetail() + if include_optional: + return JobDetail( + created = 56, + created_by = '', + job_uid = '', + last_run_completed = 1775252922, + last_run_status = 'dry run completed successfully', + last_run_submitted = 1775252900, + name = '', + definition = {"comment":"Set environment variables on all devices in a fleet","default_requests":{"vars_to_set":{"firmware_channel":"production","log_level":"1"}},"select":{"devices_in_fleets":["fleet:00000000-0000-0000-0000-000000000000"]}} + ) + else: + return JobDetail( + created = 56, + created_by = '', + job_uid = '', + name = '', + ) + """ + + def testJobDetail(self): + """Test JobDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_project_secret.py b/src/test/test_project_secret.py new file mode 100644 index 0000000..f26163b --- /dev/null +++ b/src/test/test_project_secret.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.project_secret import ProjectSecret + + +class TestProjectSecret(unittest.TestCase): + """ProjectSecret unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectSecret: + """Test ProjectSecret + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `ProjectSecret` + """ + model = ProjectSecret() + if include_optional: + return ProjectSecret( + created = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_by = '', + modified = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + modified_by = '', + name = '' + ) + else: + return ProjectSecret( + created = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_by = '', + name = '', + ) + """ + + def testProjectSecret(self): + """Test ProjectSecret""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_repository_list_response.py b/src/test/test_repository_list_response.py new file mode 100644 index 0000000..3a9acc3 --- /dev/null +++ b/src/test/test_repository_list_response.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.repository_list_response import RepositoryListResponse + + +class TestRepositoryListResponse(unittest.TestCase): + """RepositoryListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RepositoryListResponse: + """Test RepositoryListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `RepositoryListResponse` + """ + model = RepositoryListResponse() + if include_optional: + return RepositoryListResponse( + repositories = [ + notehub_py.models.repository.Repository( + fleet_uids = [ + '' + ], + name = '', + project_uids = [ + '' + ], + uid = '', ) + ] + ) + else: + return RepositoryListResponse( + repositories = [ + notehub_py.models.repository.Repository( + fleet_uids = [ + '' + ], + name = '', + project_uids = [ + '' + ], + uid = '', ) + ], + ) + """ + + def testRepositoryListResponse(self): + """Test RepositoryListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_repository_token_request.py b/src/test/test_repository_token_request.py new file mode 100644 index 0000000..81a72e4 --- /dev/null +++ b/src/test/test_repository_token_request.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.repository_token_request import RepositoryTokenRequest + + +class TestRepositoryTokenRequest(unittest.TestCase): + """RepositoryTokenRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RepositoryTokenRequest: + """Test RepositoryTokenRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `RepositoryTokenRequest` + """ + model = RepositoryTokenRequest() + if include_optional: + return RepositoryTokenRequest( + intent = 'read', + ttl_seconds = 60 + ) + else: + return RepositoryTokenRequest( + ) + """ + + def testRepositoryTokenRequest(self): + """Test RepositoryTokenRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_repository_token_response.py b/src/test/test_repository_token_response.py new file mode 100644 index 0000000..5dad89a --- /dev/null +++ b/src/test/test_repository_token_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.repository_token_response import RepositoryTokenResponse + + +class TestRepositoryTokenResponse(unittest.TestCase): + """RepositoryTokenResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RepositoryTokenResponse: + """Test RepositoryTokenResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `RepositoryTokenResponse` + """ + model = RepositoryTokenResponse() + if include_optional: + return RepositoryTokenResponse( + database = '', + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + host = '', + password = '', + port = 56, + username = '' + ) + else: + return RepositoryTokenResponse( + database = '', + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + host = '', + password = '', + port = 56, + username = '', + ) + """ + + def testRepositoryTokenResponse(self): + """Test RepositoryTokenResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_update_project_secret_request.py b/src/test/test_update_project_secret_request.py new file mode 100644 index 0000000..80bf2d6 --- /dev/null +++ b/src/test/test_update_project_secret_request.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.update_project_secret_request import UpdateProjectSecretRequest + + +class TestUpdateProjectSecretRequest(unittest.TestCase): + """UpdateProjectSecretRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateProjectSecretRequest: + """Test UpdateProjectSecretRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `UpdateProjectSecretRequest` + """ + model = UpdateProjectSecretRequest() + if include_optional: + return UpdateProjectSecretRequest( + value = '' + ) + else: + return UpdateProjectSecretRequest( + value = '', + ) + """ + + def testUpdateProjectSecretRequest(self): + """Test UpdateProjectSecretRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main()