OpsGenie REST API v0.1.0 OpsGenieRESTAPI.Api.Alert

API calls for all endpoints tagged Alert.

Link to this section Summary

Functions

Acknowledge Alert Acknowledges alert with given identifier

Add Alert Attachment Add Alert Attachment to related alert

Add Details Add details to the alert with given identifier

Add Note Adds note to alert with given identifier

Add Responder Add responder to alert with given identifier

Add Tags Add tags to the alert with given identifier

Add Team Add team to alert with given identifier

Assign Alert Assign alert with given identifier

Close Alert Closes alert with given identifier

Create Alert Creates a new alert

Create Saved Search Create saved search with given fields

Delete Alert Deletes an alert using alert id, tiny id or alias

Delete Saved Search Deletes saved search using given search identifier

Escalate Alert Escalate alert with given identifier

Custom Alert Action Custom actions for the alert

Get Alert Returns alert with given id, tiny id or alias

Get Alert Attachment Get alert attachment name and url for the given identifier

Get Request Status of Alert Used to track the status and alert details (if any) of the request whose identifier is given

Get Saved Search Get saved search for the given search identifier

List Alerts Returns list of alerts

List Alert Attachments List alert attachment names and urls for related alert

List Alert Logs List alert logs for the given alert identifier

List Alert Notes List alert notes for the given alert identifier

List Alert Recipients List alert recipients for the given alert identifier

Lists Saved Searches List all saved searches

Remove Alert Attachment Remove alert attachment for the given identifier

Remove Details Remove details of the alert with given identifier

Remove Tags Remove tags of the alert with given identifier

Snooze Alert Snooze alert with given identifier

UnAcknowledge Alert UnAcknowledge alert with given identifier

Link to this section Functions

Link to this function acknowledge_alert(connection, identifier, opts \\ [])
acknowledge_alert(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}

Acknowledge Alert Acknowledges alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
    • :body (AcknowledgeAlertPayload): Request payload of acknowledging alert action

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function add_attachment(connection, identifier, file, opts \\ [])
add_attachment(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}

Add Alert Attachment Add Alert Attachment to related alert

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • file (String.t): Attachment file to be uploaded
  • opts (KeywordList): [optional] Optional parameters

    • :alert_identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
    • :user (String.t): Display name of the request owner
    • :index_file (String.t): Name of html file which will be shown when attachment clicked on UI

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function add_details(connection, identifier, body, opts \\ [])

Add Details Add details to the alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • body (AddDetailsToAlertPayload): Request payload of adding alert details action
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function add_note(connection, identifier, body, opts \\ [])

Add Note Adds note to alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • body (AddNoteToAlertPayload): Request payload of adding note to alert action
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function add_responder(connection, identifier, body, opts \\ [])

Add Responder Add responder to alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • body (AddResponderToAlertPayload): Request payload of adding responder to alert action
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function add_tags(connection, identifier, body, opts \\ [])

Add Tags Add tags to the alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • body (AddTagsToAlertPayload): Request payload of creating alert tags action
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function add_team(connection, identifier, body, opts \\ [])

Add Team Add team to alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • body (AddTeamToAlertPayload): Request payload of adding team to alert action
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function assign_alert(connection, identifier, body, opts \\ [])

Assign Alert Assign alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • body (AssignAlertPayload): Request payload of assigning alert action
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function close_alert(connection, identifier, opts \\ [])

Close Alert Closes alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
    • :body (CloseAlertPayload): Request payload of closing alert action

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function create_alert(connection, body, opts \\ [])

Create Alert Creates a new alert

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • body (CreateAlertPayload): Request payload of created alert
  • opts (KeywordList): [optional] Optional parameters

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function create_saved_searches(connection, body, opts \\ [])

Create Saved Search Create saved search with given fields

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • body (CreateSavedSearchPayload): Request payload of creating saved search
  • opts (KeywordList): [optional] Optional parameters

Returns

{:ok, %OpsGenieRESTAPI.Model.CreateSavedSearchResponse{}} on success {:error, info} on failure

Link to this function delete_alert(connection, identifier, opts \\ [])
delete_alert(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}

Delete Alert Deletes an alert using alert id, tiny id or alias

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
    • :user (String.t): Display name of the request owner
    • :source (String.t): Display name of the request source

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function delete_saved_search(connection, identifier, opts \\ [])
delete_saved_search(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}

Delete Saved Search Deletes saved search using given search identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of the saved search which could be 'id' or 'name'
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', or 'name'

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function escalate_alert(connection, identifier, body, opts \\ [])

Escalate Alert Escalate alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • body (EscalateAlertToNextPayload): Request payload of escalating alert action
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function execute_custom_alert_action(connection, identifier, action_name, opts \\ [])
execute_custom_alert_action(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword()
) :: {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}

Custom Alert Action Custom actions for the alert

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • action_name (String.t): Name of the action to execute
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
    • :body (ExecuteCustomAlertActionPayload): Request payload of executing custom alert action

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function get_alert(connection, identifier, opts \\ [])

Get Alert Returns alert with given id, tiny id or alias

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'

Returns

{:ok, %OpsGenieRESTAPI.Model.GetAlertResponse{}} on success {:error, info} on failure

Link to this function get_attachment(connection, identifier, attachment_id, opts \\ [])

Get Alert Attachment Get alert attachment name and url for the given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • attachment_id (integer()): Identifier of alert attachment
  • opts (KeywordList): [optional] Optional parameters

    • :alert_identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'

Returns

{:ok, %OpsGenieRESTAPI.Model.GetAlertAttachmentResponse{}} on success {:error, info} on failure

