LogSnag Docs
Home
  • ⚡Welcome
  • Quick Start
  • LogSnag for SaaS
  • ⚒️SDKs
    • Node
    • React
    • Next
    • Vue
    • Deno
    • Web
    • Python
  • 📖API Reference
    • Log
    • Identify
    • Insight
    • Insight Mutate
  • 🧳Tools
    • Feedback Widget
  • 🤝Integrations
    • Zapier
    • Bubble
    • Unofficial
Powered by GitBook
On this page

Was this helpful?

  1. API Reference

Insight

PreviousIdentifyNextInsight Mutate

Last updated 1 year ago

Was this helpful?

Insights are real-time widgets that you can add to each of your projects. They are use-case agnostic and can be used to display any information that you want in real-time.

Publish an insight to LogSnag.

POST https://api.logsnag.com/v1/insight

Insights are real-time events such as KPI, performance, and other metrics that are not captured as a regular event. You can publish them periodically or as soon as they occur and the latest value will be stored in LogSnag.

Headers

Name
Type
Description

Content-Type

String

application/json

Authorization

String

Bearer <TOKEN>

Request Body

Name
Type
Description

project*

String

Project name

title*

String

Insight title

value*

String, Number

Insight value

icon

Emoji

Single emoji as the insight icon

{
    // Response
}

Important: Fields ending with an * are required in your request!

For each insight, the title should remain the same across all updates. However, you may change the value or the icon depending on the status of the insight. For example, if you decide to display the status of a service, you can change the icon to 🟢 if the service is up and 🔴 if it is down.

📖