library(httr)
url <- "https://api.loghive.app/v1/event/add"
headers <- c(
"Content-Type" = "application/json",
"ApiKey" = "YourPersonalApiKey"
)
body <- list(
project = "yourprojectname",
group = "yourgroupname",
event= "yourevent",
notify= FALSE
)
json_body <- toJSON(body)
response <- POST(url, headers = headers, body = json_body)
status_code <- response$status_code
content <- content(response, as = "text")
library(httr)
url <- "https://api.loghive.app/v1/insight/add"
headers <- c(
"Content-Type" = "application/json",
"ApiKey" = "YourPersonalApiKey"
)
body <- list(
project = "MySaas",
insight = "system1-online",
value= 1
)
json_body <- toJSON(body)
response <- POST(url, headers = headers, body = json_body)
status_code <- response$status_code
content <- content(response, as = "text")