Link to this function get_request_status(connection, request_id, opts \\ [])
get_request_status(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, OpsGenieRESTAPI.Model.GetRequestStatusResponse.t()}
  | {:error, Tesla.Env.t()}

Get Request Status of Alert Used to track the status and alert details (if any) of the request whose identifier is given

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • request_id (String.t): Universally unique identifier of the questioned request
  • opts (KeywordList): [optional] Optional parameters

Returns

{:ok, %OpsGenieRESTAPI.Model.GetRequestStatusResponse{}} on success {:error, info} on failure

Link to this function get_saved_search(connection, identifier, opts \\ [])

Get Saved Search Get saved search for the given search identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of the saved search which could be 'id' or 'name'
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', or 'name'

Returns

{:ok, %OpsGenieRESTAPI.Model.GetSavedSearchResponse{}} on success {:error, info} on failure

Link to this function list_alerts(connection, opts \\ [])

List Alerts Returns list of alerts

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

    • :query (String.t): Search query to apply while filtering the alerts
    • :search_identifier (String.t): Identifier of the saved search query to apply while filtering the alerts
    • :search_identifier_type (String.t): Identifier type of the saved search query. Possible values are 'id', or 'name'
    • :offset (integer()): Start index of the result set (to apply pagination). Minimum value (and also default value) is 0
    • :limit (integer()): Maximum number of items to provide in the result. Must be a positive integer value. Default value is 20 and maximum value is 100
    • :sort (String.t): Name of the field that result set will be sorted by
    • :order (String.t): Sorting order of the result set

Returns

{:ok, %OpsGenieRESTAPI.Model.ListAlertsResponse{}} on success {:error, info} on failure

Link to this function list_attachments(connection, identifier, opts \\ [])

List Alert Attachments List alert attachment names and urls for related alert

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • opts (KeywordList): [optional] Optional parameters

    • :alert_identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'

Returns

{:ok, %OpsGenieRESTAPI.Model.ListAlertAttachmentsResponse{}} on success {:error, info} on failure

Link to this function list_logs(connection, identifier, opts \\ [])

List Alert Logs List alert logs for the given alert identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
    • :offset (String.t): Starting value of the offset property
    • :direction (String.t): Page direction to apply for the given offset with 'next' and 'prev'
    • :limit (integer()): Maximum number of items to provide in the result. Must be a positive integer value. Default value is 20 and maximum value is 100
    • :order (String.t): Sorting order of the result set

Returns

{:ok, %OpsGenieRESTAPI.Model.ListAlertLogsResponse{}} on success {:error, info} on failure

Link to this function list_notes(connection, identifier, opts \\ [])

List Alert Notes List alert notes for the given alert identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
    • :offset (String.t): Starting value of the offset property
    • :direction (String.t): Page direction to apply for the given offset with 'next' and 'prev'
    • :limit (integer()): Maximum number of items to provide in the result. Must be a positive integer value. Default value is 20 and maximum value is 100
    • :order (String.t): Sorting order of the result set

Returns

{:ok, %OpsGenieRESTAPI.Model.ListAlertNotesResponse{}} on success {:error, info} on failure

Link to this function list_recipients(connection, identifier, opts \\ [])

List Alert Recipients List alert recipients for the given alert identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'

Returns

{:ok, %OpsGenieRESTAPI.Model.ListAlertRecipientsResponse{}} on success {:error, info} on failure

Link to this function list_saved_searches(connection, opts \\ [])
list_saved_searches(Tesla.Env.client(), keyword()) ::
  {:ok, OpsGenieRESTAPI.Model.ListSavedSearchesResponse.t()}
  | {:error, Tesla.Env.t()}

Lists Saved Searches List all saved searches

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

Returns

{:ok, %OpsGenieRESTAPI.Model.ListSavedSearchesResponse{}} on success {:error, info} on failure

Link to this function remove_attachment(connection, identifier, attachment_id, opts \\ [])
remove_attachment(Tesla.Env.client(), String.t(), integer(), keyword()) ::
  {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}

Remove Alert Attachment Remove alert attachment for the given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • attachment_id (integer()): Identifier of alert attachment
  • opts (KeywordList): [optional] Optional parameters

    • :alert_identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
    • :user (String.t): Display name of the request owner

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function remove_details(connection, identifier, keys, opts \\ [])
remove_details(Tesla.Env.client(), String.t(), [String.t()], keyword()) ::
  {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}

Remove Details Remove details of the alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • keys ([String.t]): Comma separated list of keys to remove from the custom properties of the alert (e.g. 'key1,key2')
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
    • :user (String.t): Display name of the request owner
    • :note (String.t): Additional alert note to add
    • :source (String.t): Display name of the request source

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function remove_tags(connection, identifier, tags, opts \\ [])

Remove Tags Remove tags of the alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • tags ([String.t]): Tags field of the given alert as comma seperated values (e.g. 'tag1, tag2')
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
    • :user (String.t): Display name of the request owner
    • :note (String.t): Additional alert note to add
    • :source (String.t): Display name of the request source

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function snooze_alert(connection, identifier, body, opts \\ [])

Snooze Alert Snooze alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • body (SnoozeAlertPayload): Request payload of snoozing alert action
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function un_acknowledge_alert(connection, identifier, opts \\ [])
un_acknowledge_alert(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}

UnAcknowledge Alert UnAcknowledge alert with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of alert which could be alert id, tiny id or alert alias
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
    • :body (UnAcknowledgeAlertPayload): Request payload of unacknowledging alert action

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure