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
  • Mutate an insight to LogSnag.
  • Mutation Object

Was this helpful?

  1. API Reference

Insight Mutate

Mutate an insight to LogSnag.

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

This endpoint allows you to change (mutate) existing numerical insights.

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*

Mutation

See example below

icon

Emoji

Single emoji as the insight icon

{
    // Response
}

Mutation Object

Increment ($inc)

The increment mutation changes a numerical value by increasing or decreasing it. It can be applied to an existing insight or 0 if no insight exists. The mutation can be performed using either positive or negative numbers.

{
    "project": "makershq",
    "title": "Online Users",
    "value": {
        "$inc": 1
    },
    "icon": "🔴"
}

PreviousInsightNextFeedback Widget

Last updated 1 year ago

Was this helpful?

📖