openapi: 3.0.3 info: contact: email: engineering@blues.io name: Blues Engineering 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' paths: /auth/login: post: operationId: Login description: Gets an API key from username and password requestBody: required: true content: application/json: example: password: test-password username: name@example.com schema: type: object properties: password: type: string username: type: string responses: '200': description: Successful operation content: application/json: schema: type: object properties: session_token: type: string '400': description: Bad Request '500': description: Internal Server Error tags: - authorization x-custom-attributes: permission: create /oauth2/token: post: operationId: OAuth2ClientCredentials summary: Issue an OAuth 2.0 access token (Client Credentials) description: | Exchanges client credentials for an access token. Parameters must be sent as application/x-www-form-urlencoded. requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object properties: client_id: type: string format: uuid example: d37ae69a-c739-44e9-9722-81a4cb7aeb67 client_secret: type: string format: password example: 2a40832d028a3e24a717f023fdcaa8ab452dd12223d472aff38223ffdfeee4bf grant_type: type: string example: client_credentials enum: - client_credentials scope: description: Space-delimited scopes. type: string example: openid required: - grant_type - client_id - client_secret responses: '200': description: Successful token response content: application/json: example: access_token: 7VEVIiNVr_Q_eqjWpddz18qmYVWVgKHtlYsuoYzS7v0.3BUMglZCKBF1Swz0WLQQ9-DgSBtkroKbpXmF1sJ-NE0 expires_in: 1800 scope: openid token_type: bearer schema: $ref: '#/components/schemas/OAuth2TokenResponse' '400': description: Invalid request (missing or malformed parameters) content: application/json: example: error: invalid_request error_description: 'Missing parameter: client_id' schema: $ref: '#/components/schemas/OAuth2Error' '401': description: Invalid client authentication content: application/json: example: error: invalid_client error_description: Client authentication failed schema: $ref: '#/components/schemas/OAuth2Error' '403': description: Unauthorized scope content: application/json: example: error: invalid_scope error_description: Requested scope is invalid schema: $ref: '#/components/schemas/OAuth2Error' tags: - authorization /v1/billing-accounts: get: operationId: GetBillingAccounts description: Get Billing Accounts accessible by the api_key responses: '200': description: Successful operation content: application/json: schema: type: object properties: billing_accounts: type: array items: $ref: '#/components/schemas/BillingAccount' default: $ref: '#/components/responses/ErrorResponse' deprecated: true security: - personalAccessToken: [] tags: - billing_account x-custom-attributes: permission: read '/v1/billing-accounts/{billingAccountUID}': get: operationId: GetBillingAccount description: Get Billing Account Information parameters: - $ref: '#/components/parameters/billingAccountUIDParam' responses: '200': description: Successful operation content: application/json: schema: type: object properties: contact_uid: type: string email: type: string name: type: string owner: type: string plan: type: object properties: current_balance: type: integer format: int64 end_date: type: string format: date-time event_capacity: type: integer format: int64 start_date: type: string format: date-time type: type: string enum: - Enterprise - Essentials suspended: type: boolean uid: type: string default: $ref: '#/components/responses/ErrorResponse' deprecated: true security: - personalAccessToken: [] tags: - billing_account x-custom-attributes: permission: read '/v1/billing-accounts/{billingAccountUID}/balance-history': get: operationId: GetBillingAccountBalanceHistory description: Get Billing Account Balance history parameters: - $ref: '#/components/parameters/billingAccountUIDParam' - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' responses: '200': description: Successful operation content: application/json: schema: type: object properties: data: type: array items: properties: period: type: string format: date-time remaining_event_capacity: type: integer format: int64 total_event_capacity_used: type: integer format: int64 required: - remaining_event_capacity - total_event_capacity_used - period type: object default: $ref: '#/components/responses/ErrorResponse' deprecated: true security: - personalAccessToken: [] tags: - billing_account x-custom-attributes: permission: read /v1/organizations: get: operationId: GetOrganizations description: Get Organizations accessible by the api_key responses: '200': description: Successful operation content: application/json: schema: type: object properties: organizations: type: array items: $ref: '#/components/schemas/Organization' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - organization x-custom-attributes: permission: read '/v1/organizations/{organizationUID}': get: operationId: GetOrganization description: Get Organization Information parameters: - $ref: '#/components/parameters/organizationUIDParam' responses: '200': description: Successful operation content: application/json: schema: type: object properties: contact_uid: type: string email: type: string name: type: string owner: type: string plan: type: object properties: current_balance: type: integer format: int64 end_date: type: string format: date-time event_capacity: type: integer format: int64 start_date: type: string format: date-time type: type: string enum: - Enterprise - Essentials suspended: type: boolean uid: type: string default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - organization x-custom-attributes: permission: read '/v1/organizations/{organizationUID}/balance-history': get: operationId: GetOrganizationBalanceHistory description: Get Organization Balance history parameters: - $ref: '#/components/parameters/organizationUIDParam' - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' responses: '200': description: Successful operation content: application/json: schema: type: object properties: data: type: array items: properties: period: type: string format: date-time remaining_event_capacity: type: integer format: int64 total_event_capacity_used: type: integer format: int64 required: - remaining_event_capacity - total_event_capacity_used - period type: object default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - organization x-custom-attributes: permission: read '/v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin': get: operationId: GetDeviceEnvironmentVariablesByPin description: Get environment variables of a device with device pin authorization responses: '200': $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' - $ref: '#/components/parameters/XAuthTokenHeader' put: operationId: SetDeviceEnvironmentVariablesByPin description: Set environment variables of a device with device pin authorization requestBody: description: Environment variables to be added to the device required: true content: application/json: schema: $ref: '#/components/schemas/EnvironmentVariables' responses: '200': $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. Typically contains the notefile name (file), a JSON body, and an optional base64-encoded payload, but any additional Note fields (e.g. when, sn, where_lat, where_lon) are accepted and honored.' required: true content: application/json: example: body: key: value file: data.qo payload: SGVsbG8sIFdvcmxkIQ== 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}/devices/{deviceUID}/webhook-session': put: operationId: UpdateLegacyWebhookSession description: Legacy endpoint for opening or updating a webhook session for the given device (provisioning the device if necessary). Used by external services that need to maintain a callable session against a device behind a webhook. parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/deviceUIDParam' requestBody: description: Optional session metadata. required: false content: application/json: schema: type: object additionalProperties: true responses: '200': description: Webhook session updated successfully default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - webhook x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:notes' '/v1/products/{productUID}/ext-devices/{deviceUID}/event': post: operationId: CreateEventExtDevice description: Creates an event using specified webhook parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/deviceUIDParam' requestBody: description: Event Object required: true content: application/json: schema: $ref: '#/components/schemas/Event' responses: '200': description: Event Created Successfully default: $ref: '#/components/responses/ErrorResponse' security: - 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 description: Closes the session for the specified device if open parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/deviceUIDParam' requestBody: description: Session Object required: true content: application/json: schema: $ref: '#/components/schemas/DeviceSession' responses: '200': description: Session closed default: $ref: '#/components/responses/ErrorResponse' security: - 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 description: Create a Session for the specified device. | If a session is currently open it will be closed and a new one opened. parameters: - $ref: '#/components/parameters/productUIDParam' - $ref: '#/components/parameters/deviceUIDParam' requestBody: description: Session Object required: true content: application/json: schema: $ref: '#/components/schemas/DeviceSession' responses: '200': description: Session Created Successfully default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - external devices x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:notes' '/v1/products/{productUID}/project': get: operationId: GetProjectByProduct description: Get a Project by ProductUID parameters: - name: productUID in: path required: true schema: type: string example: com.blues.airnote responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Project' default: $ref: '#/components/responses/ErrorResponse' security: - 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 description: Get Projects accessible by the api_key responses: '200': description: Successful operation content: application/json: schema: type: object properties: projects: type: array items: $ref: '#/components/schemas/Project' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read post: operationId: CreateProject description: Create a Project requestBody: description: Project to be created required: true content: application/json: schema: 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. type: string label: description: The label for the project. type: string required: - label - billing_account_uid responses: '201': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Project' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: create '/v1/projects/{projectOrProductUID}': delete: operationId: DeleteProject description: Delete a Project by ProjectUID parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': description: Successful operation default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: delete resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: GetProject description: Get a Project by ProjectUID parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Project' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/alerts': get: operationId: GetAlerts description: Get list of defined Alerts parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/pageSizeParam' - $ref: '#/components/parameters/pageNumParam' - $ref: '#/components/parameters/monitorUIDQueryParam' responses: '200': $ref: '#/components/responses/AlertsResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - alert x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/aws-role-config': get: operationId: GetAWSRoleConfig summary: Get AWS role configuration for role-based authentication description: | Returns the AWS Account ID and External ID needed to configure an IAM role trust policy for role-based authentication on AWS routes. parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': description: AWS role configuration content: application/json: schema: $ref: '#/components/schemas/AWSRoleConfig' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/clone': post: operationId: CloneProject description: Clone a Project parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' requestBody: description: Project to be cloned required: true content: application/json: schema: 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.' type: string disable_clone_fleets: description: Whether to disallow the cloning of the fleets from the parent project. Default is false if not specified. type: boolean disable_clone_routes: description: Whether to disallow the cloning of the routes from the parent project. Default is false if not specified. type: boolean label: description: The label for the project. type: string required: - label - billing_account_uid responses: '201': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Project' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/devices': get: operationId: GetDevices description: Get Devices of a Project parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/pageSizeParam' - $ref: '#/components/parameters/pageNumParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/tagParam' - $ref: '#/components/parameters/serialNumberParam' - $ref: '#/components/parameters/fleetUIDsQueryParam' - $ref: '#/components/parameters/notecardFirmwareParam' - $ref: '#/components/parameters/locationParam' - $ref: '#/components/parameters/hostFirmwareParam' - $ref: '#/components/parameters/productUIDQueryParam' - $ref: '#/components/parameters/skuParam' responses: '200': $ref: '#/components/responses/DevicesResponse' 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}': delete: operationId: DeleteDevice description: Delete Device responses: '204': description: Successful operation default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: delete resource: 'blues:resources:app:APPSERIAL:devices' get: operationId: GetDevice description: Get Device responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Device' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history': get: operationId: GetDeviceDfuHistory description: Get device DFU history for host or Notecard firmware parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - $ref: '#/components/parameters/firmwareTypeParam' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DeviceDfuHistory' default: $ref: '#/components/responses/ErrorResponse' security: - 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 description: Get device DFU history for host or Notecard firmware parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - $ref: '#/components/parameters/firmwareTypeParam' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DeviceDfuStatus' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable': post: operationId: DisableDevice description: Disable Device parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' responses: '200': description: Successful operation default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable': post: operationId: EnableDevice description: Enable Device parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' responses: '200': description: Successful operation default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy': get: operationId: GetDeviceEnvironmentHierarchy summary: Get environment variable hierarchy for a device parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' responses: '200': description: Successfully retrieved device environment hierarchy content: application/json: schema: $ref: '#/components/schemas/EnvTreeJsonNode' '404': description: Project or device not found '500': description: Server error security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables': get: operationId: GetDeviceEnvironmentVariables description: Get environment variables of a device responses: '200': $ref: '#/components/responses/GetDeviceEnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' put: operationId: SetDeviceEnvironmentVariables description: Set environment variables of a device requestBody: description: Environment variables to be added to the device required: true content: application/json: schema: $ref: '#/components/schemas/EnvironmentVariables' responses: '200': $ref: '#/components/responses/EnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' security: - 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 description: Delete environment variable of a device parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - name: key in: path description: The environment variable key to delete. required: true schema: type: string responses: '200': $ref: '#/components/responses/EnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: delete resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files': delete: operationId: DeleteNotefiles description: Deletes Notefiles and the Notes they contain. parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' requestBody: required: true content: application/json: schema: type: object properties: files: description: Name of notefiles to delete type: array items: type: string responses: '200': description: An empty object means success default: $ref: '#/components/responses/ErrorResponse' security: - 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 parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - name: files in: query description: One or more files to obtain change information from. required: false schema: type: array items: type: string - name: pending in: query description: show only files that are pending sync to the Notecard required: false schema: type: boolean responses: '200': description: All notefiles and their notes content: application/json: schema: $ref: '#/components/schemas/NotefileList' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:notefiles' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets': delete: operationId: DeleteDeviceFromFleets description: Remove Device from Fleets requestBody: description: | The fleets to remove from the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error. required: true content: application/json: schema: type: object properties: fleet_uids: description: The fleetUIDs to remove from the device. type: array items: type: string required: - fleet_uids responses: '200': $ref: '#/components/responses/FleetsResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: delete resource: 'blues:resources:app:APPSERIAL:devices' get: operationId: GetDeviceFleets description: Get Device Fleets responses: '200': $ref: '#/components/responses/FleetsResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' put: operationId: AddDeviceToFleets description: Add Device to Fleets requestBody: description: | The fleets to add to the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error. required: true content: application/json: schema: type: object properties: fleet_uids: description: The fleetUIDs to add to the device. type: array items: type: string required: - fleet_uids responses: '200': $ref: '#/components/responses/FleetsResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log': get: operationId: GetDeviceHealthLog description: Get Device Health Log parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' - name: log_type in: query description: Return only specified log types required: false schema: type: array items: enum: - boot - dfu_completed type: string responses: '200': description: Successful operation content: application/json: schema: type: object properties: health_log: type: array items: properties: alert: type: boolean text: type: string when: type: string format: date-time required: - when - alert - text type: object required: - health_log 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': 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 description: Get Device Latest Events parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' responses: '200': $ref: '#/components/responses/LatestResponse' 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}/notefiles/{notefileID}': post: operationId: CreateNotefile description: Creates an empty Notefile on the device. parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - $ref: '#/components/parameters/notefileIDParam' responses: '200': description: An empty object means success default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:notefiles' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}': get: operationId: GetNotefile description: 'For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - $ref: '#/components/parameters/notefileIDParam' - name: max in: query description: The maximum number of Notes to return in the request. required: false schema: type: integer - name: deleted in: query description: true to return deleted notes. required: false schema: type: boolean - name: delete in: query description: true to delete the notes returned by the request. required: false schema: type: boolean responses: '200': description: The note changes object content: application/json: schema: type: object properties: changes: description: The number of pending changes in the Notefile. type: integer notes: description: An object with a key for each note and a value object with the body of each Note and the time the Note was added. type: object total: description: The total number of notes. type: integer default: $ref: '#/components/responses/ErrorResponse' security: - 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.' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - $ref: '#/components/parameters/notefileIDParam' requestBody: description: Body or payload of note to be added to the device required: true content: application/json: schema: $ref: '#/components/schemas/NoteInput' responses: '200': description: An empty object means success default: $ref: '#/components/responses/ErrorResponse' security: - 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 description: Delete a note from a .db or .qi notefile parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - $ref: '#/components/parameters/notefileIDParam' - $ref: '#/components/parameters/noteIDParam' responses: '200': description: An empty object means success default: $ref: '#/components/responses/ErrorResponse' security: - 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 parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - $ref: '#/components/parameters/notefileIDParam' - $ref: '#/components/parameters/noteIDParam' - name: delete in: query description: Whether to delete the note from the DB notefile required: false schema: type: boolean - name: deleted in: query description: Whether to return deleted notes required: false schema: type: boolean responses: '200': description: The requested note content: application/json: schema: type: object properties: body: description: The note body type: object payload: description: The note payload type: string time: description: The time the Note was added to the Notecard or Notehub type: integer default: $ref: '#/components/responses/ErrorResponse' security: - 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 parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - $ref: '#/components/parameters/notefileIDParam' - $ref: '#/components/parameters/noteIDParam' requestBody: description: Body or payload of note to be added to the device required: true content: application/json: schema: $ref: '#/components/schemas/NoteInput' responses: '200': description: An empty object means success default: $ref: '#/components/responses/ErrorResponse' security: - 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 parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - $ref: '#/components/parameters/notefileIDParam' - $ref: '#/components/parameters/noteIDParam' requestBody: description: Body or payload of note to be added to the device required: true content: application/json: schema: $ref: '#/components/schemas/NoteInput' responses: '200': description: An empty object means success default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:notes' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans': get: operationId: GetDevicePlans description: 'Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections.' responses: '200': $ref: '#/components/responses/DevicePlansResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:devices' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision': post: operationId: ProvisionDevice description: Provision Device for a Project parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' requestBody: description: Provision a device to a specific ProductUID required: true content: application/json: schema: type: object properties: device_sn: description: The serial number to assign to the device. type: string fleet_uids: description: The fleetUIDs to provision the device to. type: array items: type: string nullable: true product_uid: description: The ProductUID that the device should use. type: string required: - product_uid responses: '200': description: Successful operation content: application/json: schema: type: object default: {} default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key': get: operationId: GetDevicePublicKey description: Get Device Public Key parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' responses: '200': description: Successful operation content: application/json: schema: type: object properties: key: type: string uid: type: string required: - uid - key 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}/sessions': get: operationId: GetDeviceSessions description: Get Device Sessions parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' - $ref: '#/components/parameters/pageSizeParam' - $ref: '#/components/parameters/pageNumParam' - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' - $ref: '#/components/parameters/firstSyncParam' responses: '200': $ref: '#/components/responses/SessionResponse' 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}/signal': post: operationId: SignalDevice description: Send a signal from Notehub to a Notecard. parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/deviceUIDParam' requestBody: description: Body or payload of signal to be sent to the device required: true content: application/json: schema: $ref: '#/components/schemas/Body' responses: '200': description: A status response. content: application/json: schema: type: object properties: connected: description: true if the Notecard is connected to Notehub. type: boolean default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/devices/public-keys': get: operationId: GetDevicePublicKeys description: Get Device Public Keys of a Project parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/pageSizeParam' - $ref: '#/components/parameters/pageNumParam' responses: '200': description: Successful operation content: application/json: schema: type: object properties: device_public_keys: type: array items: properties: key: type: string uid: type: string type: object has_more: type: boolean required: - device_public_keys - 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}/dfu/{firmwareType}/{action}': post: operationId: PerformDfuAction description: Update/cancel host or notecard firmware updates parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/firmwareTypeParam' - $ref: '#/components/parameters/dfuActionParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/tagParam' - $ref: '#/components/parameters/serialNumberParam' - $ref: '#/components/parameters/fleetUIDQueryParam' - $ref: '#/components/parameters/notecardFirmwareParam' - $ref: '#/components/parameters/locationParam' - $ref: '#/components/parameters/hostFirmwareParam' - $ref: '#/components/parameters/productUIDQueryParam' - $ref: '#/components/parameters/skuParam' requestBody: description: Which firmware in the case of an update action required: false content: application/json: schema: $ref: '#/components/schemas/DfuActionRequest' responses: '200': description: Success default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history': get: operationId: GetDevicesDfuHistory description: Get host or Notecard DFU history for all devices that match the filter criteria parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/firmwareTypeParam' - $ref: '#/components/parameters/pageSizeParam' - $ref: '#/components/parameters/pageNumParam' - $ref: '#/components/parameters/sortByParam' - $ref: '#/components/parameters/sortOrderParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/tagParam' - $ref: '#/components/parameters/serialNumberParam' - $ref: '#/components/parameters/fleetUIDQueryParam' - $ref: '#/components/parameters/notecardFirmwareParam' - $ref: '#/components/parameters/locationParam' - $ref: '#/components/parameters/hostFirmwareParam' - $ref: '#/components/parameters/productUIDQueryParam' - $ref: '#/components/parameters/skuParam' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DeviceDfuHistoryPage' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status': get: operationId: GetDevicesDfuStatus description: Get host or Notecard DFU history for all devices that match the filter criteria parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/firmwareTypeParam' - $ref: '#/components/parameters/pageSizeParam' - $ref: '#/components/parameters/pageNumParam' - $ref: '#/components/parameters/sortByParam' - $ref: '#/components/parameters/sortOrderParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/tagParam' - $ref: '#/components/parameters/serialNumberParam' - $ref: '#/components/parameters/fleetUIDQueryParam' - $ref: '#/components/parameters/notecardFirmwareParam' - $ref: '#/components/parameters/locationParam' - $ref: '#/components/parameters/hostFirmwareParam' - $ref: '#/components/parameters/productUIDQueryParam' - $ref: '#/components/parameters/skuParam' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DeviceDfuStatusPage' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/environment_hierarchy': get: operationId: GetProjectEnvironmentHierarchy summary: Get environment variable hierarchy for a device parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': description: Successfully retrieved project environment hierarchy content: application/json: schema: $ref: '#/components/schemas/EnvTreeJsonNode' '404': description: Project or device not found '500': description: Server error security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/environment_variables': get: operationId: GetProjectEnvironmentVariables description: Get environment variables of a project responses: '200': $ref: '#/components/responses/EnvironmentVariablesResponse' 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' put: operationId: SetProjectEnvironmentVariables description: Set environment variables of a project requestBody: content: application/json: schema: $ref: '#/components/schemas/EnvironmentVariables' responses: '200': $ref: '#/components/responses/EnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/environment_variables/{key}': delete: operationId: DeleteProjectEnvironmentVariable description: Delete an environment variable of a project by key parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - name: key in: path description: The environment variable key to delete. required: true schema: type: string responses: '200': $ref: '#/components/responses/EnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: delete resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/events': get: operationId: GetEvents description: Get Events of a Project parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/pageSizeParam' - $ref: '#/components/parameters/pageNumParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/sortByParam' - $ref: '#/components/parameters/sortOrderParam' - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' - $ref: '#/components/parameters/dateTypeParam' - $ref: '#/components/parameters/systemFilesOnlyParam' - $ref: '#/components/parameters/filesQueryParam' - $ref: '#/components/parameters/formatParam' - $ref: '#/components/parameters/serialNumberFilterParam' - $ref: '#/components/parameters/fleetUIDFilterQueryParam' - $ref: '#/components/parameters/sessionUIDFilterParam' - $ref: '#/components/parameters/eventUIDFilterQueryParam' - $ref: '#/components/parameters/selectFieldsParam' - name: deviceUIDs in: query description: Deprecated. required: false schema: type: array items: type: string deprecated: true - name: since in: query description: Deprecated. required: false schema: type: string deprecated: true responses: '200': $ref: '#/components/responses/EventsResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - event x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/events-cursor': get: operationId: GetEventsByCursor description: Get Events of a Project by cursor parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/limitParam' - $ref: '#/components/parameters/cursorParam' - $ref: '#/components/parameters/sortOrderParam' - $ref: '#/components/parameters/systemFilesOnlyParam' - $ref: '#/components/parameters/filesQueryParam' - $ref: '#/components/parameters/fleetUIDQueryParam' - $ref: '#/components/parameters/deviceUIDParamQuery' responses: '200': $ref: '#/components/responses/EventsByCursorResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - event x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs': get: operationId: GetRouteLogsByEvent description: Get Route Logs by Event UID parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/eventUIDParam' responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/RouteLog' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - event x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/firmware': get: operationId: GetFirmwareInfo description: Get Available Firmware Information parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/productQueryParam' - $ref: '#/components/parameters/firmwareTypeQueryParam' - $ref: '#/components/parameters/versionQueryParam' - $ref: '#/components/parameters/targetQueryParam' - $ref: '#/components/parameters/filenameQueryParam' - $ref: '#/components/parameters/md5QueryParam' - $ref: '#/components/parameters/unpublishedQueryParam' - $ref: '#/components/parameters/firmwareSortByParam' - $ref: '#/components/parameters/firmwareSortOrderParam' responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/FirmwareInfo' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}': delete: operationId: DeleteFirmware description: | Delete a host firmware binary. The filename must be the full stored filename including the timestamp suffix (e.g. test$20260324190911.bin) as returned by the firmware upload or list endpoints. parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - name: firmwareType in: path required: true schema: type: string enum: - host - name: filename in: path required: true schema: type: string responses: '204': description: Firmware deleted successfully default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: delete resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: DownloadFirmware description: Download firmware binary parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/firmwareTypeParam' - name: filename in: path required: true schema: type: string responses: '200': description: Firmware binary content: application/octet-stream: schema: type: string format: binary default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:settings' post: operationId: UpdateFirmware description: | Update the metadata of an existing host firmware entry. The filename must be the full stored filename including the timestamp suffix (e.g. test$20260324190911.bin) as returned by the firmware upload or list endpoints. parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - name: firmwareType in: path required: true schema: type: string enum: - host - name: filename in: path required: true schema: type: string requestBody: description: Firmware metadata fields to update. All fields are optional; only provided fields will be updated. required: true content: application/json: schema: $ref: '#/components/schemas/UpdateHostFirmwareRequest' responses: '200': description: Update successful content: application/json: schema: $ref: '#/components/schemas/FirmwareInfo' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:settings' put: operationId: UploadFirmware description: Upload firmware binary parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/firmwareTypeParam' - name: filename in: path required: true schema: 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' required: false schema: type: string - name: notes in: query description: Optional notes describing what's different about this firmware version required: false schema: type: string requestBody: description: contents of the firmware binary required: true content: application/octet-stream: schema: type: string format: binary responses: '200': description: Upload successful content: application/json: schema: $ref: '#/components/schemas/FirmwareInfo' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/fleets': get: operationId: GetFleets description: Get Project Fleets responses: '200': $ref: '#/components/responses/FleetsResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:fleets' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: operationId: CreateFleet description: Create Fleet requestBody: description: Fleet to be added required: true content: application/json: schema: type: object properties: connectivity_assurance: $ref: '#/components/schemas/FleetConnectivityAssurance' label: description: 'The label, or name, for the Fleet.' type: string smart_rule: $ref: '#/components/schemas/FleetRule' smart_rule_enabled: type: boolean responses: '201': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Fleet' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:fleets' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}': delete: operationId: DeleteFleet description: Delete Fleet responses: '204': description: Successful operation default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: delete resource: 'blues:resources:app:APPSERIAL:fleets' get: operationId: GetFleet description: Get Fleet responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Fleet' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:fleets' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' put: operationId: UpdateFleet description: Update Fleet requestBody: description: Fleet details to update required: true content: application/json: schema: type: object properties: addDevices: description: List of DeviceUIDs to add to fleet type: array items: type: string connectivity_assurance: $ref: '#/components/schemas/FleetConnectivityAssurance' label: description: The label for the Fleet. type: string removeDevices: description: List of DeviceUIDs to remove from fleet type: array items: type: string smart_rule: $ref: '#/components/schemas/FleetRule' smart_rule_enabled: type: boolean watchdog_mins: description: A watchdog timer is used to generate an event every N minutes of inactivity. 0 means no watchdog type: integer format: int64 responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Fleet' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:fleets' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices': get: operationId: GetFleetDevices description: Get Devices of a Fleet within a Project parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' - $ref: '#/components/parameters/pageSizeParam' - $ref: '#/components/parameters/pageNumParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/tagParam' - $ref: '#/components/parameters/serialNumberParam' - $ref: '#/components/parameters/notecardFirmwareParam' - $ref: '#/components/parameters/locationParam' - $ref: '#/components/parameters/hostFirmwareParam' - $ref: '#/components/parameters/productUIDQueryParam' - $ref: '#/components/parameters/skuParam' responses: '200': $ref: '#/components/responses/DevicesResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - device x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy': get: operationId: GetFleetEnvironmentHierarchy summary: Get environment variable hierarchy for a device parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' responses: '200': description: Successfully retrieved fleet environment hierarchy content: application/json: schema: $ref: '#/components/schemas/EnvTreeJsonNode' '404': description: Project or device not found '500': description: Server error security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:fleets' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables': get: operationId: GetFleetEnvironmentVariables description: Get environment variables of a fleet responses: '200': $ref: '#/components/responses/EnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:fleets' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' put: operationId: SetFleetEnvironmentVariables description: Set environment variables of a fleet requestBody: description: Environment variables to be added to the fleet required: true content: application/json: schema: $ref: '#/components/schemas/EnvironmentVariables' responses: '200': $ref: '#/components/responses/EnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' security: - 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 description: Delete environment variables of a fleet parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' - name: key in: path description: The environment variable key to delete. required: true schema: type: string responses: '200': $ref: '#/components/responses/EnvironmentVariablesResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: delete resource: 'blues:resources:app:APPSERIAL:fleets' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events': get: operationId: GetFleetEvents description: Get Events of a Fleet parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' - $ref: '#/components/parameters/pageSizeParam' - $ref: '#/components/parameters/pageNumParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/sortByParam' - $ref: '#/components/parameters/sortOrderParam' - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' - $ref: '#/components/parameters/dateTypeParam' - $ref: '#/components/parameters/systemFilesOnlyParam' - $ref: '#/components/parameters/filesQueryParam' - $ref: '#/components/parameters/formatParam' - $ref: '#/components/parameters/serialNumberFilterParam' - $ref: '#/components/parameters/sessionUIDFilterParam' - $ref: '#/components/parameters/eventUIDFilterQueryParam' - $ref: '#/components/parameters/selectFieldsParam' - name: deviceUIDs in: query description: Deprecated. required: false schema: type: array items: type: string deprecated: true - name: since in: query description: Deprecated. required: false schema: type: string deprecated: true responses: '200': $ref: '#/components/responses/EventsResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - event x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor': get: operationId: GetFleetEventsByCursor description: Get Events of a Fleet by cursor parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/fleetUIDParam' - $ref: '#/components/parameters/limitParam' - $ref: '#/components/parameters/cursorParam' - $ref: '#/components/parameters/sortOrderParam' - $ref: '#/components/parameters/systemFilesOnlyParam' - $ref: '#/components/parameters/filesQueryParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' responses: '200': $ref: '#/components/responses/EventsByCursorResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - event x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/global-transformation': post: operationId: SetGlobalEventTransformation description: Set the project-level event JSONata transformation parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' requestBody: description: JSONata expression which will be applied to each event before it is persisted and routed required: true content: text/plain: schema: type: string responses: '200': description: Successful operation default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/global-transformation/disable': post: operationId: DisableGlobalEventTransformation description: Disable the project-level event JSONata transformation parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': description: Successful operation default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/global-transformation/enable': post: operationId: EnableGlobalEventTransformation description: Enable the project-level event JSONata transformation parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': description: Successful operation default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/jobs': get: operationId: GetJobs description: List all batch jobs for a project parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': $ref: '#/components/responses/GetJobsResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - jobs x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:settings' post: operationId: CreateJob description: Create a new batch job with an optional name parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - name: name in: query description: Name for the job required: true schema: type: string requestBody: description: The batch job definition required: true content: application/json: schema: $ref: '#/components/schemas/JobDefinition' responses: '201': $ref: '#/components/responses/CreateJobResponse' '400': description: Missing required name parameter or invalid job definition default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - jobs x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/jobs/{jobUID}': delete: operationId: DeleteJob description: Delete a batch job parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/jobUIDParam' responses: '200': $ref: '#/components/responses/DeleteJobResponse' '404': description: Job not found default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - jobs x-custom-attributes: permission: delete resource: 'blues:resources:app:APPSERIAL:settings' get: operationId: GetJob description: Get a specific batch job definition parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/jobUIDParam' responses: '200': $ref: '#/components/responses/GetJobResponse' '404': description: Job not found default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - jobs x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/jobs/{jobUID}/run': post: operationId: RunJob description: Execute a batch job parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/jobUIDParam' - name: dry_run in: query description: Run job in dry-run mode without making actual changes required: false schema: type: boolean default: false responses: '200': $ref: '#/components/responses/RunJobResponse' '404': description: Job not found default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - jobs x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs': get: operationId: GetJobRuns description: List all runs for a specific job parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/jobUIDParam' - name: status in: query description: Filter runs by status required: false schema: type: string - name: dry_run in: query description: Filter runs by dry run flag required: false schema: type: boolean nullable: true responses: '200': $ref: '#/components/responses/GetJobRunsResponse' '404': description: Job not found default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - jobs x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}': 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' '404': description: Run not found default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - jobs x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel': post: operationId: CancelJobRun description: Cancel a running job execution parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/reportUIDParam' responses: '200': $ref: '#/components/responses/CancelJobRunResponse' '404': description: Run not found default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - jobs x-custom-attributes: permission: delete resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/members': get: operationId: GetProjectMembers description: Get Project Members responses: '200': description: Successful operation content: application/json: schema: type: object properties: members: type: array items: $ref: '#/components/schemas/ProjectMember' required: - members default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:accounts' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' '/v1/projects/{projectOrProductUID}/monitors': get: operationId: GetMonitors description: Get list of defined Monitors parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': $ref: '#/components/responses/MonitorsResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - monitor x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:devices' post: operationId: CreateMonitor description: Create a new Monitor parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' requestBody: description: Body or payload of monitor to be created required: true content: application/json: schema: $ref: '#/components/schemas/CreateMonitor' responses: '201': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Monitor' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - monitor x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/monitors/{monitorUID}': delete: operationId: DeleteMonitor description: Delete Monitor parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/monitorUIDParam' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Monitor' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - monitor x-custom-attributes: permission: delete resource: 'blues:resources:app:APPSERIAL:devices' get: operationId: GetMonitor description: Get Monitor parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/monitorUIDParam' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Monitor' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - monitor x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:devices' put: operationId: UpdateMonitor description: Update Monitor parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/monitorUIDParam' requestBody: description: Body or payload of monitor to be created required: true content: application/json: schema: $ref: '#/components/schemas/Monitor' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Monitor' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - monitor x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:devices' '/v1/projects/{projectOrProductUID}/products': get: operationId: GetProducts description: Get Products within a Project responses: '200': description: Successful operation content: application/json: schema: type: object properties: products: type: array items: $ref: '#/components/schemas/Product' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:products' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' post: operationId: CreateProduct description: Create Product within a Project requestBody: description: Product to be created required: true content: application/json: schema: type: object properties: auto_provision_fleets: type: array items: type: string disable_devices_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. type: string product_uid: description: The requested uid for the Product. Will be prefixed with the user's reversed email. type: string required: - product_uid - label responses: '201': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Product' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - project x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/products/{productUID}': delete: operationId: DeleteProduct description: Delete a product responses: '204': description: Successful operation 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' - $ref: '#/components/parameters/productUIDParam' '/v1/projects/{projectOrProductUID}/routes': get: operationId: GetRoutes description: Get all Routes within a Project parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': description: Successful operation content: application/json: example: - disabled: false label: success route modified: '2020-03-09T17:58:37Z' type: http uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' - disabled: false label: failing route modified: '2020-03-09T17:59:15Z' type: http uid: 'route:a9eaad31d5cee8d01a42762f71fb777a' - disabled: true label: disabled route modified: '2020-03-09T17:59:44Z' type: http uid: 'route:02ddc0e6e236c2a7e482da62047229ad' - disabled: false label: Proxy Route modified: '2020-03-09T17:58:36Z' type: proxy uid: 'route:0ac565deb7b478a250bb82348b9cfdd4' - disabled: false label: Myjsonlive Webtest modified: '2020-03-09T17:58:35Z' type: proxy uid: 'route:fb1b9e0aba1bf030311ba2c3c1e3efd7' - disabled: false label: Myjsonlive Echo modified: '2020-03-09T17:58:34Z' type: proxy uid: 'route:7804818f84a3be6193e14d804fe7fca7' schema: type: array items: $ref: '#/components/schemas/NotehubRouteSummary' minItems: 0 default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - route x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:routes' post: operationId: CreateRoute description: Create Route within a Project parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' requestBody: description: Route to be created required: true content: application/json: examples: http: summary: HTTP route value: http: disable_http_headers: false filter: {} fleets: - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' http_headers: X-My-Header: value throttle_ms: 100 timeout: 5000 transform: {} url: 'https://example.com/ingest' label: Route Label schema: $ref: '#/components/schemas/NotehubRoute' responses: '201': description: Created content: application/json: example: disabled: 'false' http: disable_http_headers: false filter: system_notefiles: false type: '' fleets: - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' http_headers: null throttle_ms: 100 timeout: 0 transform: {} url: 'http://route.url' label: Route Label modified: '2020-03-09T17:59:44Z' type: http uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' schema: $ref: '#/components/schemas/NotehubRoute' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - route x-custom-attributes: permission: create resource: 'blues:resources:app:APPSERIAL:routes' '/v1/projects/{projectOrProductUID}/routes/{routeUID}': delete: operationId: DeleteRoute description: Delete single route within a project parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/routeUIDParam' responses: '204': description: Successful operation default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - route x-custom-attributes: permission: delete resource: 'blues:resources:app:APPSERIAL:routes' get: operationId: GetRoute description: Get single route within a project parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/routeUIDParam' responses: '200': description: Successful operation content: application/json: example: disabled: 'false' http: disable_http_headers: false filter: system_notefiles: false type: '' fleets: - 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' http_headers: null throttle_ms: 100 timeout: 0 transform: {} url: 'http://route.url' label: Route Label modified: '2020-03-09T17:59:44Z' type: http uid: 'route:8d65a087d5d290ce5bdf03aeff2becc0' schema: $ref: '#/components/schemas/NotehubRoute' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - route x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:routes' put: operationId: UpdateRoute description: Update route by UID parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/routeUIDParam' requestBody: description: Route settings to be updated required: true content: application/json: example: | { "http" { "filter": { "type": "include", "system_notefiles": true, "files": ["somefile.qo"], }, "throttle_ms": 50, "url": "http://new-route.url", }, } schema: $ref: '#/components/schemas/NotehubRoute' responses: '200': description: Successful operation content: application/json: example: | { "uid": "route:8d65a087d5d290ce5bdf03aeff2becc0", "label": "Route Label", "type": "http", "modified": "2020-03-09T17:59:44Z", "disabled": "false", "http": { "fleets": ["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"], "filter": { "type": "include", "system_notefiles": true, "files": ["somefile.qo"], }, "transform": {}, "throttle_ms": 50, "url": "http://new-route.url", "http_headers": null, "disable_http_headers": false, "timeout": 0 } schema: $ref: '#/components/schemas/NotehubRoute' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - route x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:routes' '/v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs': get: operationId: GetRouteLogsByRoute description: Get Route Logs by Route UID parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/routeUIDParam' - $ref: '#/components/parameters/pageSizeParam' - $ref: '#/components/parameters/pageNumParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/routeLogsSortByParam' - $ref: '#/components/parameters/routeLogsSortOrderParam' - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' - $ref: '#/components/parameters/systemFilesOnlyParam' - $ref: '#/components/parameters/mostRecentOnlyParam' - $ref: '#/components/parameters/filesQueryParam' - $ref: '#/components/parameters/routingStatusParam' - $ref: '#/components/parameters/responseStatusParam' responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/RouteLog' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - route x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:routes' '/v1/projects/{projectOrProductUID}/schemas': get: operationId: GetNotefileSchemas summary: Get variable format for a notefile parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': description: List of notefile schema definitions content: application/json: schema: 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' 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 description: Get data usage in bytes for a project with time range and period aggregation parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/fleetUIDFilterQueryParam' - $ref: '#/components/parameters/usageLimitQueryParam' - name: period in: query description: Period type for aggregation required: true schema: type: string enum: - day - week - month - name: aggregate in: query description: Aggregation level for results required: false schema: type: string default: device enum: - device - fleet - project responses: '200': $ref: '#/components/responses/UsageDataResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - usage x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/usage/events': get: operationId: GetEventsUsage description: 'Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/fleetUIDFilterQueryParam' - $ref: '#/components/parameters/usageLimitQueryParam' - name: period in: query description: Period type for aggregation required: true schema: type: string enum: - day - week - month - name: aggregate in: query description: Aggregation level for results required: false schema: type: string default: device enum: - device - fleet - project - name: notefile in: query description: Filter to specific notefiles required: false schema: type: array items: type: string explode: true 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.' required: false schema: type: boolean default: false - name: includeNotefiles in: query description: Include per-notefile event counts in the response required: false schema: type: boolean default: false responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/UsageEventsResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - usage x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/usage/route-logs': get: operationId: GetRouteLogsUsage description: 'Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' - $ref: '#/components/parameters/routeUIDParamQuery' - $ref: '#/components/parameters/usageLimitQueryParam' - name: period in: query description: Period type for aggregation required: true schema: type: string enum: - day - week - month - name: aggregate in: query description: Aggregation level for results required: false schema: type: string default: route enum: - route - 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.' required: false schema: type: boolean default: false responses: '200': $ref: '#/components/responses/UsageRouteLogsResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - usage x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/usage/sessions': get: operationId: GetSessionsUsage description: 'Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied' parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/startDateParam' - $ref: '#/components/parameters/endDateParam' - $ref: '#/components/parameters/deviceUIDParamQuery' - $ref: '#/components/parameters/fleetUIDFilterQueryParam' - $ref: '#/components/parameters/usageLimitQueryParam' - name: period in: query description: Period type for aggregation required: true schema: type: string enum: - day - week - month - name: aggregate in: query description: Aggregation level for results required: false schema: type: string default: device enum: - device - fleet - 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.' required: false schema: type: boolean default: false responses: '200': $ref: '#/components/responses/UsageSessionsResponse' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - usage x-custom-attributes: permission: read resource: 'blues:resources:app:APPSERIAL:events' '/v1/projects/{projectOrProductUID}/webhooks': get: operationId: GetWebhooks description: Retrieves all webhooks for the specified project parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': description: Webhooks retrieved successfully content: application/json: schema: type: object properties: webhooks: type: array items: $ref: '#/components/schemas/WebhookSettings' default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - webhook x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:settings' '/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}': delete: operationId: DeleteWebhook description: Deletes the specified webhook parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/webhookUIDParam' responses: '200': description: Webhook deleted successfully default: $ref: '#/components/responses/ErrorResponse' security: - 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 parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $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' post: operationId: CreateWebhook description: Creates a webhook for the specified product with the given name. The name | must be unique within the project. parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $ref: '#/components/parameters/webhookUIDParam' requestBody: required: true content: application/json: example: settings: disabled: false id: Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8 transform: '{"device":body.end_device_ids.dev_eui,"sn":body.end_device_ids.device_id,"body":body.uplink_message.decoded_payload,"details":body}' schema: $ref: '#/components/schemas/WebhookSettings' responses: '200': description: Webhook created successfully default: $ref: '#/components/responses/ErrorResponse' security: - 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. parameters: - $ref: '#/components/parameters/projectOrProductUIDParam' - $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 updated successfully default: $ref: '#/components/responses/ErrorResponse' security: - personalAccessToken: [] tags: - webhook x-custom-attributes: permission: update resource: 'blues:resources:app:APPSERIAL:settings' components: parameters: billingAccountUIDParam: example: 00000000-0000-0000-000000000001 in: path name: billingAccountUID required: true schema: type: string cursorParam: description: | A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included. in: query name: cursor required: false schema: type: string datasetAggregateWindowQueryParam: description: 'Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format' in: query name: aggregate_window required: false schema: type: string datasetDistinctQueryParam: description: Return only distinct results in: query name: distinct required: false 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.' in: query name: end required: false schema: type: string datasetLimitQueryParam: description: Limit the number of results returned in: query name: limit required: false schema: type: integer datasetLocationNearQueryParam: 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' datasetLocationRadiusQueryParam: description: 'Distance from location_near in meters, location_near must also be provided' in: query name: location_near_radius required: false schema: type: integer datasetNameParam: description: The name of the data set in: path name: name required: true schema: type: string datasetOrderByQueryParam: description: Order the results by a field in: query name: order_by required: false schema: type: string datasetSelectQueryParam: 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.' 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))' 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' example: uploaded in: query name: dateType required: false schema: type: string default: captured enum: - captured - uploaded deviceTagsParam: in: query name: deviceTags required: false schema: type: array items: type: string deviceUIDParam: example: 'dev:000000000000000' in: path name: deviceUID required: true schema: type: string deviceUIDParamQuery: description: A Device UID. explode: true in: query name: deviceUID required: false schema: type: array items: type: string style: form deviceUIDsParamQuery: description: An array of Device UIDs. in: query name: deviceUIDs required: false schema: type: array items: type: string dfuActionParam: in: path name: action required: true schema: type: string enum: - update - cancel endDateParam: description: 'End date for filtering results, specified as a Unix timestamp' example: 1657894210 in: query name: endDate required: false schema: type: integer minimum: 0 eventUIDFilterQueryParam: description: Filter by Event UID explode: true in: query name: eventUID required: false schema: type: array items: type: string style: form eventUIDParam: example: 4506f411-dea6-44a0-9743-1130f57d7747 in: path name: eventUID required: true schema: type: string filenameQueryParam: example: notecard-7.2.2.16518$20240410043100.bin in: query name: filename required: false schema: type: string filesQueryParam: example: '_health.qo, data.qo' in: query name: files required: false schema: type: string firmwareSortByParam: description: Field to sort by in: query name: sortBy required: false schema: type: string default: created enum: - created - name - version - length firmwareSortOrderParam: description: 'Sort order (asc for ascending, desc for descending)' in: query name: sortOrder required: false schema: type: string default: desc enum: - asc - desc firmwareTypeParam: in: path name: firmwareType required: true schema: type: string enum: - host - notecard firmwareTypeQueryParam: in: query name: firmwareType required: false schema: type: string firstSyncParam: description: 'When true, filters results to only show first sync sessions' in: query name: firstSync required: false schema: type: boolean default: false fleetUIDFilterQueryParam: description: Filter by Fleet UID explode: true in: query name: fleetUID required: false schema: type: array items: type: string style: form fleetUIDParam: in: path name: fleetUID required: true schema: type: string fleetUIDQueryParam: in: query name: fleetUID required: false schema: type: string fleetUIDsParam: in: query name: fleetUIDs required: false schema: type: array items: type: string fleetUIDsQueryParam: in: query name: fleetUID required: false schema: type: array items: type: string formatParam: description: Response format (JSON or CSV) in: query name: format required: false schema: type: string default: json enum: - json - csv hostFirmwareParam: description: Host firmware filter explode: true in: query name: hostFirmware required: false schema: type: array items: type: string style: form jobUIDParam: description: Unique identifier for a batch job example: my-reconciliation-job in: path name: jobUID required: true schema: type: string limitParam: in: query name: limit required: false schema: type: integer default: 50 minimum: 1 locationParam: description: Location filter explode: true in: query name: location required: false schema: type: array items: type: string style: form md5QueryParam: in: query name: md5 required: false schema: type: string monitorUIDParam: example: 'monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad' in: path name: monitorUID required: true schema: type: string monitorUIDQueryParam: explode: true in: query name: monitorUID required: false schema: type: string style: form mostRecentOnlyParam: in: query name: mostRecentOnly required: false schema: type: boolean notecardFirmwareParam: description: Firmware version filter explode: true in: query name: notecardFirmware required: false schema: type: array items: type: string style: form notefileIDParam: in: path name: notefileID required: true schema: type: string noteIDParam: in: path name: noteID required: true schema: type: string organizationUIDParam: example: 00000000-0000-0000-000000000001 in: path name: organizationUID required: true schema: type: string pageNumParam: in: query name: pageNum required: false schema: type: integer default: 1 minimum: 1 pageSizeParam: in: query name: pageSize required: false schema: type: integer default: 50 maximum: 10000 minimum: 1 productQueryParam: in: query name: product required: false schema: type: string productUIDParam: example: 'com.blues.bridge:sensors' in: path name: productUID required: true schema: type: string productUIDQueryParam: explode: true in: query name: productUID required: false schema: type: array items: type: string style: form projectOrProductUIDParam: example: 'app:2606f411-dea6-44a0-9743-1130f57d77d8' in: path name: projectOrProductUID required: true schema: type: string reportUIDParam: description: Unique identifier for a job run report example: my-reconciliation-job-1707654321000 in: path name: reportUID required: true schema: type: string repositoryKey: description: The secret key used to access this repository in: header name: X-Repository-Key required: true schema: type: string repositoryUIDParam: in: path name: repositoryUID required: true schema: type: string example: 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' responseStatusParam: example: 500 in: query name: responseStatus required: false schema: type: array items: type: string routeLogsSortByParam: in: query name: sortBy required: false schema: type: string default: date enum: - date - event routeLogsSortOrderParam: in: query name: sortOrder required: false schema: type: string default: desc enum: - asc - desc routeUIDParam: example: 'route:cbd20093cba58392c9f9bbdd0cdeb1a0' in: path name: routeUID required: true schema: type: string routeUIDParamQuery: description: A Route UID. explode: true in: query name: routeUID required: false schema: type: array items: type: string style: form routingStatusParam: example: failure in: query name: routingStatus required: false schema: type: array items: enum: - success - 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.' in: query name: selectFields required: false schema: type: string serialNumberFilterParam: description: Filter by Serial Number explode: true in: query name: serialNumber required: false schema: type: array items: type: string style: form serialNumberParam: description: Serial number filter explode: true in: query name: serialNumber required: false schema: type: array items: type: string style: form sessionUIDFilterParam: description: Filter by Session UID explode: true in: query name: sessionUID required: false schema: type: array items: type: string style: form skuParam: description: SKU filter explode: true in: query name: sku required: false schema: type: array items: type: string style: form sortByParam: in: query name: sortBy required: false schema: type: string default: captured enum: - best_id - device_serial - device_uid - captured - modified - device_location - tower_location - triangulated_location - best_location sortOrderParam: in: query name: sortOrder required: false schema: type: string default: asc enum: - asc - desc startDateParam: description: 'Start date for filtering results, specified as a Unix timestamp' example: 1628631763 in: query name: startDate required: false schema: type: integer minimum: 0 systemFilesOnlyParam: in: query name: systemFilesOnly required: false schema: type: boolean tagParam: description: Tag filter explode: true in: query name: tag required: false schema: type: array items: type: string style: form targetQueryParam: in: query name: target required: false schema: type: string unpublishedQueryParam: in: query name: unpublished required: false schema: type: boolean usageLimitQueryParam: description: Limit the number of data points returned in: query name: limit required: false schema: type: integer default: 200000 maximum: 400000 minimum: 1 versionQueryParam: in: query name: version required: false schema: type: string webhookUIDParam: description: Webhook UID in: path name: webhookUID required: true schema: type: string example: Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8 XAuthTokenHeader: description: For accessing endpoints by Device pin. in: header name: X-Auth-Token required: true schema: type: string schemas: AWSRoleConfig: description: Configuration needed to set up an IAM role trust policy for role-based authentication on AWS routes type: object properties: aws_account_id: description: The Blues AWS Account ID to trust in your IAM role's trust policy type: string external_id: description: The External ID to use in your IAM role's trust policy condition type: string required: - aws_account_id - external_id Alert: type: object properties: alert_source: description: The source of the alert type: string enum: - app - device created_at: description: The time the alert was created type: integer data: type: array items: properties: alert_source: description: The source of the alert type: string enum: - app - device source: description: The UID of the source of the alert type: string source_type: description: The type of source. type: string enum: - event - device source_uid: description: The UID of the source of the alert type: string value: description: The value that triggered the alert type: number when: description: The time the alert was created type: string type: object device_uid: description: Device UID type: string field_name: description: The field name that triggered the alert type: string monitor_name: description: Monitor Name type: string monitor_type: description: The type of monitor that triggered the alert type: string enum: - event - device monitor_uid: description: Monitor UID type: string notifications: type: array items: properties: notification_type: description: The type of notification type: string enum: - email - slack recipients: description: The recipients of the notification type: string status: description: The status of the notification type: number type: object resolved: description: 'If true, the alert has been resolved' type: boolean source: description: The UID of the source of the alert type: string uid: description: Alert UID type: string value: description: The value that triggered the alert type: number version: description: The version of the alert type: integer AppUIDList: type: array items: type: string properties: {} AwsRoute: type: object properties: access_key_id: type: string access_key_secret: type: string channel: type: string disable_http_headers: type: boolean filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string http_headers: type: object additionalProperties: type: string message_deduplication_id: type: string message_group_id: type: string region: type: string role_arn: description: IAM Role ARN for role-based authentication via STS AssumeRole type: string throttle_ms: type: integer timeout: type: integer transform: $ref: '#/components/schemas/RouteTransformSettings' url: type: string format: uri additionalProperties: false AzureRoute: type: object properties: filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string functions_key_secret: type: string sas_policy_key: type: string sas_policy_name: type: string throttle_ms: type: integer timeout: type: integer transform: $ref: '#/components/schemas/RouteTransformSettings' url: 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: name: type: string role: $ref: '#/components/schemas/BillingAccountRole' uid: type: string required: - uid - name - role BillingAccountRole: type: string properties: {} enum: - billing_admin - billing_manager - project_creator - billing_member BlynkRoute: type: object properties: filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string region: type: string throttle_ms: type: integer timeout: type: integer transform: $ref: '#/components/schemas/RouteTransformSettings' additionalProperties: false Body: type: object properties: body: type: object CellularPlan: type: object properties: activated: description: Unix timestamp of when the SIM was activated type: integer format: int64 example: 1656010061 data_usage: $ref: '#/components/schemas/DataUsage' expires_at: type: integer format: int64 iccid: description: The Integrated Circuit Card Identifier of the SIM card type: string example: '345678432765434567890765746354465786' imsi: description: IMSI of the SIM card type: string example: '310170830688975' last_updated: description: Time this plan information was last updated type: integer format: int64 example: 1656010061 lifetime_used: description: Total bytes used by this SIM type: integer format: int64 plan_type: description: 'Description of the SIM plan type including data allowance, region, and validity period' type: string example: '500MB, North America, 10-year lifetime' CellularUsage: type: array items: $ref: '#/components/schemas/SimUsage' properties: {} Contact: type: object properties: email: type: string name: type: string organization: type: string role: type: string nullable: true CreateMonitor: type: '' properties: {} allOf: - $ref: '#/components/schemas/Monitor' - required: - name - description - 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: fleet_uids: $ref: '#/components/schemas/FleetsUIDList' name: type: string project_uids: $ref: '#/components/schemas/AppUIDList' CreatedRepository: type: object properties: fleet_uids: $ref: '#/components/schemas/FleetsUIDList' name: description: repository name type: string password: description: 'read-only password for the database, also used as X-Repository-Token header for subsequent API calls. This value is only served once when the repository is created' type: string project_uids: $ref: '#/components/schemas/AppUIDList' uid: description: The unique identifier for the data repository type: string user: description: read-only user for database type: string CurrentFirmware: type: object properties: metadata: $ref: '#/components/schemas/Firmware' version: type: string DFUEnv: type: object properties: card: $ref: '#/components/schemas/DFUState' user: $ref: '#/components/schemas/DFUState' nullable: true DFUState: type: object properties: began: description: The time when the DFU began type: number crc32: description: Used for image verification type: number errors: description: The number of consecutive errors the DFU process has encountered type: number file: description: Firmware filename type: string length: description: Length of firmware file type: number md5: description: Used for image verification type: string mode: description: | * "idle" - nothing downloading or downloaded * "error" - halted and in the error state * "downloading" - transferring data from cloud to module * "sideloading" - transferring data via request to module * "ready" - DFU data is ready/verified and waiting on external storage * "ready-retry" - DFU data is ready/verified and retrying * "updating" - currently updating * "completed" - DFU is done successfully type: string enum: - idle - error - downloading - sideloading - ready - ready-retry - updating - completed read: description: The amount the notecard has read of the image from notehub type: number retry: description: Value of _fw_retry environment var at time of DFU initialization type: number status: description: Status message type: string type: type: string enum: - card - user updated: description: Last updated timestamp type: number version: description: 'Last known version, which is generally a JSON object contained within the firmware image' type: string nullable: true DataField: type: object properties: name: description: The name of the field type: string DataSet: type: '' properties: fields: type: array items: $ref: '#/components/schemas/DataSetField' lat: description: JSONata expression resulting in the latitude field type: string lon: description: JSONata expression resulting in the Longitude field type: string name: description: The name of the data set type: string time: description: JSONata expression resulting in the relevant time field type: string DataSetField: type: object properties: datatype: description: The datatype of the field type: integer enum: - 0 - 1 - 2 jsonata: description: the JSONata expression used to populate this field type: string name: description: The name of the field type: string DataUsage: type: object properties: kb_remaining: description: Kilobytes remaining in the plan type: number format: double example: 372.55 kb_total: description: Total Kilobytes included in the plan type: number format: double example: 500 kb_used: description: Kilobytes used to date type: number format: double example: 127.45 required: - kb_total - kb_used - kb_remaining DatacakeRoute: type: object properties: disable_http_headers: type: boolean filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string http_headers: type: object additionalProperties: type: string throttle_ms: type: integer timeout: type: integer transform: $ref: '#/components/schemas/RouteTransformSettings' url: type: string format: uri additionalProperties: false Device: type: object properties: best_location: $ref: '#/components/schemas/Location' cellular_usage: $ref: '#/components/schemas/CellularUsage' contact: $ref: '#/components/schemas/Contact' dfu: $ref: '#/components/schemas/DFUEnv' disabled: type: boolean firmware_host: type: string firmware_notecard: type: string fleet_uids: type: array items: type: string gps_location: $ref: '#/components/schemas/Location' last_activity: type: string format: date-time nullable: true product_uid: type: string provisioned: type: string format: date-time serial_number: type: string sku: type: string temperature: type: number format: double tower_info: type: object nullable: true properties: cell_id: type: integer lac: type: integer mcc: type: integer mnc: type: integer tower_location: $ref: '#/components/schemas/Location' triangulated_location: $ref: '#/components/schemas/Location' uid: type: string voltage: type: number format: double required: - uid - provisioned - product_uid - fleet_uids - voltage - temperature DeviceDfuHistory: type: object properties: current: description: Description of the current firmware type: object properties: builder: description: Firmware author type: string built: description: Firmware build date type: string description: description: Firmware description type: string organization: description: Firmware organization type: string product: description: Firmware product type: string version: description: Firmware version type: string device_uid: description: Device UID type: string history: type: array items: $ref: '#/components/schemas/DeviceDfuStateMachine' DeviceDfuHistoryPage: type: object properties: devices: type: array items: $ref: '#/components/schemas/DeviceDfuHistory' has_more: type: boolean default: false DeviceDfuStateMachine: description: Represents a single request to update the host or Notecard firmware type: object properties: current_version: description: Version of the firmware that was installed prior to this request type: string initiated: description: RFC3339 datetime of when this update was requested type: string requested_version: description: Version of the firmware that was requested to be installed type: string updates: type: array items: $ref: '#/components/schemas/DeviceDfuStateMachineNode' DeviceDfuStateMachineNode: description: Represents a single request to update the host or Notecard firmware type: object properties: datetime: description: RFC3339 compatible datetime of when this status update happened type: string description: description: Additional information type: string phase: description: Phase for this step in the firmware update process type: string status: description: Status for this step in the firmware update process type: string DeviceDfuStatus: type: object properties: current: description: Description of the current firmware type: object properties: builder: description: Firmware author type: string built: description: Firmware build date type: string description: description: Firmware description type: string organization: description: Firmware organization type: string product: description: Firmware product type: string version: description: Firmware version type: string device_uid: description: Device UID type: string dfu_in_progress: description: true if there is a DFU currently in progress type: boolean status: $ref: '#/components/schemas/DeviceDfuStateMachine' DeviceDfuStatusPage: type: object properties: devices: type: array items: $ref: '#/components/schemas/DeviceDfuStatus' has_more: type: boolean default: false DeviceSession: type: object properties: apn: type: string bars: type: integer format: int bearer: type: string bssid: type: string cell: description: 'Cell ID where the session originated and quality ("mcc,mnc,lac,cellid")' type: string continuous: description: Was this a continuous connection? type: boolean device: description: Device UID type: string events: description: Number of events routed type: integer format: int64 failed_connects: description: Number of failed connection attempts in the prior session type: integer format: int64 fleets: description: Array of Fleet UIDs type: array items: type: string hp_cycles_data: type: integer format: int64 hp_cycles_gps: type: integer format: int64 hp_cycles_total: type: integer format: int64 hp_secs_data: type: integer format: int64 hp_secs_gps: type: integer format: int64 hp_secs_total: description: Total number of seconds in high power mode type: integer format: int64 iccid: type: string ip: type: string moved: type: integer format: int64 orientation: type: string penalty_secs: description: Number of seconds in penalty in the prior session type: integer format: int64 period: $ref: '#/components/schemas/DeviceUsage' power_charging: type: boolean power_mah: type: number format: double power_primary: type: boolean power_usb: type: boolean product: description: Product UID type: string rat: type: string rsrp: type: integer format: int rsrq: type: integer format: int rssi: type: integer format: int scan: type: string format: byte session: description: Session UID type: string session_began: description: UNIX timestamp of session start type: integer format: int64 session_ended: description: UNIX timestamp of session end type: integer format: int64 sinr: type: integer format: int sn: description: Device Serial Number type: string ssid: type: string temp: type: number format: double tls: description: Was TLS used? type: boolean tower: $ref: '#/components/schemas/TowerLocation' transport: description: Type of network transport type: string tri: $ref: '#/components/schemas/TowerLocation' triangulate: type: object usage_actual: type: boolean voltage: type: number format: double when: description: Last known capture time of a note routed through this session in Unix timestamp type: integer format: int64 where: description: Open Location Code from last GPS location type: string where_country: type: string where_lat: type: number format: double where_location: type: string where_lon: type: number format: double where_timezone: type: string where_when: description: Unix timestamp of last GPS location type: integer format: int64 why_session_closed: description: Reason for session closing type: string why_session_opened: description: Reason for session opening type: string work: description: Unix timestamp of the last time work was done for this session type: integer format: int64 DeviceUsage: type: object properties: bytes_rcvd: type: integer format: int64 bytes_rcvd_secondary: type: integer format: int64 bytes_sent: type: integer format: int64 bytes_sent_secondary: type: integer format: int64 duration: description: Duration in seconds type: integer format: int64 notes_rcvd: type: integer format: int64 notes_sent: type: integer format: int64 sessions_tcp: type: integer format: int64 sessions_tls: type: integer format: int64 since: description: Unix timestamp type: integer format: int64 DfuActionRequest: type: object properties: filename: description: The name of the firmware file type: string EmailNotification: type: object properties: email: description: Email Address type: string example: example@blues.com Empty: type: object properties: {} EnvTreeJsonNode: type: object properties: app_label: type: string app_uid: type: string children: type: array items: $ref: '#/components/schemas/EnvTreeJsonNode' device_uid: type: string fleet_label: type: string fleet_uid: type: string inherited_var_count: type: integer type: type: string url: type: string format: uri var_count: type: integer variables: type: array items: $ref: '#/components/schemas/EnvVar' required: - var_count - inherited_var_count - type - variables - children EnvVar: type: object properties: key: type: string precedence: type: integer used: type: boolean value: type: string EnvironmentVariables: type: object properties: environment_variables: type: object additionalProperties: type: string required: - environment_variables Error: type: object properties: code: description: The HTTP error code associated with the error. type: integer maximum: 599 minimum: 300 debug: type: string details: type: object err: description: Human readable error message. type: string request: type: string status: description: Machine readable representation of the HTTP error code. type: string required: - err - code - status Event: type: object properties: app: description: App UID (globally unique) type: string bars: description: Bars. Only available on _session.qo events. type: number best_country: description: Country type: string best_id: description: 'The device serial number, or the DeviceUID if the serial number is not set' type: string best_lat: description: Latitude type: number format: double best_location: description: Location type: string best_location_type: description: 'One of "gps", "triangulated", or "tower"' type: string best_location_when: description: Unix timestamp type: number best_lon: description: Longitude type: number format: double best_timezone: description: Timezone type: string body: description: A JSON object containing event details type: object bssid: description: BSSID. Only available on _session.qo events. type: string device: description: Device UID (globally unique) type: string environment: description: Routed environment variables beginning with "$". Only available on _session.qo events. type: object event: description: Event UID (globally unique) type: string file: description: The notefile associated with this event type: string moved: description: The number of times the device was sensed to have moved between the last session and this session. Only available on _session.qo events. type: number note: description: The note ID in the notefile type: string ordering_code: description: Ordering code. Only available on _session.qo events. type: string orientation: description: The orientation of the device. Only available on _session.qo events. type: string payload: description: A base64-encoded binary payload type: string product: description: Product UID (globally unique) type: string rat: description: Rat. Only available on _session.qo events. type: string received: description: The unix timestamp when the event was received type: number format: double req: description: The notecard request type: string rsrp: description: RSRP. Only available on _session.qo events. type: number rsrq: description: RSRQ. Only available on _session.qo events. type: number rssi: description: Received Signal Strength Indicator (RSSI) is an estimated measurement of how well a device can receive signals. Only available on _session.qo events. type: number session: description: Session UID (globally unique) type: string sinr: description: SINR. Only available on _session.qo events. type: number sku: description: SKU. Only available on _session.qo events. type: string sn: description: The device serial number type: string ssid: description: SSID. Only available on _session.qo events. type: string temp: description: Device temperature. Only available on _session.qo events. type: number format: double tls: description: Whether TLS was used on the connection between the device and notehub. Only available on _session.qo events. type: boolean tower_country: description: Country type: string tower_id: description: Tower ID type: string tower_lat: description: Latitude type: number format: double tower_location: description: Location type: string tower_lon: description: Longitude type: number format: double tower_timezone: description: Timezone type: string tower_when: description: Unix timestamp type: number transport: description: 'The transport used for this event, e.g., "cellular", "wifi", ", etc.' type: string tri_country: description: Country type: string tri_lat: description: Latitude type: number format: double tri_location: description: Location type: string tri_lon: description: Longitude type: number format: double tri_points: description: Triangulation points type: number tri_timezone: description: Timezone type: string tri_when: description: Unix timestamp type: number updates: type: number voltage: description: Device voltage. Only available on _session.qo events. type: number format: double when: description: When the event was captured on the device type: number where_country: description: Country type: string where_lat: description: Latitude type: number format: double where_location: description: Location type: string where_lon: description: Longitude type: number format: double where_olc: description: Open Location Code type: string where_timezone: description: Timezone type: string where_when: description: Unix timestamp type: number Filter: description: | Filter applied to route data. Controls which notefiles are sent through the route. type: object properties: files: description: List of notefile names or patterns to filter on. type: array items: type: string example: - env.qo - motion.qo system_notefiles: description: Whether system notefiles should be included. type: boolean example: false type: description: Type of filter to apply (corresponds to `hublib.NotefileFilterType`). type: string example: inclusion Firmware: type: object properties: builder: type: string built: type: string firmware: type: string org: type: string product: type: string target: type: string ver_build: type: integer ver_major: type: integer ver_minor: type: integer ver_patch: type: integer version: type: string nullable: true FirmwareInfo: type: object properties: built: description: The date the firmware was built. type: string created: description: The date the firmware was created. type: string description: description: A description of the firmware. type: string filename: description: The name of the firmware file. type: string info: description: User-defined metadata type: object md5: description: The MD5 hash of the firmware file. type: string notes: description: User-defined notes type: string organization: description: The organization that owns the firmware. type: string product: description: The product that the firmware is for. type: string published: description: True if the firmware is published. type: boolean tags: description: A list of tags associated with the firmware. type: string target: description: The target device for the firmware. type: string type: description: The type of firmware. type: string version: description: The version of the firmware. type: string Fleet: type: object properties: connectivity_assurance: $ref: '#/components/schemas/FleetConnectivityAssurance' created: description: RFC3339 timestamp in UTC type: string format: date-time environment_variables: description: The environment variables for this device that have been set using the Notehub API or UI. type: object additionalProperties: type: string label: description: Fleet label type: string smart_rule: $ref: '#/components/schemas/FleetRule' smart_rule_enabled: type: boolean uid: description: Fleet UID type: string watchdog_mins: description: A watchdog timer is used to generate an event every N minutes of inactivity. 0 means no watchdog type: integer format: int64 required: - uid - label - created FleetConnectivityAssurance: type: object properties: enabled: description: Whether Connectivity Assurance is enabled for this fleet type: boolean nullable: true example: 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.' type: string properties: {} FleetsUIDList: type: array items: type: string properties: {} GetProjectSecretsResponse: type: object properties: secrets: type: array items: $ref: '#/components/schemas/ProjectSecret' required: - secrets GoogleRoute: type: object properties: filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string throttle_ms: type: integer timeout: type: integer token: type: string transform: $ref: '#/components/schemas/RouteTransformSettings' url: type: string format: uri additionalProperties: false HttpRoute: type: object properties: disable_http_headers: type: boolean filter: $ref: '#/components/schemas/Filter' fleets: description: 'If non-empty, applies only to the listed fleets.' type: array items: type: string http_headers: type: object additionalProperties: type: string throttle_ms: type: integer timeout: type: integer transform: $ref: '#/components/schemas/RouteTransformSettings' url: type: string format: uri additionalProperties: false JSONata: type: object properties: {} Job: type: object properties: created: description: Unix timestamp when job was created type: integer format: int64 created_by: description: User who created the job type: string 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 required: - job_uid - 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 - job_name - status - dry_run - submitted_by - submitted - updated Location: type: object properties: country: type: string latitude: type: number format: double longitude: type: number format: double name: type: string timezone: type: string when: type: string nullable: true required: - when - name - country - timezone - latitude - longitude Monitor: type: object properties: aggregate_function: description: 'Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]' type: string enum: - none - sum - average - max - min aggregate_window: 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]$' alert: description: 'If true, the monitor is in alert state.' type: boolean alert_routes: type: array items: oneOf: - $ref: '#/components/schemas/SlackWebHookNotification' - $ref: '#/components/schemas/SlackBearerNotification' - $ref: '#/components/schemas/EmailNotification' 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]' type: string enum: - greater_than - greater_than_or_equal_to - less_than - less_than_or_equal_to - equal_to - not_equal_to - count description: type: string disabled: description: 'If true, the monitor will not be evaluated.' type: boolean fleet_filter: type: array items: type: string last_routed_at: description: The last time the monitor was evaluated and routed. type: string name: type: string notefile_filter: type: array 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.' 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]$' silenced: 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.' type: string example: body.temperature source_type: description: The type of source to monitor. Supported values are "event" and "heartbeat". type: string enum: - event - heartbeat threshold: description: The type of condition to apply to the value selected by the source_selector 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: broker: type: string certificate: type: string certificate_name: type: string client_id: type: string filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string key: type: string password: type: string format: password port: type: string private_key_name: type: string throttle_ms: type: integer timeout: type: integer topic: type: string transform: $ref: '#/components/schemas/RouteTransformSettings' username: type: string additionalProperties: false Note: type: object properties: body: description: Arbitrary user-defined JSON for the note. type: object additionalProperties: true edge: description: True if originated from an edge source. type: boolean id: description: 'Note name/identifier (e.g., "1:435", "my_note").' type: string payload: description: Optional base64-encoded payload. type: string format: byte pending: description: True if the note is pending delivery or processing. type: boolean time: description: Unix epoch seconds. type: integer format: int64 where: description: Optional location/metadata string. type: string required: - id - body - time NoteInput: type: object properties: body: description: Arbitrary user-defined JSON for the note. type: object additionalProperties: true payload: description: Optional base64-encoded payload. type: string format: byte Notefile: type: object properties: id: description: 'Notefile id (e.g., "test.qi", "config.db").' type: string notes: type: array items: $ref: '#/components/schemas/Note' minItems: 0 template: type: string required: - id - notes NotefileList: description: 'Array of notefiles, each containing its notes.' type: array items: $ref: '#/components/schemas/Notefile' properties: {} NotefileSchema: type: object properties: notefile: type: string properties: type: array items: $ref: '#/components/schemas/SchemaProperty' required: - notefile - properties NotehubRoute: description: Route resource as stored/returned by the server. type: object properties: aws: $ref: '#/components/schemas/AwsRoute' azure: $ref: '#/components/schemas/AzureRoute' blynk: $ref: '#/components/schemas/BlynkRoute' datacake: $ref: '#/components/schemas/DatacakeRoute' disabled: type: boolean default: false google: $ref: '#/components/schemas/GoogleRoute' http: $ref: '#/components/schemas/HttpRoute' label: type: string modified: type: string format: date-time readOnly: true mqtt: $ref: '#/components/schemas/MqttRoute' notes: description: Optional free-form text for annotating the route. type: string maxLength: 1024 proxy: $ref: '#/components/schemas/ProxyRoute' qubitro: $ref: '#/components/schemas/QubitroRoute' radnote: $ref: '#/components/schemas/RadRoute' s3archive: $ref: '#/components/schemas/S3ArchiveRoute' slack: $ref: '#/components/schemas/SlackRoute' snowflake: $ref: '#/components/schemas/SnowflakeRoute' snowpipe_streaming: $ref: '#/components/schemas/SnowpipeStreamingRoute' thingworx: $ref: '#/components/schemas/ThingworxRoute' twilio: $ref: '#/components/schemas/TwilioRoute' type: description: Mirrors hublib.RouteType. type: string uid: type: string readOnly: true additionalProperties: false NotehubRouteSummary: type: object properties: disabled: type: boolean default: false label: type: string default: success route modified: type: string format: date-time readOnly: true type: type: string default: http uid: type: string default: 'route:8d65a087d5d290ce5bdf03aeff2becc0' OAuth2Error: type: object properties: error: description: RFC 6749 error code. type: string enum: - invalid_request - invalid_client - invalid_grant - unauthorized_client - unsupported_grant_type - invalid_scope error_description: description: Human-readable explanation of the error. type: string required: - error OAuth2TokenResponse: type: object properties: access_token: description: The issued access token type: string expires_in: description: Lifetime in seconds of the access token. type: integer example: 1799 scope: description: Granted scopes (space-delimited). type: string example: openid token_type: description: Usually 'bearer' type: string example: bearer required: - access_token - token_type - expires_in Organization: type: object properties: name: type: string role: $ref: '#/components/schemas/OrganizationRole' uid: type: string required: - uid - name - role OrganizationRole: type: string properties: {} enum: - org_admin - billing_manager - project_creator - org_member x-enum-varnames: - ORG_ROLE_ADMIN - ORG_ROLE_BILLING_MANAGER - ORG_ROLE_PROJECT_CREATOR - ORG_ROLE_MEMBER PersonalAccessToken: type: object properties: created_at: description: When the key was created type: string format: date-time created_by: description: The user that created this key type: object properties: email: type: string name: type: string uid: type: string description: description: Optional description for this API Key type: string expires_at: description: When the key expires type: string format: date-time nullable: true last_used: description: 'When it was last used, if ever' type: string format: date-time nullable: true name: description: Name for this API Key type: string suspended: description: 'if true, this token cannot be used' type: boolean uid: description: Unique and public identifier type: string PersonalAccessTokenInfo: type: object properties: description: type: string expires_at: description: New expiration timestamp for the personal access token type: string format: date-time nullable: true name: type: string suspended: description: 'if true, the token is temporarily suspended' type: boolean required: - expiresAt PersonalAccessTokenSecret: type: object properties: secret: description: The secret type: string uid: description: Unique and public identifier type: string Product: type: object properties: auto_provision_fleets: type: array items: type: string nullable: true disable_devices_by_default: type: boolean label: type: string uid: type: string required: - uid - label - disable_devices_by_default Project: type: object properties: administrative_contact: $ref: '#/components/schemas/Contact' created: type: string format: date-time label: type: string role: $ref: '#/components/schemas/Role' technical_contact: $ref: '#/components/schemas/Contact' uid: type: string required: - uid - label - created ProjectMember: type: object properties: email: description: | The email address of the project member. This property will only be populated if the viewer is an owner of the project. type: string name: type: string role: $ref: '#/components/schemas/Role' required: - 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: alias: type: string fleets: type: array items: type: string http_headers: type: object additionalProperties: type: string timeout: type: integer transform: $ref: '#/components/schemas/RouteTransformSettings' url: type: string format: uri additionalProperties: false QubitroRoute: type: object properties: filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string project_id: type: string throttle_ms: type: integer timeout: type: integer transform: $ref: '#/components/schemas/RouteTransformSettings' webhook_signing_key: type: string additionalProperties: false RadRoute: type: object properties: client_id: type: string client_secret: type: string format: password data_feed_key: type: string event_id: type: integer fleets: type: array items: type: string test_api: type: boolean throttle_ms: type: integer additionalProperties: false Repository: type: object properties: fleet_uids: $ref: '#/components/schemas/FleetsUIDList' name: description: repository name type: string project_uids: $ref: '#/components/schemas/AppUIDList' 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: {} enum: - owner - developer - viewer - support - null nullable: true RouteLog: type: object properties: attn: description: 'If true, an error was returned when routing' type: boolean date: description: The date of the logs. type: string duration: description: The duration of the route in milliseconds type: integer event_uid: description: The event UID. type: string route_uid: description: The route UID. type: string status: description: The status of the event. type: string text: description: The response body of the route. type: string url: description: The URL of the route. type: string RouteTransformSettings: description: | Settings for transforming route payloads before delivery. Supports format selection and JSONata-based transformations. type: object properties: format: description: 'Output format for transformed data (e.g., "json", "xml", "text").' type: string example: json jsonata: description: JSONata expression used to transform the data payload (outgoing). type: string example: $.body.data jsonata_in: description: JSONata expression used to transform the data payload (incoming). type: string example: $.body.data S3ArchiveRoute: type: object properties: archive_count_exceeds: type: integer archive_every_mins: type: integer archive_id: type: string bucket_endpoint: type: string bucket_name: type: string bucket_region: type: string file_access: type: string file_folder: type: string file_format: type: string filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string key_id: type: string key_secret: type: string throttle_ms: type: integer timeout: type: integer transform: $ref: '#/components/schemas/RouteTransformSettings' url: type: string format: uri additionalProperties: false SatelliteDataUsage: type: object properties: bytes_remaining: description: Bytes remaining in the plan type: integer format: int64 example: 18600 bytes_total: description: Total bytes included in the plan type: integer format: int64 example: 10000 bytes_used: description: Bytes used to date type: integer format: int64 example: 49 bytes_used_billable: description: Billable bytes used to date type: integer format: int64 example: 50 required: - bytes_total - bytes_used - bytes_used_billable - bytes_remaining SatellitePlan: type: object properties: activated: description: Activation date of the satellite plan as Unix timestamp type: integer format: int64 example: 1609459200 last_session_at: description: When this Starnote last had a session type: integer format: int64 example: 1808675309 minimum_billable_bytes: description: Minimum billable bytes type: integer format: int64 example: 50 ntn_provider: description: Non-Terrestrial Network provider name type: string example: Skylo psid: description: Provider-specific identifier for the satellite subscription type: string example: 'skylo:5746354465786' satellite_data_usage: $ref: '#/components/schemas/SatelliteDataUsage' nullable: true required: - ntn_provider - psid - activated - cumulative_billable_bytes SchemaProperty: type: object properties: items: description: Used if type is array type: array items: $ref: '#/components/schemas/SchemaProperty' name: description: Name of the field (optional for array/object children) type: string properties: description: Used if type is object type: array items: $ref: '#/components/schemas/SchemaProperty' type: type: string enum: - string - number - boolean - array - object updated_at: type: string format: date-time required: - type - updatedAt SimUsage: type: object properties: iccid: description: ICCID of the SIM card type: string last_updated: description: Time this usage information was last updated type: integer format: int64 lifetime_used: description: Total number of bytes used by SIM type: integer format: int64 limit: description: Limit in bytes of the SIMs current data plan type: integer format: int64 used: description: Bytes used on the SIMs current data plan type: integer format: int64 SlackBearerNotification: type: object properties: channel: description: The channel to send the message to. type: string message_type: description: text or blocks type: string enum: - text - blocks text: description: 'The text of the message, or the blocks definition' type: string token: description: The bearer token for the Slack app. type: string SlackRoute: type: object properties: bearer: type: string blocks: type: string channel: type: string filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string text: type: string throttle_ms: type: integer timeout: type: integer transform: $ref: '#/components/schemas/RouteTransformSettings' webhook_url: type: string format: uri additionalProperties: false SlackWebHookNotification: type: object properties: message_type: description: text or blocks type: string enum: - text - blocks text: description: 'The text of the message, or the blocks definition' type: string url: description: The URL of the Slack webhook. type: string SnowflakeRoute: type: object properties: account_name: type: string filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string organization_name: type: string pem: type: string private_key_name: type: string timeout: type: integer transform: $ref: '#/components/schemas/RouteTransformSettings' user_name: type: string additionalProperties: false SnowpipeStreamingRoute: type: object properties: account_name: type: string database_name: type: string filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string organization_name: type: string pem: type: string pipe_name: type: string private_key_name: type: string schema_name: type: string timeout: type: integer transform: $ref: '#/components/schemas/RouteTransformSettings' user_name: type: string additionalProperties: false ThingworxRoute: type: object properties: app_key: type: string filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string throttle_ms: type: integer timeout: type: integer transform: $ref: '#/components/schemas/RouteTransformSettings' url: type: string format: uri additionalProperties: false TowerLocation: type: object properties: c: description: Country code type: string cid: description: Cell ID type: integer l: description: Open Location Code type: string lac: description: Location Area Code type: integer lat: description: Latitude type: number format: double lon: description: Longitude type: number format: double mcc: description: Mobile Country Code type: integer mnc: description: Mobile Network Code type: integer 'n': description: Name of the location type: string source: description: The source of this location type: string time: description: Unix timestamp when this location was ascertained type: integer format: int64 towers: description: Number of triangulation points type: integer z: description: Timezone ID type: integer zone: description: Timezone name type: string TwilioRoute: type: object properties: account_sid: type: string auth_token: type: string format: password filter: $ref: '#/components/schemas/Filter' fleets: type: array items: type: string from: type: string message: type: string throttle_ms: type: integer timeout: type: integer to: type: string additionalProperties: false UpdateHostFirmwareRequest: description: | Request body for updating host firmware metadata. All fields are optional; only provided fields will be updated. type: object properties: info: description: Arbitrary JSON metadata associated with this firmware entry. type: object additionalProperties: true notes: description: Notes describing this firmware version. type: string version: description: The firmware version string. type: string UpdateProjectSecretRequest: type: object properties: value: description: 'The new secret value (encrypted at rest, never returned).' type: string required: - value UploadMetadata: type: object properties: contains: type: string crc32: type: integer created: type: integer firmware: $ref: '#/components/schemas/Firmware' found: type: string length: type: integer md5: type: string modified: type: integer name: type: string notes: type: string source: type: string tags: type: string type: type: string version: description: User-specified version string provided at time of upload type: string UsageData: type: object properties: billable_bytes_total: description: Total billable bytes (only for packet-based protocols) type: integer format: int64 downlink_bytes: type: integer format: int64 example: 524288 downlink_bytes_billable: description: Billable downlink bytes (only for packet-based protocols) type: integer format: int64 downlink_packets: description: Downlink packets (only for packet-based protocols) type: integer format: int64 period: type: string format: date-time example: '2025-07-23T00:00:00Z' total_bytes: type: integer format: int64 example: 1048576 uplink_bytes: type: integer format: int64 example: 524288 uplink_bytes_billable: description: Billable uplink bytes (only for packet-based protocols) type: integer format: int64 uplink_packets: description: Uplink packets (only for packet-based protocols) type: integer format: int64 required: - period - total_bytes UsageEventsData: type: object properties: billable_events: description: 'Events that are billable, this include all events except platform events' type: integer format: int64 example: 10 device: type: string example: 'dev:123456789012345' fleet: type: string example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' notefiles: description: Count of events per notefile. Only present when includeNotefiles=true is specified. type: object example: _log.qo: 20 customer1.qo: 1 session.qo: 50 additionalProperties: format: int64 type: integer period: type: string format: date-time 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.' type: integer format: int64 example: 15 total_days_in_period: description: 'The total number of days in this period. Useful for calculating daily averages for month period. Note that the current period will be the total number of days in the current period, including days in the future.' type: integer format: int32 total_devices: description: Total devices represented in this count type: integer format: int64 total_events: description: 'Total events the device sent to notehub, including associated notehub generated events' type: integer format: int64 example: 42 total_fw_updates: description: Number of firmware updates in this period (from _health.qo DFU events) type: integer format: int64 example: 1 nullable: true total_reboots: description: Number of device reboots in this period (from _health.qo boot events) type: integer format: int64 example: 2 nullable: true watchdog_events: description: 'Watchdog events are events generated by notehub when a watchdog timer is configured for a device to indicate is has not been online for a period of time. These events are billed but should not be used to indicate a device is active, or connected, at this time.' type: integer format: int64 example: 10 required: - period - total_events - platform_events - watchdog_events - total_devices UsageEventsResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/UsageEventsData' truncated: $ref: '#/components/schemas/UsageTruncatedField' required: - data UsageRouteLogsData: type: object properties: avg_latency_ms: description: Average routing latency in milliseconds for route logs with recorded duration type: number format: double example: 342.5 nullable: true failed_routes: type: integer format: int64 example: 4 period: type: string format: date-time example: '2025-07-23T00:00:00Z' route: description: The route UID (only present when aggregate is 'route') type: string example: 'route:cbd20093cba58392c9f9bbdd0cdeb1a0' successful_routes: type: integer format: int64 example: 38 total_routes: type: integer format: int64 example: 42 required: - period - successful_routes - failed_routes - total_routes UsageSessionsData: type: object properties: device: type: string example: 'dev:123456789012345' first_sync_sessions: description: Number of first sync sessions in this period type: integer format: int64 example: 2 fleet: type: string example: 'fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d' period: type: string format: date-time example: '2025-07-23T00:00:00Z' sessions: type: integer format: int64 example: 12 sessions_by_transport: description: 'Count of sessions grouped by transport type prefix (e.g. cell, wifi, ntn, lorawan)' type: object example: cell: 8 ntn: 1 wifi: 3 additionalProperties: format: int64 type: integer tls_sessions: description: Number of TLS sessions in this period type: integer format: int64 example: 3 nullable: true total_bytes: type: integer format: int64 example: 1048576 total_devices: type: integer format: int64 example: 1 required: - period - sessions - first_sync_sessions - total_bytes - total_devices UsageTruncatedField: description: 'If the data is truncated that means that the parameters selected resulted in a response of over | the requested limit of data points, in order to ensure' type: boolean properties: {} UserDfuStateMachine: type: object properties: created: type: string format: date-time nullable: true from_version: type: string metadata: $ref: '#/components/schemas/UploadMetadata' status: $ref: '#/components/schemas/UserDfuStateMachineStatus' UserDfuStateMachineStatus: type: object properties: date: type: string format: date-time nullable: true phase: type: string phase_description: type: string status: type: string UserFirmwareInfo: type: object properties: current_firmware: $ref: '#/components/schemas/CurrentFirmware' firmware_update: $ref: '#/components/schemas/UserDfuStateMachine' nullable: true WebhookSettings: type: object properties: disabled: description: Flag indicating if the webhook is disabled type: boolean id: description: Webhook ID type: string transform: description: Transformation to be applied to the event type: string responses: AlertsResponse: description: The response body from GET /alerts content: application/json: schema: type: object properties: alerts: description: The list of alerts type: array items: $ref: '#/components/schemas/Alert' has_more: description: True if there are more alerts type: boolean required: - alerts - has_more CancelJobRunResponse: description: Cancel operation completed content: application/json: schema: type: object properties: successful: description: True if cancellation was successful type: boolean required: - successful CreateJobResponse: description: Job created successfully content: application/json: schema: type: object properties: job_uid: description: The unique identifier for the created job type: string required: - job_uid DeleteJobResponse: description: Job deleted successfully content: application/json: schema: type: object properties: success: description: True if deletion was successful type: boolean required: - success DevicePlansResponse: description: Response body for /plans content: application/json: schema: type: object properties: cellular_plans: type: array items: $ref: '#/components/schemas/CellularPlan' nullable: true DevicesResponse: description: List of Devices content: application/json: schema: type: object properties: devices: type: array items: $ref: '#/components/schemas/Device' has_more: type: boolean required: - devices - has_more EnvironmentVariablesResponse: description: The response body from an environment variables request. content: application/json: schema: type: '' properties: {} $ref: '#/components/schemas/EnvironmentVariables' ErrorResponse: description: The response body in case of an API error. content: application/json: schema: type: '' properties: {} $ref: '#/components/schemas/Error' EventsByCursorResponse: description: The response body from a GET events by cursor request. content: application/json: schema: type: object properties: events: type: array items: $ref: '#/components/schemas/Event' has_more: description: True if there are more events type: boolean next_cursor: description: | The cursor value of the next result, which is intended to be used as the "cursor" parameter value of the next call to this method. An empty string is returned if there are no more results after this results set. type: string required: - events - next_cursor - has_more example: events: - app: 'app:218f6217-9f78-432e-9fe0-02ca8b5a216c' best_country: US best_id: My Device best_lat: 34.82476372 best_location: Atlanta GA best_location_type: triangulated best_location_when: 1652709545 best_lon: -83.32261614 best_timezone: America/New_York body: humidity: 40.375 pressure: 97705.66 temperature: 24.0625 voltage: 2.598 device: 'dev:5c0272311928' event: dfa3747d-688b-4250-935b-5dd60354313c file: air.qo 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' tri_country: US tri_lat: 34.82475372 tri_location: Atlanta GA tri_lon: -83.32261614 tri_points: 6 tri_timezone: America/New_York tri_when: 1652709545 updates: 1 when: 1656010061 has_more: false next_cursor: '' EventsResponse: description: The response body from a GET events request. headers: X-Has-More: description: True if there are more events schema: type: boolean content: application/json: schema: type: object properties: events: type: array items: $ref: '#/components/schemas/Event' has_more: description: True if there are more events type: boolean through: description: The UID of the last event returned type: string required: - events - has_more example: events: - app: 'app:218f6217-9f78-432e-9fe0-02ca8b5a216c' best_country: US best_id: My Device best_lat: 34.82476372 best_location: Atlanta GA best_location_type: triangulated best_location_when: 1652709545 best_lon: -83.32261614 best_timezone: America/New_York body: humidity: 40.375 pressure: 97705.66 temperature: 24.0625 voltage: 2.598 device: 'dev:5c0272311928' event: dfa3747d-688b-4250-935b-5dd60354313c file: air.qo 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' tri_country: US tri_lat: 34.82475372 tri_location: Atlanta GA tri_lon: -83.32261614 tri_points: 6 tri_timezone: America/New_York tri_when: 1652709545 updates: 1 when: 1656010061 has_more: true text/csv: schema: type: string properties: {} format: binary example: | eventUID,deviceUID,when,best_location_type,best_lat,best_lon,body.temperature,body.humidity e123456-7890-abcd-ef01-234567890abc,dev:000000000000001,1625097600,gps,37.7749,-122.4194,22.5,45.2 f234567-8901-bcde-fg12-345678901bcd,dev:000000000000002,1625097660,triangulated,40.7128,-74.0060,24.3,48.7 g345678-9012-cdef-gh23-456789012cde,dev:000000000000003,1625097720,tower,51.5074,-0.1278,20.1,52.9 FleetsResponse: description: The response body from a fleets endpoint. content: application/json: schema: type: object properties: fleets: type: array items: $ref: '#/components/schemas/Fleet' required: - fleets GetDeviceEnvironmentVariablesResponse: description: The response body from a get device environment variables request. content: application/json: schema: type: object properties: environment_variables: description: The environment variables for this device that have been set using host firmware or the Notehub API or UI. type: object 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.' type: object additionalProperties: type: string environment_variables_env_default: description: The environment variables that have been set using the env.default request through the Notecard API. type: object additionalProperties: type: string required: - environment_variables - environment_variables_env_default GetJobResponse: description: Batch job details content: application/json: schema: type: '' properties: {} $ref: '#/components/schemas/JobDetail' GetJobRunResponse: description: Job run details content: application/json: schema: type: '' properties: {} $ref: '#/components/schemas/JobRun' GetJobRunsResponse: description: List of job runs content: application/json: schema: type: object properties: runs: type: array items: $ref: '#/components/schemas/JobRun' required: - runs GetJobsResponse: description: List of batch jobs content: application/json: schema: type: object properties: jobs: type: array items: $ref: '#/components/schemas/Job' required: - jobs 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: application/json: schema: type: object properties: latest_events: description: The set of latest events. Will always include the current "session.begin" event. type: array items: $ref: '#/components/schemas/Event' example: latest_events: - app: 'app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446' body: why: sensors.qo requested sync (sensors.qo) (TLS) device: 'dev:864475040523995' event: 81bd2bf1-0399-4978-bc46-8f779b4af350 file: _session.qo 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_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' body: humid: 56.23 temp: 35.5 device: 'dev:864475040523995' event: 916d4c81-06ae-4263-9b55-7a3a0f73cb5a file: data.qo 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_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' body: humidity: 69.88647200683693 pressure: 993.6294496104914 temp: 21.273027181770885 device: 'dev:864475040523995' event: e98c2c3b-edbe-4fe7-af57-2196cc843eb7 file: sensors.qo 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_lat: 43.747037500000005 tower_location: Waverly MI tower_lon: -83.665859375 tower_timezone: America/Detroit tower_when: 1669667689 when: 1669667695 MonitorsResponse: description: The response body from GET /monitors content: application/json: schema: type: array items: $ref: '#/components/schemas/Monitor' properties: {} required: - monitors NoteResponse: description: The response body from a note endpoint. content: application/json: schema: type: object properties: template: description: true when a template is active on the Notefile. type: boolean total: description: The total number of notes active on the Notefile. type: integer RunJobResponse: description: Job execution started content: application/json: schema: type: object properties: report_uid: description: Unique identifier for this job run type: string required: - report_uid SessionResponse: description: The response body for a session request. content: application/json: schema: type: object properties: has_more: type: boolean sessions: type: array items: $ref: '#/components/schemas/DeviceSession' required: - sessions - has_more example: has_more: true sessions: - apn: a-notehub.com.attz bars: 2 bearer: LTE FDD cell: '310,410,17169,77315594' continuous: true device: 'dev:000000000000000' events: 14 fleets: - 'fleet:46be9834-5te6-42c1-0000-b5ea05e248d7' hp_cycles_data: 3 hp_cycles_total: 3 hp_secs_data: 7659 hp_secs_total: 7659 iccid: '89011704278500000000' ip: 10.68.56.193 moved: 1667250807 orientation: face-up period: bytes_rcvd: 2501 bytes_sent: 4138 duration: 215 notes_sent: 12 sessions_tls: 1 since: 1667250832 product: 'product:com.blues.demo:project' rat: lte rsrp: -91 rsrq: -13 rssi: -61 session: d76689be-37cd-423c-b695-7e0c19a2a264 sinr: 183 temp: 24.437 tls: true tower: c: US cid: 77315594 count: 7 l: 86MG3HF5+P25 lac: 17169 lat: 43.0742625 lon: -89.44239062499999 mcc: 310 mnc: 410 'n': Shorewood Hills WI time: 1667250835 towers: 1 zone: America/Chicago tri: {} trigger: first sync; continuous connection mode voltage: 4.174 when: 1667251044 work: 1667251046 UsageDataResponse: description: Response body for Data Usage content: application/json: schema: type: object properties: data: type: array items: properties: data: type: array items: $ref: '#/components/schemas/UsageData' device: description: The device UID this usage data belongs to (only present when aggregate is 'device') type: string example: 'dev:123456789012345' 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' iccid: description: The ICCID of the cellular SIM card (only present when type is 'cellular') type: string example: '12345678901234567890' psid: description: The PSID (Packet Service ID) of the satellite (or other packet-based device) type: string example: 'skylo:5746354465786' type: description: The type of connectivity type: string enum: - cellular - satellite required: - type - data type: object truncated: $ref: '#/components/schemas/UsageTruncatedField' UsageRouteLogsResponse: description: Response body for Route Log Usage content: application/json: schema: type: object properties: route_logs: type: array items: $ref: '#/components/schemas/UsageRouteLogsData' truncated: $ref: '#/components/schemas/UsageTruncatedField' required: - route_logs UsageSessionsResponse: description: Response body for Session Usage content: application/json: schema: type: object properties: sessions: type: array items: $ref: '#/components/schemas/UsageSessionsData' truncated: $ref: '#/components/schemas/UsageTruncatedField' required: - sessions - truncated securitySchemes: personalAccessToken: description: | Use a personal access token from notehub.io/api-access scheme: bearer type: http tags: - description: Authorization operations name: authorization - description: Organization operations name: organization - description: Project operations name: project - description: Event retrieval operations name: event - description: Device operations name: device - description: Billing Account operations name: billing_account - description: Management of monitors name: monitors - description: Route operations name: route - description: Webhook APIs for non-notecard event ingestion 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' name: usage - description: Batch job operations name: jobs externalDocs: description: Find out more about Blues url: 'https://blues.io'