Class: Wavefront::Message
Overview
Manage and query Wavefront messages.
Instance Attribute Summary
Attributes inherited from Base
#api_base, #conn, #debug, #logger, #net, #noop, #opts, #update_keys, #verbose
Instance Method Summary collapse
-
#list(offset = 0, limit = 100, unread_only = true) ⇒ Object
GET /api/v2/message Gets messages applicable to the current user, i.e.
-
#read(id) ⇒ Object
POST /api/v2/message/id/read Mark a specific message as read.
Methods inherited from Base
#api_delete, #api_get, #api_post, #api_put, #hash_for_update, #initialize, #log, #mk_conn, #respond, #time_to_ms
Methods included from Mixins
Methods included from Validators
#wf_alert_id?, #wf_alert_severity?, #wf_cloudintegration_id?, #wf_dashboard_id?, #wf_epoch?, #wf_event_id?, #wf_granularity?, #wf_link_id?, #wf_link_template?, #wf_maintenance_window_id?, #wf_message_id?, #wf_metric_name?, #wf_ms_ts?, #wf_name?, #wf_point?, #wf_point_tags?, #wf_proxy_id?, #wf_savedsearch_entity?, #wf_savedsearch_id?, #wf_source_id?, #wf_string?, #wf_tag?, #wf_ts?, #wf_user_id?, #wf_value?, #wf_version?, #wf_webhook_id?
Constructor Details
This class inherits a constructor from Wavefront::Base
Instance Method Details
#list(offset = 0, limit = 100, unread_only = true) ⇒ Object
GET /api/v2/message Gets messages applicable to the current user, i.e. within time range and distribution scope
16 17 18 |
# File 'lib/wavefront-sdk/message.rb', line 16 def list(offset = 0, limit = 100, unread_only = true) api_get('', { offset: offset, limit: limit, unreadOnly: unread_only }) end |
#read(id) ⇒ Object
POST /api/v2/message/id/read Mark a specific message as read
25 26 27 28 |
# File 'lib/wavefront-sdk/message.rb', line 25 def read(id) (id) api_post([id, 'read'].uri_concat) end |