cURL

LogHive provides a simple REST API that you can use to push events and errors. Here is an example code for cURL:

Push Event

curl --location --request POST 'https://api.loghive.app/v1/event/add' \
--header 'Content-Type: application/json' \
--header 'ApiKey: your-api-key' \
--data-raw '{"project":"MySaas","group":"YourGroupName","event":"YourEventName","description":"YourDescription","notify":true}'

Push Insight

curl --location --request POST 'https://api.loghive.app/v1/insight/add' \
--header 'Content-Type: application/json' \
--header 'ApiKey: your-api-key' \
--data-raw '{"project":"MySaas","insight":"system1-online","value":1}'

Last updated