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 alert API version: 1.2.0 servers: - description: Production server url: https://api.notefile.net tags: - name: alert paths: /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 components: parameters: pageSizeParam: in: query name: pageSize required: false schema: type: integer default: 50 maximum: 10000 minimum: 1 pageNumParam: in: query name: pageNum required: false schema: type: integer default: 1 minimum: 1 monitorUIDQueryParam: explode: true in: query name: monitorUID required: false schema: type: string style: form projectOrProductUIDParam: example: app:2606f411-dea6-44a0-9743-1130f57d77d8 in: path name: projectOrProductUID required: true schema: type: string responses: ErrorResponse: description: The response body in case of an API error. content: application/json: schema: type: '' properties: {} $ref: '#/components/schemas/Error' 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 schemas: 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 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 securitySchemes: personalAccessToken: description: 'Use a personal access token from notehub.io/api-access ' scheme: bearer type: http externalDocs: description: Find out more about Blues url: https://blues.io