OpsGenie REST API v0.1.0 OpsGenieRESTAPI.Api.User

API calls for all endpoints tagged User.

Link to this section Summary

Functions

Create User Creates a user with the given payload

Delete User Delete user with the given identifier

Get User Get user for the given identifier

List User Escalations List escalations of the user for the given identifier

List User Forwarding Rules List user forwarding rules for the given user identifier

List User Schedules List schedules of the user for the given identifier

List User Teams List user teams for the given user identifier

List users List users with given parameters

Update User (Partial) Update user with the given identifier

Link to this section Functions

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

Create User Creates a user with the given payload

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • body (CreateUserPayload): Request payload of the user object
  • opts (KeywordList): [optional] Optional parameters

Returns

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

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

Delete User Delete user with the given identifier

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.SuccessResponse{}} on success {:error, info} on failure

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

Get User Get user for the given identifier

Parameters

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

    • :expand ([String.t]): Comma separated list of strings to create a more detailed response. The only expandable field for user api is 'contact'

Returns

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

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

List User Escalations List escalations of the user for the given identifier

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.ListUserEscalationsResponse{}} on success {:error, info} on failure

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

List User Forwarding Rules List user forwarding rules for the given user identifier

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.ListUserForwardingRulesResponse{}} on success {:error, info} on failure

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

List User Schedules List schedules of the user for the given identifier

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.ListUserSchedulesResponse{}} on success {:error, info} on failure

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

List User Teams List user teams for the given user identifier

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.ListUserTeamsResponse{}} on success {:error, info} on failure

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

List users List users with given parameters

Parameters

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

    • :limit (integer()): Number of users to retrieve
    • :offset (integer()): Number of users to skip from start
    • :sort_field (String.t): Field to use in sorting. Should be one of 'username', 'fullName' and 'insertedAt'
    • :order (String.t): Direction of sorting. Should be one of 'asc' or 'desc'
    • :query (String.t): Field:value combinations with most of user fields to make more advanced searches. Possible fields are username, fullName, blocked, verified, role, locale, timeZone, userAddress and createdAt

Returns

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

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

Update User (Partial) Update user with the given identifier

Parameters

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

    • :body (UpdateUserPayload): Request payload of the user object

Returns

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