opsgenie_sdk

OpsgenieSdk - the Ruby gem for the Opsgenie REST API

Opsgenie OpenAPI Specification

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 2.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build opsgenie_sdk.gemspec

Then either install the gem locally:

gem install ./opsgenie_sdk-1.0.0.gem

(for development, run gem install --dev ./opsgenie_sdk-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'opsgenie_sdk', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/kwent/opsgenie_sdk, then add the following in the Gemfile:

gem 'opsgenie_sdk', :git => 'https://github.com/kwent/opsgenie_sdk.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'opsgenie_sdk'

# Setup authorization
OpsgenieSdk.configure do |config|
  # Configure API key authorization: GenieKey
  config.api_key['Authorization'] = 'YOUR API KEY'
  config.api_key_prefix['Authorization'] = 'GenieKey'
end

api_instance = OpsgenieSdk::AccountApi.new

begin
  #Get Account Info
  result = api_instance.get_info
  p result
rescue OpsgenieSdk::ApiError => e
  puts "Exception when calling AccountApi->get_info: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.opsgenie.com

Class Method HTTP request Description
OpsgenieSdk::AccountApi get_info GET /v2/account Get Account Info
OpsgenieSdk::AlertApi acknowledge_alert POST /v2/alerts/identifier/acknowledge Acknowledge Alert
OpsgenieSdk::AlertApi add_attachment POST /v2/alerts/identifier/attachments Add Alert Attachment
OpsgenieSdk::AlertApi add_details POST /v2/alerts/identifier/details Add Details
OpsgenieSdk::AlertApi add_note POST /v2/alerts/identifier/notes Add Note
OpsgenieSdk::AlertApi add_responder POST /v2/alerts/identifier/responders Add Responder
OpsgenieSdk::AlertApi add_tags POST /v2/alerts/identifier/tags Add Tags
OpsgenieSdk::AlertApi add_team POST /v2/alerts/identifier/teams Add Team
OpsgenieSdk::AlertApi assign_alert POST /v2/alerts/identifier/assign Assign Alert
OpsgenieSdk::AlertApi close_alert POST /v2/alerts/identifier/close Close Alert
OpsgenieSdk::AlertApi count_alerts GET /v2/alerts/count Count Alerts
OpsgenieSdk::AlertApi create_alert POST /v2/alerts Create Alert
OpsgenieSdk::AlertApi create_saved_searches POST /v2/alerts/saved-searches Create Saved Search
OpsgenieSdk::AlertApi delete_alert DELETE /v2/alerts/identifier Delete Alert
OpsgenieSdk::AlertApi delete_saved_search DELETE /v2/alerts/saved-searches/identifier Delete Saved Search
OpsgenieSdk::AlertApi escalate_alert POST /v2/alerts/identifier/escalate Escalate Alert
OpsgenieSdk::AlertApi execute_custom_alert_action POST /v2/alerts/identifier/actions/actionName Custom Alert Action
OpsgenieSdk::AlertApi get_alert GET /v2/alerts/identifier Get Alert
OpsgenieSdk::AlertApi get_attachment GET /v2/alerts/identifier/attachments/attachmentId Get Alert Attachment
OpsgenieSdk::AlertApi get_request_status GET /v2/alerts/requests/requestId Get Request Status of Alert
OpsgenieSdk::AlertApi get_saved_search GET /v2/alerts/saved-searches/identifier Get Saved Search
OpsgenieSdk::AlertApi list_alerts GET /v2/alerts List Alerts
OpsgenieSdk::AlertApi list_attachments GET /v2/alerts/identifier/attachments List Alert Attachments
OpsgenieSdk::AlertApi list_logs GET /v2/alerts/identifier/logs List Alert Logs
OpsgenieSdk::AlertApi list_notes GET /v2/alerts/identifier/notes List Alert Notes
OpsgenieSdk::AlertApi list_recipients GET /v2/alerts/identifier/recipients List Alert Recipients
OpsgenieSdk::AlertApi list_saved_searches GET /v2/alerts/saved-searches Lists Saved Searches
OpsgenieSdk::AlertApi remove_attachment DELETE /v2/alerts/identifier/attachments/attachmentId Remove Alert Attachment
OpsgenieSdk::AlertApi remove_details DELETE /v2/alerts/identifier/details Remove Details
OpsgenieSdk::AlertApi remove_tags DELETE /v2/alerts/identifier/tags Remove Tags
OpsgenieSdk::AlertApi snooze_alert POST /v2/alerts/identifier/snooze Snooze Alert
OpsgenieSdk::AlertApi un_acknowledge_alert POST /v2/alerts/identifier/unacknowledge UnAcknowledge Alert
OpsgenieSdk::AlertApi update_alert_description PUT /v2/alerts/identifier/description Update Alert Description
OpsgenieSdk::AlertApi update_alert_message PUT /v2/alerts/identifier/message Update Alert Message
OpsgenieSdk::AlertApi update_alert_priority PUT /v2/alerts/identifier/priority Update Alert Priority
OpsgenieSdk::AlertApi update_saved_search PATCH /v2/alerts/saved-searches/identifier Update Saved Search
OpsgenieSdk::ContactApi create_contact POST /v2/users/identifier/contacts Create Contact
OpsgenieSdk::ContactApi delete_contact DELETE /v2/users/identifier/contacts/contactId Delete Contact
OpsgenieSdk::ContactApi disable_contact POST /v2/users/identifier/contacts/contactId/disable Disable Contact
OpsgenieSdk::ContactApi enable_contact POST /v2/users/identifier/contacts/contactId/enable Enable Contact
OpsgenieSdk::ContactApi get_contact GET /v2/users/identifier/contacts/contactId Get Contact
OpsgenieSdk::ContactApi list_contacts GET /v2/users/identifier/contacts List Contacts
OpsgenieSdk::ContactApi update_contact PATCH /v2/users/identifier/contacts/contactId Update Contact (Partial)
OpsgenieSdk::CustomUserRoleApi create_custom_user_role POST /v2/roles Create Custom User Role
OpsgenieSdk::CustomUserRoleApi delete_custom_user_role DELETE /v2/roles/identifier Delete Custom User Role
OpsgenieSdk::CustomUserRoleApi get_custom_user_role GET /v2/roles/identifier Get Custom User Role
OpsgenieSdk::CustomUserRoleApi list_custom_user_roles GET /v2/roles List Custom User Roles
OpsgenieSdk::CustomUserRoleApi update_custom_user_role PUT /v2/roles/identifier Update Custom User Role
OpsgenieSdk::DeprecatedPolicyApi change_alert_policy_order POST /v1/policies/policyId/change-order Change Alert Policy Order
OpsgenieSdk::DeprecatedPolicyApi create_alert_policy POST /v1/policies Create Alert Policy
OpsgenieSdk::DeprecatedPolicyApi delete_alert_policy DELETE /v1/policies/policyId Delete Alert Policy
OpsgenieSdk::DeprecatedPolicyApi disable_alert_policy POST /v1/policies/policyId/disable Disable Alert Policy
OpsgenieSdk::DeprecatedPolicyApi enable_alert_policy POST /v1/policies/policyId/enable Enable Alert Policy
OpsgenieSdk::DeprecatedPolicyApi get_alert_policy GET /v1/policies/policyId Get Alert Policy
OpsgenieSdk::DeprecatedPolicyApi list_alert_policies GET /v1/policies List Alert Policies
OpsgenieSdk::DeprecatedPolicyApi update_alert_policy PUT /v1/policies/policyId Update Alert Policy
OpsgenieSdk::EscalationApi create_escalation POST /v2/escalations Create Escalation
OpsgenieSdk::EscalationApi delete_escalation DELETE /v2/escalations/identifier Delete Escalation
OpsgenieSdk::EscalationApi get_escalation GET /v2/escalations/identifier Get Escalation
OpsgenieSdk::EscalationApi list_escalations GET /v2/escalations List Escalations
OpsgenieSdk::EscalationApi update_escalation PATCH /v2/escalations/identifier Update Escalation (Partial)
OpsgenieSdk::ForwardingRuleApi create_forwarding_rule POST /v2/forwarding-rules Create Forwarding Rule
OpsgenieSdk::ForwardingRuleApi delete_forwarding_rule DELETE /v2/forwarding-rules/identifier Delete Forwarding Rule
OpsgenieSdk::ForwardingRuleApi get_forwarding_rule GET /v2/forwarding-rules/identifier Get Forwarding Rule
OpsgenieSdk::ForwardingRuleApi list_forwarding_rules GET /v2/forwarding-rules List Forwarding Rules
OpsgenieSdk::ForwardingRuleApi update_forwarding_rule PUT /v2/forwarding-rules/identifier Update Forwarding Rule
OpsgenieSdk::HeartbeatApi create_heartbeat POST /v2/heartbeats Create Heartbeat
OpsgenieSdk::HeartbeatApi delete_heartbeat DELETE /v2/heartbeats/name Delete Heartbeat
OpsgenieSdk::HeartbeatApi disable_heartbeat POST /v2/heartbeats/name/disable Disable Heartbeat
OpsgenieSdk::HeartbeatApi enable_heartbeat POST /v2/heartbeats/name/enable Enable Heartbeat
OpsgenieSdk::HeartbeatApi get_heartbeat GET /v2/heartbeats/name Get Heartbeat
OpsgenieSdk::HeartbeatApi list_heart_beats GET /v2/heartbeats List Heartbeats
OpsgenieSdk::HeartbeatApi ping GET /v2/heartbeats/name/ping Ping Heartbeat
OpsgenieSdk::HeartbeatApi update_heartbeat PATCH /v2/heartbeats/name Update Heartbeat (Partial)
OpsgenieSdk::IncidentApi close_incident POST /v1/incidents/identifier/close Close Incident
OpsgenieSdk::IncidentApi create_incident POST /v1/incidents/create Create Incident
OpsgenieSdk::IncidentApi delete_incident DELETE /v1/incidents/identifier Delete Incident
OpsgenieSdk::IncidentApi get_incident GET /v1/incidents/identifier Get Incident
OpsgenieSdk::IncidentApi get_incident_request_status GET /v1/incidents/requests/requestId Get Request Status of Incident
OpsgenieSdk::IncidentApi list_incidents GET /v1/incidents/ List incidents
OpsgenieSdk::IntegrationApi authenticate_integration POST /v2/integrations/authenticate Authenticate Integration
OpsgenieSdk::IntegrationApi create_integration POST /v2/integrations Create Integration
OpsgenieSdk::IntegrationApi delete_integration DELETE /v2/integrations/id Delete Integration
OpsgenieSdk::IntegrationApi disable_integration POST /v2/integrations/id/disable Disable Integration
OpsgenieSdk::IntegrationApi enable_integration POST /v2/integrations/id/enable Enable Integration
OpsgenieSdk::IntegrationApi get_integration GET /v2/integrations/id Get Integration
OpsgenieSdk::IntegrationApi list_integrations GET /v2/integrations List Integrations
OpsgenieSdk::IntegrationApi update_integration PUT /v2/integrations/id Update Integration
OpsgenieSdk::IntegrationActionApi create_integration_action POST /v2/integrations/id/actions Create Integration Action
OpsgenieSdk::IntegrationActionApi list_integration_actions GET /v2/integrations/id/actions List Integration Actions
OpsgenieSdk::IntegrationActionApi update_integration_actions PUT /v2/integrations/id/actions Update Integration Actions
OpsgenieSdk::MaintenanceApi cancel_maintenance POST /v1/maintenance/id/cancel Cancel Maintenance
OpsgenieSdk::MaintenanceApi create_maintenance POST /v1/maintenance Create Maintenance
OpsgenieSdk::MaintenanceApi delete_maintenance DELETE /v1/maintenance/id Delete Maintenance
OpsgenieSdk::MaintenanceApi get_maintenance GET /v1/maintenance/id Get Maintenance
OpsgenieSdk::MaintenanceApi list_maintenance GET /v1/maintenance List Maintenance
OpsgenieSdk::MaintenanceApi update_maintenance PUT /v1/maintenance/id Update Maintenance
OpsgenieSdk::NotificationRuleApi change_notification_rule_order POST /v2/users/identifier/notification-rules/ruleId/change-order Change order of Notification Rule
OpsgenieSdk::NotificationRuleApi create_notification_rule POST /v2/users/identifier/notification-rules Create Notification Rule
OpsgenieSdk::NotificationRuleApi delete_notification_rule DELETE /v2/users/identifier/notification-rules/ruleId Delete Notification Rule
OpsgenieSdk::NotificationRuleApi disable_notification_rule POST /v2/users/identifier/notification-rules/ruleId/disable Disable Notification Rule
OpsgenieSdk::NotificationRuleApi enable_notification_rule POST /v2/users/identifier/notification-rules/ruleId/enable Enable Notification Rule
OpsgenieSdk::NotificationRuleApi get_notification_rule GET /v2/users/identifier/notification-rules/ruleId Get Notification Rule
OpsgenieSdk::NotificationRuleApi list_notification_rules GET /v2/users/identifier/notification-rules List Notification Rules
OpsgenieSdk::NotificationRuleApi update_notification_rule PATCH /v2/users/identifier/notification-rules/ruleId Update Notification Rule (Partial)
OpsgenieSdk::NotificationRuleStepApi create_notification_rule_step POST /v2/users/identifier/notification-rules/ruleId/steps Create Notification Rule Step
OpsgenieSdk::NotificationRuleStepApi delete_notification_rule_step DELETE /v2/users/identifier/notification-rules/ruleId/steps/id Delete Notification Rule Step
OpsgenieSdk::NotificationRuleStepApi disable_notification_rule_step POST /v2/users/identifier/notification-rules/ruleId/steps/id/disable Disable Notification Rule Step
OpsgenieSdk::NotificationRuleStepApi enable_notification_rule_step POST /v2/users/identifier/notification-rules/ruleId/steps/id/enable Enable Notification Rule Step
OpsgenieSdk::NotificationRuleStepApi get_notification_rule_step GET /v2/users/identifier/notification-rules/ruleId/steps/id Get Notification Rule Step
OpsgenieSdk::NotificationRuleStepApi list_notification_rule_steps GET /v2/users/identifier/notification-rules/ruleId/steps List Notification Rule Steps
OpsgenieSdk::NotificationRuleStepApi update_notification_rule_step PATCH /v2/users/identifier/notification-rules/ruleId/steps/id Update Notification Rule Step (Partial)
OpsgenieSdk::PolicyApi change_policy_order POST /v2/policies/policyId/change-order Change Policy Order
OpsgenieSdk::PolicyApi create_policy POST /v2/policies Create Policy
OpsgenieSdk::PolicyApi delete_policy DELETE /v2/policies/policyId Delete Policy
OpsgenieSdk::PolicyApi disable_policy POST /v2/policies/policyId/disable Disable Policy
OpsgenieSdk::PolicyApi enable_policy POST /v2/policies/policyId/enable Enable Policy
OpsgenieSdk::PolicyApi get_policy GET /v2/policies/policyId Get Policy
OpsgenieSdk::PolicyApi list_alert_policies GET /v2/policies/alert List Alert Policies
OpsgenieSdk::PolicyApi list_notification_policies GET /v2/policies/notification List Notification Policies
OpsgenieSdk::PolicyApi update_policy PUT /v2/policies/policyId Update Policy
OpsgenieSdk::ScheduleApi create_schedule POST /v2/schedules Create Schedule
OpsgenieSdk::ScheduleApi delete_schedule DELETE /v2/schedules/identifier Delete Schedule
OpsgenieSdk::ScheduleApi export_schedule GET /v2/schedules/identifier.ics Export Schedule
OpsgenieSdk::ScheduleApi get_schedule GET /v2/schedules/identifier Get Schedule
OpsgenieSdk::ScheduleApi get_schedule_timeline GET /v2/schedules/identifier/timeline Get Schedule Timeline
OpsgenieSdk::ScheduleApi list_schedules GET /v2/schedules List Schedules
OpsgenieSdk::ScheduleApi update_schedule PATCH /v2/schedules/identifier Update Schedule (Partial)
OpsgenieSdk::ScheduleOverrideApi create_schedule_override POST /v2/schedules/identifier/overrides Create Schedule Override
OpsgenieSdk::ScheduleOverrideApi delete_schedule_override DELETE /v2/schedules/identifier/overrides/alias Delete Schedule Override
OpsgenieSdk::ScheduleOverrideApi get_schedule_override GET /v2/schedules/identifier/overrides/alias Get Schedule Override
OpsgenieSdk::ScheduleOverrideApi list_schedule_override GET /v2/schedules/identifier/overrides List Schedule Overrides
OpsgenieSdk::ScheduleOverrideApi update_schedule_override PUT /v2/schedules/identifier/overrides/alias Update Schedule Override
OpsgenieSdk::ScheduleRotationApi create_schedule_rotation POST /v2/schedules/identifier/rotations Create Schedule Rotation
OpsgenieSdk::ScheduleRotationApi delete_schedule_rotation DELETE /v2/schedules/identifier/rotations/id Delete Schedule Rotation
OpsgenieSdk::ScheduleRotationApi get_schedule_rotation GET /v2/schedules/identifier/rotations/id Get Schedule Rotation
OpsgenieSdk::ScheduleRotationApi list_schedule_rotations GET /v2/schedules/identifier/rotations List Schedule Rotations
OpsgenieSdk::ScheduleRotationApi update_schedule_rotation PATCH /v2/schedules/identifier/rotations/id Update Schedule Rotation (Partial)
OpsgenieSdk::TeamApi create_team POST /v2/teams Create Team
OpsgenieSdk::TeamApi delete_team DELETE /v2/teams/identifier Delete Team
OpsgenieSdk::TeamApi get_team GET /v2/teams/identifier Get Team
OpsgenieSdk::TeamApi list_team_logs GET /v2/teams/identifier/logs List Team Logs
OpsgenieSdk::TeamApi list_teams GET /v2/teams List Teams
OpsgenieSdk::TeamApi update_team PATCH /v2/teams/identifier Update Team (Partial)
OpsgenieSdk::TeamMemberApi add_team_member POST /v2/teams/identifier/members Add Team Member
OpsgenieSdk::TeamMemberApi delete_team_member DELETE /v2/teams/identifier/members/memberIdentifier Delete Team Member
OpsgenieSdk::TeamRoleApi create_team_role POST /v2/teams/identifier/roles Create Team Role
OpsgenieSdk::TeamRoleApi delete_team_role DELETE /v2/teams/identifier/roles/teamRoleIdentifier Delete Team Role
OpsgenieSdk::TeamRoleApi get_team_role GET /v2/teams/identifier/roles/teamRoleIdentifier Get Team Role
OpsgenieSdk::TeamRoleApi list_team_roles GET /v2/teams/identifier/roles List Team Roles
OpsgenieSdk::TeamRoleApi update_team_role PATCH /v2/teams/identifier/roles/teamRoleIdentifier Update Team Role (Partial)
OpsgenieSdk::TeamRoutingRuleApi change_team_routing_rule_order POST /v2/teams/identifier/routing-rules/id/change-order Change Team Routing Rule Order
OpsgenieSdk::TeamRoutingRuleApi create_team_routing_rule POST /v2/teams/identifier/routing-rules Create Team Routing Rule
OpsgenieSdk::TeamRoutingRuleApi delete_team_routing_rule DELETE /v2/teams/identifier/routing-rules/id Delete Team Routing Rule
OpsgenieSdk::TeamRoutingRuleApi get_team_routing_rule GET /v2/teams/identifier/routing-rules/id Get Team Routing Rule
OpsgenieSdk::TeamRoutingRuleApi list_team_routing_rules GET /v2/teams/identifier/routing-rules List Team Routing Rules
OpsgenieSdk::TeamRoutingRuleApi update_team_routing_rule PATCH /v2/teams/identifier/routing-rules/id Update Team Routing Rule (Partial)
OpsgenieSdk::UserApi create_user POST /v2/users Create User
OpsgenieSdk::UserApi delete_user DELETE /v2/users/identifier Delete User
OpsgenieSdk::UserApi get_user GET /v2/users/identifier Get User
OpsgenieSdk::UserApi list_user_escalations GET /v2/users/identifier/escalations List User Escalations
OpsgenieSdk::UserApi list_user_forwarding_rules GET /v2/users/identifier/forwarding-rules List User Forwarding Rules
OpsgenieSdk::UserApi list_user_schedules GET /v2/users/identifier/schedules List User Schedules
OpsgenieSdk::UserApi list_user_teams GET /v2/users/identifier/teams List User Teams
OpsgenieSdk::UserApi list_users GET /v2/users List users
OpsgenieSdk::UserApi update_user PATCH /v2/users/identifier Update User (Partial)
OpsgenieSdk::WhoIsOnCallApi export_on_call_user GET /v2/schedules/on-calls/identifier.ics Export On-Call User
OpsgenieSdk::WhoIsOnCallApi get_next_on_calls GET /v2/schedules/identifier/next-on-calls Get Next On Calls
OpsgenieSdk::WhoIsOnCallApi get_on_calls GET /v2/schedules/identifier/on-calls Get On Calls
OpsgenieSdk::WhoIsOnCallApi list_on_calls GET /v2/schedules/on-calls List On Calls

Documentation for Models

Documentation for Authorization

GenieKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header