require 'uri'
require 'net/http'
require 'json'
url = URI("https://api.loghive.app/v1/event/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = (url.scheme == "https")
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["ApiKey"] = "YourPersonalApiKey"
request.body = { project= "yourprojectname", group= "yourgroupname", event= "your-event-name", description= "your-description", notify= false} .to_json
response = http.request(request)
puts response.read_body
require 'uri'
require 'net/http'
require 'json'
url = URI("https://api.loghive.app/v1/insight/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = (url.scheme == "https")
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["ApiKey"] = "YourPersonalApiKey"
request.body = { project= "MySaas", insight= "system1-online", value= 1} .to_json
response = http.request(request)
puts response.read_body