Build Status

Xcal::Parktronic

TODO: Write a gem description

Installation

Add this line to your application's Gemfile:

gem 'xcal-parktronic'

And then execute:

$ bundle

Or install it yourself as:

$ gem install xcal-parktronic

Usage

Initialization:

api = Xcal::Parktronic::ApiClient.new(access_token: 'your_access_token', endpoint: 'http://api_host')

Alarms:

api.alarms
api.alarm_tags(1)
api.search_alarm(name: 'test', tagged_with: 'test', time_range: 24, originating_system: 'Splunk', page: 1, per_page: 20)

Outages:

api.outages
api.outages(page: 2, per_page: 5)

Stack changes

api.stack_changes
api.stack_changes(page: 2, per_page: 5)
api.stack_changes(page: 2, per_page: 5, element: 'XBO')
api.stack_changes(time_range: {time_offset: -1, start_date: 0, start_time: 1440, end_time: 0}, element: 'XBO')

Events history

api.events_history
api.events_history(page: 2, per_page: 5)
api.events_history(host_impacted: 'xre-host-1', service_impacted: 'xre')

Command notifications (remote commands)

api.command_notifications
api.command_notifications(page: 1, per_page: 2)
api.update_command_notification(10)

Events

api.add_event
api.update_event
api.event_tags(1)
api.alarm(3).get_all_events
api.alarm(3).post_event(data)

Alarm Actions

api.alarm(3).get_alarm_actions
api.alarm(3).get_alarm_action(alarm_action_id)
api.alarm(3).post_alarm_action
api.alarm(3).update_alarm_action
api.alarm(3).set_position

Custom Queries

api.get_custom_queries
api.post_custom_query
api.update_custom_query
api.find_custom_query