Skip to content

Alerts (Deprecated)

class _incydr_sdk.alerts.client.AlertsV1(parent)

Client for /v1/alerts endpoints.

Usage example:

>>> import incydr
>>> from incydr.enums.alerts import AlertState
>>> client = incydr.Client(**kwargs)
>>> client.alerts.v1.change_state("<alert_id>", AlertState.RESOLVED)
add_note(self, alert_id, note)

Add a note to an alert.

Parameters:

  • alert_id: List[str] (required) -

Returns: A Response object indicating success.

change_state(self, alert_ids, state, note=None)

Change the state of a set of alerts (and optionally add note indicating reason for change in the same request).

Parameters:

  • alert_id: str | List[str] (required) - ID or list of IDs of the alert(s) to update.
  • state: AlertState (required) - State to set alert(s) to.
  • note: str - Optional note text.

Returns: A Response object indicating success.

get_details(self, alert_ids)

Get full details for a set of alerts.

The query-details endpoint accepts a maximum of 100 ids per request, if alert_ids is > 100, multiple requests will be made and results will be combined into a single list.

Parameters:

  • alert_ids: str | List[str] (required) - Single alertId or list of alertId strings.

Returns: A list of AlertDetails objects.

iter_all(self, query)

Retrieve all alerts for a given query, automatically retrieving multiple pages if they exist.

  • query: AlertQuery (required) - The query object used to filter alerts by different fields.

Returns: A generator yielding individual AlertSummary objects.

search(self, query)

Search for alerts.

Parameters:

  • query: AlertQuery (required) - The query object to filter alerts by different fields.

Returns: An AlertQueryPage object.