Skip to content

List the company's alerts

GET /alerts
  • Scope alerts:read
  • API key x-api-key
  • Base URL https://api.hub.akuasense.com/v1

Query parameters

  • cursor string

    Opaque pagination cursor

  • limit integer
    Default: 50
  • lang string

    Language of the label fields, and of a probe’s default name (name: “Probe 3”, “Sonde 3”). The code values never vary. A crop with no translation falls back to its French name.

    Values: enfr
    Default: en

Response

200

Alerts, most recent first

  • data array of AlertListItem always present

    Moisture threshold on a module’s summary curve. Below threshold, the alert fires: an e-mail goes out to the recipients, then a reminder every day at reminderTime for as long as it is neither resolved nor acknowledged. It resolves when moisture climbs back to threshold + hysteresis.

    Show 17 attributes Hide attributes
    • id string uuid always present
    • companyId integer always present
    • moduleId integer nullable always present

      Module being watched.

    • parcelId integer nullable always present

      Parcel. ⚠️ Only a module’s measurements are evaluated: an alert with no moduleId never fires.

    • annotationId string uuid nullable always present

      The “wilting point” line the alert was born from (source: annotation). Moving the line moves the threshold; deleting it disables the alert.

    • threshold string always present

      Decimal number sent as a STRING, with no loss of precision ("11", "25.5625"): to be converted client-side.

    • hysteresis string always present

      Decimal number sent as a STRING, with no loss of precision ("11", "25.5625"): to be converted client-side.

    • reminderTime string always present

      LOCAL time of the daily reminder (HH:MM:SS), in the company’s time zone (timezone of GET /company).

    • source string always present

      manual: created directly (POST /alerts). annotation: born from a “wilting point” line.

      Values: manualannotation
    • isActive boolean always present

      false: disabled, no longer evaluated.

    • createdBy string always present

      Creator: userId of a member.

    • createdAt string date-time always present
    • updatedAt string date-time always present
    • events array of AlertEvent always present

      The last 10 events, most recent first. Full history: GET /alerts/{id}/events.

      Show 9 attributes Hide attributes
      • id string uuid always present
      • alertId string uuid always present
      • type string always present

        triggered: moisture dropped below the threshold. resolved: it climbed back to the threshold plus the hysteresis.

        Values: triggeredresolved
      • valueAtEvent string always present

        Moisture measured at that instant, %.

      • thresholdAtEvent string always present

        Threshold in force at that instant, %.

      • occurredAt string date-time always present
      • emailSent boolean always present

        The e-mail for this event went out.

      • acknowledgedAt string date-time nullable always present

        Acknowledgement (POST /alerts/{id}/ack): reminders stop. null: not acknowledged.

      • acknowledgedBy string nullable always present

        Who acknowledged: userId of a member.

    • recipients array of object always present
      Show 4 attributes Hide attributes
      • id string uuid always present
      • alertId string uuid always present
      • userId string always present

        E-mail recipient: userId of a member.

      • user object always present
        Show 5 attributes Hide attributes
        • id string always present
        • name string nullable always present
        • lastName string nullable always present
        • email string email always present
        • image string nullable always present

          Avatar URL.

    • parcel object nullable always present
      Show 2 attributes Hide attributes
      • id integer always present
      • name string always present
    • module object nullable always present
      Show 4 attributes Hide attributes
      • id integer always present
      • uid string always present
      • name string nullable always present

        Name of the probe, as on Module; the default name follows lang.

      • serialHex string nullable always present
  • next_cursor string nullable always present

    Cursor for the next page, to be passed back as is in cursor. null: last page.

Errors

  • 401

    Not authenticated

  • 403

    Insufficient scope, or resource outside your company