OpsGenie REST API v0.1.0 OpsGenieRESTAPI.Api.Contact

API calls for all endpoints tagged Contact.

Link to this section Summary

Functions

Create Contact Creates a new contact

Delete Contact Delete contact using contact id

Disable Contact Disable the contact of the user

Enable Contact Enable the contact of the user

Get Contact Returns contact with given id

List Contacts Returns list of contacts

Update Contact (Partial) Update contact of the user

Link to this section Functions

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

Create Contact Creates a new contact

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of the user to be searched
  • opts (KeywordList): [optional] Optional parameters

    • :body (CreateContactPayload): Request payload of creating contact action

Returns

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

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

Delete Contact Delete contact using contact id

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of the user to be searched
  • contact_id (String.t): Id of the contact
  • opts (KeywordList): [optional] Optional parameters

Returns

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

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

Disable Contact Disable the contact of the user

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of the user to be searched
  • contact_id (String.t): Id of the contact
  • opts (KeywordList): [optional] Optional parameters

Returns

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

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

Enable Contact Enable the contact of the user

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of the user to be searched
  • contact_id (String.t): Id of the contact
  • opts (KeywordList): [optional] Optional parameters

Returns

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

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

Get Contact Returns contact with given id

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of the user to be searched
  • contact_id (String.t): Id of the contact
  • opts (KeywordList): [optional] Optional parameters

Returns

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

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

List Contacts Returns list of contacts

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of the user to be searched
  • opts (KeywordList): [optional] Optional parameters

Returns

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

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

Update Contact (Partial) Update contact of the user

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of the user to be searched
  • contact_id (String.t): Id of the contact
  • opts (KeywordList): [optional] Optional parameters

    • :body (UpdateContactPayload): Request payload of update contact action

Returns

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