Skip to content

Update a threshold

PATCH /alerts/{id}
  • Scope alerts:write
  • API key x-api-key
  • Base URL https://api.hub.akuasense.com/v1

Only the fields sent are changed.

Path parameters

  • id string uuid required

Headers

  • Idempotency-Key string

    Replays the same 2xx response (24 h)

Request body

  • threshold number

    Threshold, in % volumetric moisture.

  • hysteresis number

    Resolution margin, in percentage points.

  • reminderTime string

    Local time of the daily reminder (HH:MM:SS).

  • isActive boolean

    false disables the alert, true re-enables it.

Response

200

Alert updated

  • 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

    Threshold, in % volumetric moisture.

  • hysteresis string always present

    Resolution margin, in percentage points: the alert resolves at threshold + hysteresis.

  • 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

Errors

  • 400

    Invalid body

  • 401

    Not authenticated

  • 403

    Insufficient scope/role, or outside your company