class GraylogAPI::StaticFields

class for manage StaticFields of an input

Public Class Methods

new(client) click to toggle source
# File lib/graylogapi/static_fields.rb, line 4
def initialize(client)
  @client = client
end

Public Instance Methods

create(input_id, params) click to toggle source

add key to an input

@param input_id [Integer] id of an input @param params [Hash] hash with key and value of new static field @return [GraylogAPI::Client::Response]

# File lib/graylogapi/static_fields.rb, line 13
def create(input_id, params)
  @client.request(:post, "/system/inputs/#{input_id}/staticfields", params)
end
delete(input_id, key) click to toggle source

delete key of an input

@param input_id [Integer] id of an input @param key [String] key of static field @return [GraylogAPI::Client::Response]

# File lib/graylogapi/static_fields.rb, line 22
def delete(input_id, key)
  @client.request(:delete, "/system/inputs/#{input_id}/staticfields/#{key}")
end